Class Webhook.Builder (0.40.0)

public static final class Webhook.Builder extends GeneratedMessageV3.Builder<Webhook.Builder> 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 Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Webhook.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Webhook.Builder
Overrides

build()

public Webhook build()
Returns
Type Description
Webhook

buildPartial()

public Webhook buildPartial()
Returns
Type Description
Webhook

clear()

public Webhook.Builder clear()
Returns
Type Description
Webhook.Builder
Overrides

clearDisabled()

public Webhook.Builder clearDisabled()

Indicates whether the webhook is disabled.

bool disabled = 5;

Returns
Type Description
Webhook.Builder

This builder for chaining.

clearDisplayName()

public Webhook.Builder clearDisplayName()

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

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

Returns
Type Description
Webhook.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Webhook.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Webhook.Builder
Overrides

clearGenericWebService()

public Webhook.Builder clearGenericWebService()

Configuration for a generic web service.

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

Returns
Type Description
Webhook.Builder

clearName()

public Webhook.Builder clearName()

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
Webhook.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Webhook.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Webhook.Builder
Overrides

clearServiceDirectory()

public Webhook.Builder clearServiceDirectory()

Configuration for a Service Directory service.

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

Returns
Type Description
Webhook.Builder

clearTimeout()

public Webhook.Builder clearTimeout()

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
Webhook.Builder

clearWebhook()

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

clone()

public Webhook.Builder clone()
Returns
Type Description
Webhook.Builder
Overrides

getDefaultInstanceForType()

public Webhook getDefaultInstanceForType()
Returns
Type Description
Webhook

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

getGenericWebServiceBuilder()

public Webhook.GenericWebService.Builder getGenericWebServiceBuilder()

Configuration for a generic web service.

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

Returns
Type Description
Webhook.GenericWebService.Builder

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.

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.

getServiceDirectoryBuilder()

public Webhook.ServiceDirectoryConfig.Builder getServiceDirectoryBuilder()

Configuration for a Service Directory service.

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

Returns
Type Description
Webhook.ServiceDirectoryConfig.Builder

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.

getTimeoutBuilder()

public Duration.Builder getTimeoutBuilder()

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
Builder

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Webhook other)

public Webhook.Builder mergeFrom(Webhook other)
Parameter
Name Description
other Webhook
Returns
Type Description
Webhook.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Webhook.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Webhook.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Webhook.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Webhook.Builder
Overrides

mergeGenericWebService(Webhook.GenericWebService value)

public Webhook.Builder mergeGenericWebService(Webhook.GenericWebService value)

Configuration for a generic web service.

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

Parameter
Name Description
value Webhook.GenericWebService
Returns
Type Description
Webhook.Builder

mergeServiceDirectory(Webhook.ServiceDirectoryConfig value)

public Webhook.Builder mergeServiceDirectory(Webhook.ServiceDirectoryConfig value)

Configuration for a Service Directory service.

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

Parameter
Name Description
value Webhook.ServiceDirectoryConfig
Returns
Type Description
Webhook.Builder

mergeTimeout(Duration value)

public Webhook.Builder mergeTimeout(Duration value)

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;

Parameter
Name Description
value Duration
Returns
Type Description
Webhook.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Webhook.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Webhook.Builder
Overrides

setDisabled(boolean value)

public Webhook.Builder setDisabled(boolean value)

Indicates whether the webhook is disabled.

bool disabled = 5;

Parameter
Name Description
value boolean

The disabled to set.

Returns
Type Description
Webhook.Builder

This builder for chaining.

setDisplayName(String value)

public Webhook.Builder setDisplayName(String value)

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

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Webhook.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Webhook.Builder setDisplayNameBytes(ByteString value)

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

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Webhook.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Webhook.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Webhook.Builder
Overrides

setGenericWebService(Webhook.GenericWebService value)

public Webhook.Builder setGenericWebService(Webhook.GenericWebService value)

Configuration for a generic web service.

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

Parameter
Name Description
value Webhook.GenericWebService
Returns
Type Description
Webhook.Builder

setGenericWebService(Webhook.GenericWebService.Builder builderForValue)

public Webhook.Builder setGenericWebService(Webhook.GenericWebService.Builder builderForValue)

Configuration for a generic web service.

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

Parameter
Name Description
builderForValue Webhook.GenericWebService.Builder
Returns
Type Description
Webhook.Builder

setName(String value)

public Webhook.Builder setName(String value)

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;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Webhook.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Webhook.Builder setNameBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Webhook.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Webhook.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Webhook.Builder
Overrides

setServiceDirectory(Webhook.ServiceDirectoryConfig value)

public Webhook.Builder setServiceDirectory(Webhook.ServiceDirectoryConfig value)

Configuration for a Service Directory service.

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

Parameter
Name Description
value Webhook.ServiceDirectoryConfig
Returns
Type Description
Webhook.Builder

setServiceDirectory(Webhook.ServiceDirectoryConfig.Builder builderForValue)

public Webhook.Builder setServiceDirectory(Webhook.ServiceDirectoryConfig.Builder builderForValue)

Configuration for a Service Directory service.

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

Parameter
Name Description
builderForValue Webhook.ServiceDirectoryConfig.Builder
Returns
Type Description
Webhook.Builder

setTimeout(Duration value)

public Webhook.Builder setTimeout(Duration value)

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;

Parameter
Name Description
value Duration
Returns
Type Description
Webhook.Builder

setTimeout(Duration.Builder builderForValue)

public Webhook.Builder setTimeout(Duration.Builder builderForValue)

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;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Webhook.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Webhook.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Webhook.Builder
Overrides