Class Webhook.Builder

  • All Implemented Interfaces:
    WebhookOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Webhook

    public static final class Webhook.Builder
    extends com.google.protobuf.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.v3.Webhook
    • Method Detail

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

        public Webhook.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>
      • getDefaultInstanceForType

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

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

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

        public Webhook.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>
      • setField

        public Webhook.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                        Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>
      • clearField

        public Webhook.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>
      • clearOneof

        public Webhook.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>
      • setRepeatedField

        public Webhook.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                int index,
                                                Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>
      • addRepeatedField

        public Webhook.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>
      • mergeFrom

        public Webhook.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Webhook.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>
      • mergeFrom

        public Webhook.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Webhook.Builder>
        Throws:
        IOException
      • 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.
      • setName

        public Webhook.Builder setName​(String value)
         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;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Webhook.Builder clearName()
         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;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Webhook.Builder setNameBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • 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.
      • setDisplayName

        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];
        Parameters:
        value - The displayName to set.
        Returns:
        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:
        This builder for chaining.
      • setDisplayNameBytes

        public Webhook.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
         Required. The human-readable name of the webhook, unique within the agent.
         
        string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for displayName to set.
        Returns:
        This builder for chaining.
      • 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.
      • setGenericWebService

        public Webhook.Builder setGenericWebService​(Webhook.GenericWebService value)
         Configuration for a generic web service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4;
      • setGenericWebService

        public Webhook.Builder setGenericWebService​(Webhook.GenericWebService.Builder builderForValue)
         Configuration for a generic web service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4;
      • mergeGenericWebService

        public Webhook.Builder mergeGenericWebService​(Webhook.GenericWebService value)
         Configuration for a generic web service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4;
      • clearGenericWebService

        public Webhook.Builder clearGenericWebService()
         Configuration for a generic web service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4;
      • getGenericWebServiceBuilder

        public Webhook.GenericWebService.Builder getGenericWebServiceBuilder()
         Configuration for a generic web service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4;
      • 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.
      • setServiceDirectory

        public Webhook.Builder setServiceDirectory​(Webhook.ServiceDirectoryConfig value)
         Configuration for a [Service
         Directory](https://cloud.google.com/service-directory) service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7;
      • setServiceDirectory

        public Webhook.Builder setServiceDirectory​(Webhook.ServiceDirectoryConfig.Builder builderForValue)
         Configuration for a [Service
         Directory](https://cloud.google.com/service-directory) service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7;
      • mergeServiceDirectory

        public Webhook.Builder mergeServiceDirectory​(Webhook.ServiceDirectoryConfig value)
         Configuration for a [Service
         Directory](https://cloud.google.com/service-directory) service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7;
      • clearServiceDirectory

        public Webhook.Builder clearServiceDirectory()
         Configuration for a [Service
         Directory](https://cloud.google.com/service-directory) service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7;
      • getServiceDirectoryBuilder

        public Webhook.ServiceDirectoryConfig.Builder getServiceDirectoryBuilder()
         Configuration for a [Service
         Directory](https://cloud.google.com/service-directory) service.
         
        .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7;
      • 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.
      • setTimeout

        public Webhook.Builder setTimeout​(com.google.protobuf.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;
      • setTimeout

        public Webhook.Builder setTimeout​(com.google.protobuf.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;
      • mergeTimeout

        public Webhook.Builder mergeTimeout​(com.google.protobuf.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;
      • 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;
      • getTimeoutBuilder

        public com.google.protobuf.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;
      • 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.
      • setDisabled

        public Webhook.Builder setDisabled​(boolean value)
         Indicates whether the webhook is disabled.
         
        bool disabled = 5;
        Parameters:
        value - The disabled to set.
        Returns:
        This builder for chaining.
      • clearDisabled

        public Webhook.Builder clearDisabled()
         Indicates whether the webhook is disabled.
         
        bool disabled = 5;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Webhook.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>
      • mergeUnknownFields

        public final Webhook.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Webhook.Builder>