Class Webhook (0.14.1)

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

Implements

WebhookOrBuilder

Static Fields

DISABLED_FIELD_NUMBER

public static final int DISABLED_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

GENERIC_WEB_SERVICE_FIELD_NUMBER

public static final int GENERIC_WEB_SERVICE_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_DIRECTORY_FIELD_NUMBER

public static final int SERVICE_DIRECTORY_FIELD_NUMBER
Field Value
TypeDescription
int

TIMEOUT_FIELD_NUMBER

public static final int TIMEOUT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Webhook getDefaultInstance()
Returns
TypeDescription
Webhook

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Webhook.Builder newBuilder()
Returns
TypeDescription
Webhook.Builder

newBuilder(Webhook prototype)

public static Webhook.Builder newBuilder(Webhook prototype)
Parameter
NameDescription
prototypeWebhook
Returns
TypeDescription
Webhook.Builder

parseDelimitedFrom(InputStream input)

public static Webhook parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Webhook parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Webhook parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Webhook parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Webhook parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Webhook parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Webhook parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Webhook parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Webhook parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Webhook parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Webhook parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Webhook parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Webhook
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Webhook> parser()
Returns
TypeDescription
Parser<Webhook>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Webhook getDefaultInstanceForType()
Returns
TypeDescription
Webhook

getDisabled()

public boolean getDisabled()

Indicates whether the webhook is disabled.

bool disabled = 5;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for displayName.

getGenericWebService()

public Webhook.GenericWebService getGenericWebService()

Configuration for a generic web service.

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

Returns
TypeDescription
Webhook.GenericWebService

The genericWebService.

getGenericWebServiceOrBuilder()

public Webhook.GenericWebServiceOrBuilder getGenericWebServiceOrBuilder()

Configuration for a generic web service.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Webhook> getParserForType()
Returns
TypeDescription
Parser<Webhook>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getServiceDirectory()

public Webhook.ServiceDirectoryConfig getServiceDirectory()

Configuration for a Service Directory service.

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

Returns
TypeDescription
Webhook.ServiceDirectoryConfig

The serviceDirectory.

getServiceDirectoryOrBuilder()

public Webhook.ServiceDirectoryConfigOrBuilder getServiceDirectoryOrBuilder()

Configuration for a Service Directory service.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
DurationOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getWebhookCase()

public Webhook.WebhookCase getWebhookCase()
Returns
TypeDescription
Webhook.WebhookCase

hasGenericWebService()

public boolean hasGenericWebService()

Configuration for a generic web service.

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

Returns
TypeDescription
boolean

Whether the genericWebService field is set.

hasServiceDirectory()

public boolean hasServiceDirectory()

Configuration for a Service Directory service.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the timeout field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Webhook.Builder newBuilderForType()
Returns
TypeDescription
Webhook.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Webhook.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Webhook.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Webhook.Builder toBuilder()
Returns
TypeDescription
Webhook.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException