Class Intent.Parameter.Builder (4.51.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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

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
Name Description
values Iterable<String>

The prompts to add.

Returns
Type Description
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
Name Description
value String

The prompts to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the prompts to add.

Returns
Type Description
Intent.Parameter.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Intent.Parameter.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Intent.Parameter.Builder
Overrides

build()

public Intent.Parameter build()
Returns
Type Description
Intent.Parameter

buildPartial()

public Intent.Parameter buildPartial()
Returns
Type Description
Intent.Parameter

clear()

public Intent.Parameter.Builder clear()
Returns
Type Description
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
Type Description
Intent.Parameter.Builder

This builder for chaining.

clearDisplayName()

public Intent.Parameter.Builder clearDisplayName()

Required. The name of the parameter.

string display_name = 2;

Returns
Type Description
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
Type Description
Intent.Parameter.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Intent.Parameter.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
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
Type Description
Intent.Parameter.Builder

This builder for chaining.

clearName()

public Intent.Parameter.Builder clearName()

The unique identifier of this parameter.

string name = 1;

Returns
Type Description
Intent.Parameter.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Intent.Parameter.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
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
Type Description
Intent.Parameter.Builder

This builder for chaining.

clone()

public Intent.Parameter.Builder clone()
Returns
Type Description
Intent.Parameter.Builder
Overrides

getDefaultInstanceForType()

public Intent.Parameter getDefaultInstanceForType()
Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for defaultValue.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Required. The name of the parameter.

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The name of the parameter.

string display_name = 2;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

The mandatory.

getName()

public String getName()

The unique identifier of this parameter.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The unique identifier of this parameter.

string name = 1;

Returns
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for value.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Intent.Parameter other)

public Intent.Parameter.Builder mergeFrom(Intent.Parameter other)
Parameter
Name Description
other Intent.Parameter
Returns
Type Description
Intent.Parameter.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Intent.Parameter.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Intent.Parameter.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Intent.Parameter.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Intent.Parameter.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Intent.Parameter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value String

The defaultValue to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for defaultValue to set.

Returns
Type Description
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
Name Description
value String

The displayName to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
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
Name Description
value String

The entityTypeDisplayName to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for entityTypeDisplayName to set.

Returns
Type Description
Intent.Parameter.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Intent.Parameter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value boolean

The isList to set.

Returns
Type Description
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
Name Description
value boolean

The mandatory to set.

Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The prompts to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Intent.Parameter.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Intent.Parameter.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value String

The value to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
Intent.Parameter.Builder

This builder for chaining.