Class Intent.Parameter.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Intent.Parameter.Builder>
com.google.cloud.dialogflow.v2.Intent.Parameter.Builder
All Implemented Interfaces:
Intent.ParameterOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Intent.Parameter

public static final class Intent.Parameter.Builder extends com.google.protobuf.GeneratedMessage.Builder<Intent.Parameter.Builder> implements Intent.ParameterOrBuilder
 Represents intent parameters.
 
Protobuf type google.cloud.dialogflow.v2.Intent.Parameter
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Intent.Parameter.Builder>
    • clear

      public Intent.Parameter.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.GeneratedMessage.Builder<Intent.Parameter.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.GeneratedMessage.Builder<Intent.Parameter.Builder>
    • getDefaultInstanceForType

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

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

      public Intent.Parameter buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

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

      public Intent.Parameter.Builder mergeFrom(Intent.Parameter other)
    • isInitialized

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

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

      public String getName()
       The unique identifier of this parameter.
       
      string name = 1;
      Specified by:
      getName in interface Intent.ParameterOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The unique identifier of this parameter.
       
      string name = 1;
      Specified by:
      getNameBytes in interface Intent.ParameterOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Intent.Parameter.Builder setName(String value)
       The unique identifier of this parameter.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Intent.Parameter.Builder clearName()
       The unique identifier of this parameter.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Intent.Parameter.Builder setNameBytes(com.google.protobuf.ByteString value)
       The unique identifier of this parameter.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Required. The name of the parameter.
       
      string display_name = 2;
      Specified by:
      getDisplayName in interface Intent.ParameterOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. The name of the parameter.
       
      string display_name = 2;
      Specified by:
      getDisplayNameBytes in interface Intent.ParameterOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public Intent.Parameter.Builder setDisplayName(String value)
       Required. The name of the parameter.
       
      string display_name = 2;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public Intent.Parameter.Builder clearDisplayName()
       Required. The name of the parameter.
       
      string display_name = 2;
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public Intent.Parameter.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Required. The name of the parameter.
       
      string display_name = 2;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getValue

      public String getValue()
       Optional. The definition of the parameter value. It can be:
      
       - a constant string,
       - a parameter value defined as `$parameter_name`,
       - an original parameter value defined as `$parameter_name.original`,
       - a parameter value from some context defined as
       `#context_name.parameter_name`.
       
      string value = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getValue in interface Intent.ParameterOrBuilder
      Returns:
      The value.
    • getValueBytes

      public com.google.protobuf.ByteString getValueBytes()
       Optional. The definition of the parameter value. It can be:
      
       - a constant string,
       - a parameter value defined as `$parameter_name`,
       - an original parameter value defined as `$parameter_name.original`,
       - a parameter value from some context defined as
       `#context_name.parameter_name`.
       
      string value = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getValueBytes in interface Intent.ParameterOrBuilder
      Returns:
      The bytes for value.
    • setValue

      public Intent.Parameter.Builder setValue(String value)
       Optional. The definition of the parameter value. It can be:
      
       - a constant string,
       - a parameter value defined as `$parameter_name`,
       - an original parameter value defined as `$parameter_name.original`,
       - a parameter value from some context defined as
       `#context_name.parameter_name`.
       
      string value = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The value to set.
      Returns:
      This builder for chaining.
    • clearValue

      public Intent.Parameter.Builder clearValue()
       Optional. The definition of the parameter value. It can be:
      
       - a constant string,
       - a parameter value defined as `$parameter_name`,
       - an original parameter value defined as `$parameter_name.original`,
       - a parameter value from some context defined as
       `#context_name.parameter_name`.
       
      string value = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setValueBytes

      public Intent.Parameter.Builder setValueBytes(com.google.protobuf.ByteString value)
       Optional. The definition of the parameter value. It can be:
      
       - a constant string,
       - a parameter value defined as `$parameter_name`,
       - an original parameter value defined as `$parameter_name.original`,
       - a parameter value from some context defined as
       `#context_name.parameter_name`.
       
      string value = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for value to set.
      Returns:
      This builder for chaining.
    • getDefaultValue

      public String getDefaultValue()
       Optional. The default value to use when the `value` yields an empty
       result.
       Default values can be extracted from contexts by using the following
       syntax: `#context_name.parameter_name`.
       
      string default_value = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDefaultValue in interface Intent.ParameterOrBuilder
      Returns:
      The defaultValue.
    • getDefaultValueBytes

      public com.google.protobuf.ByteString getDefaultValueBytes()
       Optional. The default value to use when the `value` yields an empty
       result.
       Default values can be extracted from contexts by using the following
       syntax: `#context_name.parameter_name`.
       
      string default_value = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDefaultValueBytes in interface Intent.ParameterOrBuilder
      Returns:
      The bytes for defaultValue.
    • setDefaultValue

      public Intent.Parameter.Builder setDefaultValue(String value)
       Optional. The default value to use when the `value` yields an empty
       result.
       Default values can be extracted from contexts by using the following
       syntax: `#context_name.parameter_name`.
       
      string default_value = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The defaultValue to set.
      Returns:
      This builder for chaining.
    • clearDefaultValue

      public Intent.Parameter.Builder clearDefaultValue()
       Optional. The default value to use when the `value` yields an empty
       result.
       Default values can be extracted from contexts by using the following
       syntax: `#context_name.parameter_name`.
       
      string default_value = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDefaultValueBytes

      public Intent.Parameter.Builder setDefaultValueBytes(com.google.protobuf.ByteString value)
       Optional. The default value to use when the `value` yields an empty
       result.
       Default values can be extracted from contexts by using the following
       syntax: `#context_name.parameter_name`.
       
      string default_value = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for defaultValue to set.
      Returns:
      This builder for chaining.
    • getEntityTypeDisplayName

      public String getEntityTypeDisplayName()
       Optional. The name of the entity type, prefixed with `@`, that
       describes values of the parameter. If the parameter is
       required, this must be provided.
       
      string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntityTypeDisplayName in interface Intent.ParameterOrBuilder
      Returns:
      The entityTypeDisplayName.
    • getEntityTypeDisplayNameBytes

      public com.google.protobuf.ByteString getEntityTypeDisplayNameBytes()
       Optional. The name of the entity type, prefixed with `@`, that
       describes values of the parameter. If the parameter is
       required, this must be provided.
       
      string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntityTypeDisplayNameBytes in interface Intent.ParameterOrBuilder
      Returns:
      The bytes for entityTypeDisplayName.
    • setEntityTypeDisplayName

      public Intent.Parameter.Builder setEntityTypeDisplayName(String value)
       Optional. The name of the entity type, prefixed with `@`, that
       describes values of the parameter. If the parameter is
       required, this must be provided.
       
      string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The entityTypeDisplayName to set.
      Returns:
      This builder for chaining.
    • clearEntityTypeDisplayName

      public Intent.Parameter.Builder clearEntityTypeDisplayName()
       Optional. The name of the entity type, prefixed with `@`, that
       describes values of the parameter. If the parameter is
       required, this must be provided.
       
      string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setEntityTypeDisplayNameBytes

      public Intent.Parameter.Builder setEntityTypeDisplayNameBytes(com.google.protobuf.ByteString value)
       Optional. The name of the entity type, prefixed with `@`, that
       describes values of the parameter. If the parameter is
       required, this must be provided.
       
      string entity_type_display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for entityTypeDisplayName to set.
      Returns:
      This builder for chaining.
    • getMandatory

      public boolean getMandatory()
       Optional. Indicates whether the parameter is required. That is,
       whether the intent cannot be completed without collecting the parameter
       value.
       
      bool mandatory = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMandatory in interface Intent.ParameterOrBuilder
      Returns:
      The mandatory.
    • setMandatory

      public Intent.Parameter.Builder setMandatory(boolean value)
       Optional. Indicates whether the parameter is required. That is,
       whether the intent cannot be completed without collecting the parameter
       value.
       
      bool mandatory = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The mandatory to set.
      Returns:
      This builder for chaining.
    • clearMandatory

      public Intent.Parameter.Builder clearMandatory()
       Optional. Indicates whether the parameter is required. That is,
       whether the intent cannot be completed without collecting the parameter
       value.
       
      bool mandatory = 6 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getPromptsList

      public com.google.protobuf.ProtocolStringList getPromptsList()
       Optional. The collection of prompts that the agent can present to the
       user in order to collect a value for the parameter.
       
      repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPromptsList in interface Intent.ParameterOrBuilder
      Returns:
      A list containing the prompts.
    • getPromptsCount

      public int getPromptsCount()
       Optional. The collection of prompts that the agent can present to the
       user in order to collect a value for the parameter.
       
      repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPromptsCount in interface Intent.ParameterOrBuilder
      Returns:
      The count of prompts.
    • getPrompts

      public String getPrompts(int index)
       Optional. The collection of prompts that the agent can present to the
       user in order to collect a value for the parameter.
       
      repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPrompts in interface Intent.ParameterOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The prompts at the given index.
    • getPromptsBytes

      public com.google.protobuf.ByteString getPromptsBytes(int index)
       Optional. The collection of prompts that the agent can present to the
       user in order to collect a value for the parameter.
       
      repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPromptsBytes in interface Intent.ParameterOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the prompts at the given index.
    • setPrompts

      public Intent.Parameter.Builder setPrompts(int index, String value)
       Optional. The collection of prompts that the agent can present to the
       user in order to collect a value for the parameter.
       
      repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      index - The index to set the value at.
      value - The prompts to set.
      Returns:
      This builder for chaining.
    • addPrompts

      public Intent.Parameter.Builder addPrompts(String value)
       Optional. The collection of prompts that the agent can present to the
       user in order to collect a value for the parameter.
       
      repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The prompts to add.
      Returns:
      This builder for chaining.
    • addAllPrompts

      public Intent.Parameter.Builder addAllPrompts(Iterable<String> values)
       Optional. The collection of prompts that the agent can present to the
       user in order to collect a value for the parameter.
       
      repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      values - The prompts to add.
      Returns:
      This builder for chaining.
    • clearPrompts

      public Intent.Parameter.Builder clearPrompts()
       Optional. The collection of prompts that the agent can present to the
       user in order to collect a value for the parameter.
       
      repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • addPromptsBytes

      public Intent.Parameter.Builder addPromptsBytes(com.google.protobuf.ByteString value)
       Optional. The collection of prompts that the agent can present to the
       user in order to collect a value for the parameter.
       
      repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes of the prompts to add.
      Returns:
      This builder for chaining.
    • getIsList

      public boolean getIsList()
       Optional. Indicates whether the parameter represents a list of values.
       
      bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getIsList in interface Intent.ParameterOrBuilder
      Returns:
      The isList.
    • setIsList

      public Intent.Parameter.Builder setIsList(boolean value)
       Optional. Indicates whether the parameter represents a list of values.
       
      bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The isList to set.
      Returns:
      This builder for chaining.
    • clearIsList

      public Intent.Parameter.Builder clearIsList()
       Optional. Indicates whether the parameter represents a list of values.
       
      bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.