Class Fulfillment.Builder

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

    public static final class Fulfillment.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Fulfillment.Builder>
    implements FulfillmentOrBuilder
     By default, your agent responds to a matched intent with a static response.
     As an alternative, you can provide a more dynamic response by using
     fulfillment. When you enable fulfillment for an intent, Dialogflow responds
     to that intent by calling a service that you define. For example, if an
     end-user wants to schedule a haircut on Friday, your service can check your
     database and respond to the end-user with availability information for
     Friday.
    
     For more information, see the [fulfillment
     guide](https://cloud.google.com/dialogflow/docs/fulfillment-overview).
     
    Protobuf type google.cloud.dialogflow.v2beta1.Fulfillment
    • 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<Fulfillment.Builder>
      • clear

        public Fulfillment.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<Fulfillment.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<Fulfillment.Builder>
      • getDefaultInstanceForType

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

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

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

        public Fulfillment.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<Fulfillment.Builder>
      • setField

        public Fulfillment.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<Fulfillment.Builder>
      • clearField

        public Fulfillment.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<Fulfillment.Builder>
      • clearOneof

        public Fulfillment.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<Fulfillment.Builder>
      • setRepeatedField

        public Fulfillment.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<Fulfillment.Builder>
      • addRepeatedField

        public Fulfillment.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<Fulfillment.Builder>
      • mergeFrom

        public Fulfillment.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<Fulfillment.Builder>
      • isInitialized

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

        public Fulfillment.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<Fulfillment.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Required. The unique identifier of the fulfillment.
         Supported formats:
        
         - `projects/<Project ID>/agent/fulfillment`
         - `projects/<Project ID>/locations/<Location ID>/agent/fulfillment`
        
         This field is not used for Fulfillment in an Environment.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getName in interface FulfillmentOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Required. The unique identifier of the fulfillment.
         Supported formats:
        
         - `projects/<Project ID>/agent/fulfillment`
         - `projects/<Project ID>/locations/<Location ID>/agent/fulfillment`
        
         This field is not used for Fulfillment in an Environment.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getNameBytes in interface FulfillmentOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Fulfillment.Builder setName​(String value)
         Required. The unique identifier of the fulfillment.
         Supported formats:
        
         - `projects/<Project ID>/agent/fulfillment`
         - `projects/<Project ID>/locations/<Location ID>/agent/fulfillment`
        
         This field is not used for Fulfillment in an Environment.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Fulfillment.Builder clearName()
         Required. The unique identifier of the fulfillment.
         Supported formats:
        
         - `projects/<Project ID>/agent/fulfillment`
         - `projects/<Project ID>/locations/<Location ID>/agent/fulfillment`
        
         This field is not used for Fulfillment in an Environment.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setNameBytes

        public Fulfillment.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Required. The unique identifier of the fulfillment.
         Supported formats:
        
         - `projects/<Project ID>/agent/fulfillment`
         - `projects/<Project ID>/locations/<Location ID>/agent/fulfillment`
        
         This field is not used for Fulfillment in an Environment.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDisplayName

        public String getDisplayName()
         The human-readable name of the fulfillment, unique within the agent.
        
         This field is not used for Fulfillment in an Environment.
         
        string display_name = 2;
        Specified by:
        getDisplayName in interface FulfillmentOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         The human-readable name of the fulfillment, unique within the agent.
        
         This field is not used for Fulfillment in an Environment.
         
        string display_name = 2;
        Specified by:
        getDisplayNameBytes in interface FulfillmentOrBuilder
        Returns:
        The bytes for displayName.
      • setDisplayName

        public Fulfillment.Builder setDisplayName​(String value)
         The human-readable name of the fulfillment, unique within the agent.
        
         This field is not used for Fulfillment in an Environment.
         
        string display_name = 2;
        Parameters:
        value - The displayName to set.
        Returns:
        This builder for chaining.
      • clearDisplayName

        public Fulfillment.Builder clearDisplayName()
         The human-readable name of the fulfillment, unique within the agent.
        
         This field is not used for Fulfillment in an Environment.
         
        string display_name = 2;
        Returns:
        This builder for chaining.
      • setDisplayNameBytes

        public Fulfillment.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
         The human-readable name of the fulfillment, unique within the agent.
        
         This field is not used for Fulfillment in an Environment.
         
        string display_name = 2;
        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.v2beta1.Fulfillment.GenericWebService generic_web_service = 3;
        Specified by:
        hasGenericWebService in interface FulfillmentOrBuilder
        Returns:
        Whether the genericWebService field is set.
      • setGenericWebService

        public Fulfillment.Builder setGenericWebService​(Fulfillment.GenericWebService value)
         Configuration for a generic web service.
         
        .google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService generic_web_service = 3;
      • mergeGenericWebService

        public Fulfillment.Builder mergeGenericWebService​(Fulfillment.GenericWebService value)
         Configuration for a generic web service.
         
        .google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService generic_web_service = 3;
      • clearGenericWebService

        public Fulfillment.Builder clearGenericWebService()
         Configuration for a generic web service.
         
        .google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService generic_web_service = 3;
      • getGenericWebServiceBuilder

        public Fulfillment.GenericWebService.Builder getGenericWebServiceBuilder()
         Configuration for a generic web service.
         
        .google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService generic_web_service = 3;
      • getEnabled

        public boolean getEnabled()
         Whether fulfillment is enabled.
         
        bool enabled = 4;
        Specified by:
        getEnabled in interface FulfillmentOrBuilder
        Returns:
        The enabled.
      • setEnabled

        public Fulfillment.Builder setEnabled​(boolean value)
         Whether fulfillment is enabled.
         
        bool enabled = 4;
        Parameters:
        value - The enabled to set.
        Returns:
        This builder for chaining.
      • clearEnabled

        public Fulfillment.Builder clearEnabled()
         Whether fulfillment is enabled.
         
        bool enabled = 4;
        Returns:
        This builder for chaining.
      • getFeaturesCount

        public int getFeaturesCount()
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
        Specified by:
        getFeaturesCount in interface FulfillmentOrBuilder
      • getFeatures

        public Fulfillment.Feature getFeatures​(int index)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
        Specified by:
        getFeatures in interface FulfillmentOrBuilder
      • setFeatures

        public Fulfillment.Builder setFeatures​(int index,
                                               Fulfillment.Feature value)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • setFeatures

        public Fulfillment.Builder setFeatures​(int index,
                                               Fulfillment.Feature.Builder builderForValue)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • addFeatures

        public Fulfillment.Builder addFeatures​(Fulfillment.Feature value)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • addFeatures

        public Fulfillment.Builder addFeatures​(int index,
                                               Fulfillment.Feature value)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • addFeatures

        public Fulfillment.Builder addFeatures​(Fulfillment.Feature.Builder builderForValue)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • addFeatures

        public Fulfillment.Builder addFeatures​(int index,
                                               Fulfillment.Feature.Builder builderForValue)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • addAllFeatures

        public Fulfillment.Builder addAllFeatures​(Iterable<? extends Fulfillment.Feature> values)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • clearFeatures

        public Fulfillment.Builder clearFeatures()
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • removeFeatures

        public Fulfillment.Builder removeFeatures​(int index)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • getFeaturesBuilder

        public Fulfillment.Feature.Builder getFeaturesBuilder​(int index)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • addFeaturesBuilder

        public Fulfillment.Feature.Builder addFeaturesBuilder()
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • addFeaturesBuilder

        public Fulfillment.Feature.Builder addFeaturesBuilder​(int index)
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • getFeaturesBuilderList

        public List<Fulfillment.Feature.Builder> getFeaturesBuilderList()
         The field defines whether the fulfillment is enabled for certain features.
         
        repeated .google.cloud.dialogflow.v2beta1.Fulfillment.Feature features = 5;
      • setUnknownFields

        public final Fulfillment.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<Fulfillment.Builder>
      • mergeUnknownFields

        public final Fulfillment.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<Fulfillment.Builder>