Class Webhook

  • All Implemented Interfaces:
    WebhookOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Webhook
    extends com.google.protobuf.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
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getName

        public String getName()
         The unique identifier of the webhook.
         Required for the
         [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook]
         method.
         [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook]
         populates the name automatically. Format: `projects/<Project
         ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`.
         
        string name = 1;
        Specified by:
        getName in interface WebhookOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The unique identifier of the webhook.
         Required for the
         [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook]
         method.
         [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook]
         populates the name automatically. Format: `projects/<Project
         ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`.
         
        string name = 1;
        Specified by:
        getNameBytes in interface WebhookOrBuilder
        Returns:
        The bytes for name.
      • 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];
        Specified by:
        getDisplayName in interface WebhookOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         Required. The human-readable name of the webhook, unique within the agent.
         
        string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDisplayNameBytes in interface WebhookOrBuilder
        Returns:
        The bytes for displayName.
      • hasGenericWebService

        public boolean hasGenericWebService()
         Configuration for a generic web service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4;
        Specified by:
        hasGenericWebService in interface WebhookOrBuilder
        Returns:
        Whether the genericWebService field is set.
      • hasServiceDirectory

        public boolean hasServiceDirectory()
         Configuration for a [Service
         Directory](https://cloud.google.com/service-directory) service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7;
        Specified by:
        hasServiceDirectory in interface WebhookOrBuilder
        Returns:
        Whether the serviceDirectory field is set.
      • getServiceDirectory

        public Webhook.ServiceDirectoryConfig getServiceDirectory()
         Configuration for a [Service
         Directory](https://cloud.google.com/service-directory) service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7;
        Specified by:
        getServiceDirectory in interface WebhookOrBuilder
        Returns:
        The serviceDirectory.
      • 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;
        Specified by:
        hasTimeout in interface WebhookOrBuilder
        Returns:
        Whether the timeout field is set.
      • getTimeout

        public com.google.protobuf.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;
        Specified by:
        getTimeout in interface WebhookOrBuilder
        Returns:
        The timeout.
      • getTimeoutOrBuilder

        public com.google.protobuf.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;
        Specified by:
        getTimeoutOrBuilder in interface WebhookOrBuilder
      • getDisabled

        public boolean getDisabled()
         Indicates whether the webhook is disabled.
         
        bool disabled = 5;
        Specified by:
        getDisabled in interface WebhookOrBuilder
        Returns:
        The disabled.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Webhook parseFrom​(ByteBuffer data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Webhook parseFrom​(ByteBuffer data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Webhook parseFrom​(com.google.protobuf.ByteString data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Webhook parseFrom​(com.google.protobuf.ByteString data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Webhook parseFrom​(byte[] data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Webhook parseFrom​(byte[] data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Webhook parseFrom​(com.google.protobuf.CodedInputStream input,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Webhook.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Webhook.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Webhook.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Webhook getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Webhook> parser()
      • getParserForType

        public com.google.protobuf.Parser<Webhook> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Webhook getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder