Class Webhook (0.40.0)

public final class Webhook extends GeneratedMessageV3 implements WebhookOrBuilder

Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.

Protobuf type google.cloud.dialogflow.cx.v3beta1.Webhook

Implements

WebhookOrBuilder

Static Fields

DISABLED_FIELD_NUMBER

public static final int DISABLED_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

GENERIC_WEB_SERVICE_FIELD_NUMBER

public static final int GENERIC_WEB_SERVICE_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

SERVICE_DIRECTORY_FIELD_NUMBER

public static final int SERVICE_DIRECTORY_FIELD_NUMBER
Field Value
Type Description
int

TIMEOUT_FIELD_NUMBER

public static final int TIMEOUT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Webhook getDefaultInstance()
Returns
Type Description
Webhook

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Webhook.Builder newBuilder()
Returns
Type Description
Webhook.Builder

newBuilder(Webhook prototype)

public static Webhook.Builder newBuilder(Webhook prototype)
Parameter
Name Description
prototype Webhook
Returns
Type Description
Webhook.Builder

parseDelimitedFrom(InputStream input)

public static Webhook parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Webhook
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Webhook parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Webhook
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Webhook parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Webhook
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Webhook parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Webhook
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Webhook parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Webhook
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Webhook parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Webhook
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Webhook parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Webhook
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Webhook parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Webhook
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Webhook parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Webhook
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Webhook parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Webhook
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Webhook parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Webhook
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Webhook parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Webhook
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Webhook> parser()
Returns
Type Description
Parser<Webhook>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Webhook getDefaultInstanceForType()
Returns
Type Description
Webhook

getDisabled()

public boolean getDisabled()

Indicates whether the webhook is disabled.

bool disabled = 5;

Returns
Type Description
boolean

The disabled.

getDisplayName()

public String getDisplayName()

Required. The human-readable name of the webhook, unique within the agent.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The human-readable name of the webhook, unique within the agent.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getGenericWebService()

public Webhook.GenericWebService getGenericWebService()

Configuration for a generic web service.

.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;

Returns
Type Description
Webhook.GenericWebService

The genericWebService.

getGenericWebServiceOrBuilder()

public Webhook.GenericWebServiceOrBuilder getGenericWebServiceOrBuilder()

Configuration for a generic web service.

.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;

Returns
Type Description
Webhook.GenericWebServiceOrBuilder

getName()

public String getName()

The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Webhook> getParserForType()
Returns
Type Description
Parser<Webhook>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getServiceDirectory()

public Webhook.ServiceDirectoryConfig getServiceDirectory()

Configuration for a Service Directory service.

.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;

Returns
Type Description
Webhook.ServiceDirectoryConfig

The serviceDirectory.

getServiceDirectoryOrBuilder()

public Webhook.ServiceDirectoryConfigOrBuilder getServiceDirectoryOrBuilder()

Configuration for a Service Directory service.

.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;

Returns
Type Description
Webhook.ServiceDirectoryConfigOrBuilder

getTimeout()

public Duration getTimeout()

Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.

.google.protobuf.Duration timeout = 6;

Returns
Type Description
Duration

The timeout.

getTimeoutOrBuilder()

public DurationOrBuilder getTimeoutOrBuilder()

Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.

.google.protobuf.Duration timeout = 6;

Returns
Type Description
DurationOrBuilder

getWebhookCase()

public Webhook.WebhookCase getWebhookCase()
Returns
Type Description
Webhook.WebhookCase

hasGenericWebService()

public boolean hasGenericWebService()

Configuration for a generic web service.

.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;

Returns
Type Description
boolean

Whether the genericWebService field is set.

hasServiceDirectory()

public boolean hasServiceDirectory()

Configuration for a Service Directory service.

.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;

Returns
Type Description
boolean

Whether the serviceDirectory field is set.

hasTimeout()

public boolean hasTimeout()

Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.

.google.protobuf.Duration timeout = 6;

Returns
Type Description
boolean

Whether the timeout field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Webhook.Builder newBuilderForType()
Returns
Type Description
Webhook.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Webhook.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Webhook.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Webhook.Builder toBuilder()
Returns
Type Description
Webhook.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException