Class Intent.Parameter.Builder (4.4.0)

public static final class Intent.Parameter.Builder extends GeneratedMessageV3.Builder<Intent.Parameter.Builder> implements Intent.ParameterOrBuilder

Represents intent parameters.

Protobuf type google.cloud.dialogflow.v2.Intent.Parameter

Methods

addAllPrompts(Iterable<String> values)

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];

Parameter
NameDescription
valuesIterable<String>

The prompts to add.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

addPrompts(String value)

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];

Parameter
NameDescription
valueString

The prompts to add.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

addPromptsBytes(ByteString value)

public Intent.Parameter.Builder addPromptsBytes(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];

Parameter
NameDescription
valueByteString

The bytes of the prompts to add.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Intent.Parameter.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Intent.Parameter.Builder
Overrides

build()

public Intent.Parameter build()
Returns
TypeDescription
Intent.Parameter

buildPartial()

public Intent.Parameter buildPartial()
Returns
TypeDescription
Intent.Parameter

clear()

public Intent.Parameter.Builder clear()
Returns
TypeDescription
Intent.Parameter.Builder
Overrides

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
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

clearDisplayName()

public Intent.Parameter.Builder clearDisplayName()

Required. The name of the parameter.

string display_name = 2;

Returns
TypeDescription
Intent.Parameter.Builder

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
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Intent.Parameter.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Intent.Parameter.Builder
Overrides

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
TypeDescription
Intent.Parameter.Builder

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
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

clearName()

public Intent.Parameter.Builder clearName()

The unique identifier of this parameter.

string name = 1;

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Intent.Parameter.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Intent.Parameter.Builder
Overrides

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
TypeDescription
Intent.Parameter.Builder

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
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

clone()

public Intent.Parameter.Builder clone()
Returns
TypeDescription
Intent.Parameter.Builder
Overrides

getDefaultInstanceForType()

public Intent.Parameter getDefaultInstanceForType()
Returns
TypeDescription
Intent.Parameter

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];

Returns
TypeDescription
String

The defaultValue.

getDefaultValueBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for defaultValue.

getDescriptor()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Required. The name of the parameter.

string display_name = 2;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The name of the parameter.

string display_name = 2;

Returns
TypeDescription
ByteString

The bytes for displayName.

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];

Returns
TypeDescription
String

The entityTypeDisplayName.

getEntityTypeDisplayNameBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for entityTypeDisplayName.

getIsList()

public boolean getIsList()

Optional. Indicates whether the parameter represents a list of values.

bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The isList.

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];

Returns
TypeDescription
boolean

The mandatory.

getName()

public String getName()

The unique identifier of this parameter.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The unique identifier of this parameter.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getPrompts(int index)

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];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The prompts at the given index.

getPromptsBytes(int index)

public 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];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the prompts at the given index.

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];

Returns
TypeDescription
int

The count of prompts.

getPromptsList()

public 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];

Returns
TypeDescription
ProtocolStringList

A list containing the prompts.

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];

Returns
TypeDescription
String

The value.

getValueBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for value.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Intent.Parameter other)

public Intent.Parameter.Builder mergeFrom(Intent.Parameter other)
Parameter
NameDescription
otherIntent.Parameter
Returns
TypeDescription
Intent.Parameter.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Intent.Parameter.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Intent.Parameter.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Intent.Parameter.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Intent.Parameter.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Intent.Parameter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Intent.Parameter.Builder
Overrides

setDefaultValue(String value)

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];

Parameter
NameDescription
valueString

The defaultValue to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setDefaultValueBytes(ByteString value)

public Intent.Parameter.Builder setDefaultValueBytes(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];

Parameter
NameDescription
valueByteString

The bytes for defaultValue to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setDisplayName(String value)

public Intent.Parameter.Builder setDisplayName(String value)

Required. The name of the parameter.

string display_name = 2;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Intent.Parameter.Builder setDisplayNameBytes(ByteString value)

Required. The name of the parameter.

string display_name = 2;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setEntityTypeDisplayName(String value)

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];

Parameter
NameDescription
valueString

The entityTypeDisplayName to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setEntityTypeDisplayNameBytes(ByteString value)

public Intent.Parameter.Builder setEntityTypeDisplayNameBytes(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];

Parameter
NameDescription
valueByteString

The bytes for entityTypeDisplayName to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Intent.Parameter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Intent.Parameter.Builder
Overrides

setIsList(boolean value)

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];

Parameter
NameDescription
valueboolean

The isList to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setMandatory(boolean value)

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];

Parameter
NameDescription
valueboolean

The mandatory to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setName(String value)

public Intent.Parameter.Builder setName(String value)

The unique identifier of this parameter.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Intent.Parameter.Builder setNameBytes(ByteString value)

The unique identifier of this parameter.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setPrompts(int index, String value)

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
NameDescription
indexint

The index to set the value at.

valueString

The prompts to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Intent.Parameter.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Intent.Parameter.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Intent.Parameter.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Intent.Parameter.Builder
Overrides

setValue(String value)

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];

Parameter
NameDescription
valueString

The value to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.

setValueBytes(ByteString value)

public Intent.Parameter.Builder setValueBytes(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];

Parameter
NameDescription
valueByteString

The bytes for value to set.

Returns
TypeDescription
Intent.Parameter.Builder

This builder for chaining.