Class Agent.Builder (4.61.0)

public static final class Agent.Builder extends GeneratedMessageV3.Builder<Agent.Builder> implements AgentOrBuilder

A Dialogflow agent is a virtual agent that handles conversations with your end-users. It is a natural language understanding module that understands the nuances of human language. Dialogflow translates end-user text or audio during a conversation to structured data that your apps and services can understand. You design and build a Dialogflow agent to handle the types of conversations required for your system.

For more information about agents, see the Agent guide.

Protobuf type google.cloud.dialogflow.v2beta1.Agent

Implements

AgentOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllSupportedLanguageCodes(Iterable<String> values)

public Agent.Builder addAllSupportedLanguageCodes(Iterable<String> values)

Optional. The list of all languages supported by this agent (except for the default_language_code).

repeated string supported_language_codes = 4;

Parameter
Name Description
values Iterable<String>

The supportedLanguageCodes to add.

Returns
Type Description
Agent.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addSupportedLanguageCodes(String value)

public Agent.Builder addSupportedLanguageCodes(String value)

Optional. The list of all languages supported by this agent (except for the default_language_code).

repeated string supported_language_codes = 4;

Parameter
Name Description
value String

The supportedLanguageCodes to add.

Returns
Type Description
Agent.Builder

This builder for chaining.

addSupportedLanguageCodesBytes(ByteString value)

public Agent.Builder addSupportedLanguageCodesBytes(ByteString value)

Optional. The list of all languages supported by this agent (except for the default_language_code).

repeated string supported_language_codes = 4;

Parameter
Name Description
value ByteString

The bytes of the supportedLanguageCodes to add.

Returns
Type Description
Agent.Builder

This builder for chaining.

build()

public Agent build()
Returns
Type Description
Agent

buildPartial()

public Agent buildPartial()
Returns
Type Description
Agent

clear()

public Agent.Builder clear()
Returns
Type Description
Agent.Builder
Overrides

clearApiVersion()

public Agent.Builder clearApiVersion()

Optional. API version displayed in Dialogflow console. If not specified, V2 API is assumed. Clients are free to query different service endpoints for different API versions. However, bots connectors and webhook calls will follow the specified API version.

.google.cloud.dialogflow.v2beta1.Agent.ApiVersion api_version = 14;

Returns
Type Description
Agent.Builder

This builder for chaining.

clearAvatarUri()

public Agent.Builder clearAvatarUri()

Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.

string avatar_uri = 7;

Returns
Type Description
Agent.Builder

This builder for chaining.

clearClassificationThreshold()

public Agent.Builder clearClassificationThreshold()

Optional. To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.

float classification_threshold = 10;

Returns
Type Description
Agent.Builder

This builder for chaining.

clearDefaultLanguageCode()

public Agent.Builder clearDefaultLanguageCode()

Required. The default language of the agent as a language tag. See Language Support for a list of the currently supported language codes. This field cannot be set by the Update method.

string default_language_code = 3;

Returns
Type Description
Agent.Builder

This builder for chaining.

clearDescription()

public Agent.Builder clearDescription()

Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.

string description = 6;

Returns
Type Description
Agent.Builder

This builder for chaining.

clearDisplayName()

public Agent.Builder clearDisplayName()

Required. The name of this agent.

string display_name = 2;

Returns
Type Description
Agent.Builder

This builder for chaining.

clearEnableLogging()

public Agent.Builder clearEnableLogging()

Optional. Determines whether this agent should log conversation queries.

bool enable_logging = 8;

Returns
Type Description
Agent.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Agent.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Agent.Builder
Overrides

clearMatchMode() (deprecated)

public Agent.Builder clearMatchMode()

Deprecated. google.cloud.dialogflow.v2beta1.Agent.match_mode is deprecated. See google/cloud/dialogflow/v2beta1/agent.proto;l=355

Optional. Determines how intents are detected from user queries.

.google.cloud.dialogflow.v2beta1.Agent.MatchMode match_mode = 9 [deprecated = true];

Returns
Type Description
Agent.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Agent.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Agent.Builder
Overrides

clearParent()

public Agent.Builder clearParent()

Required. The project of this agent. Format: projects/<Project ID> or projects/<Project ID>/locations/<Location ID>

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
Agent.Builder

This builder for chaining.

clearSupportedLanguageCodes()

public Agent.Builder clearSupportedLanguageCodes()

Optional. The list of all languages supported by this agent (except for the default_language_code).

repeated string supported_language_codes = 4;

Returns
Type Description
Agent.Builder

This builder for chaining.

clearTier()

public Agent.Builder clearTier()

Optional. The agent tier. If not specified, TIER_STANDARD is assumed.

.google.cloud.dialogflow.v2beta1.Agent.Tier tier = 15;

Returns
Type Description
Agent.Builder

This builder for chaining.

clearTimeZone()

public Agent.Builder clearTimeZone()

Required. The time zone of this agent from the time zone database, e.g., America/New_York, Europe/Paris.

string time_zone = 5;

Returns
Type Description
Agent.Builder

This builder for chaining.

clone()

public Agent.Builder clone()
Returns
Type Description
Agent.Builder
Overrides

getApiVersion()

public Agent.ApiVersion getApiVersion()

Optional. API version displayed in Dialogflow console. If not specified, V2 API is assumed. Clients are free to query different service endpoints for different API versions. However, bots connectors and webhook calls will follow the specified API version.

.google.cloud.dialogflow.v2beta1.Agent.ApiVersion api_version = 14;

Returns
Type Description
Agent.ApiVersion

The apiVersion.

getApiVersionValue()

public int getApiVersionValue()

Optional. API version displayed in Dialogflow console. If not specified, V2 API is assumed. Clients are free to query different service endpoints for different API versions. However, bots connectors and webhook calls will follow the specified API version.

.google.cloud.dialogflow.v2beta1.Agent.ApiVersion api_version = 14;

Returns
Type Description
int

The enum numeric value on the wire for apiVersion.

getAvatarUri()

public String getAvatarUri()

Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.

string avatar_uri = 7;

Returns
Type Description
String

The avatarUri.

getAvatarUriBytes()

public ByteString getAvatarUriBytes()

Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.

string avatar_uri = 7;

Returns
Type Description
ByteString

The bytes for avatarUri.

getClassificationThreshold()

public float getClassificationThreshold()

Optional. To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.

float classification_threshold = 10;

Returns
Type Description
float

The classificationThreshold.

getDefaultInstanceForType()

public Agent getDefaultInstanceForType()
Returns
Type Description
Agent

getDefaultLanguageCode()

public String getDefaultLanguageCode()

Required. The default language of the agent as a language tag. See Language Support for a list of the currently supported language codes. This field cannot be set by the Update method.

string default_language_code = 3;

Returns
Type Description
String

The defaultLanguageCode.

getDefaultLanguageCodeBytes()

public ByteString getDefaultLanguageCodeBytes()

Required. The default language of the agent as a language tag. See Language Support for a list of the currently supported language codes. This field cannot be set by the Update method.

string default_language_code = 3;

Returns
Type Description
ByteString

The bytes for defaultLanguageCode.

getDescription()

public String getDescription()

Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.

string description = 6;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.

string description = 6;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. The name of this agent.

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The name of this agent.

string display_name = 2;

Returns
Type Description
ByteString

The bytes for displayName.

getEnableLogging()

public boolean getEnableLogging()

Optional. Determines whether this agent should log conversation queries.

bool enable_logging = 8;

Returns
Type Description
boolean

The enableLogging.

getMatchMode() (deprecated)

public Agent.MatchMode getMatchMode()

Deprecated. google.cloud.dialogflow.v2beta1.Agent.match_mode is deprecated. See google/cloud/dialogflow/v2beta1/agent.proto;l=355

Optional. Determines how intents are detected from user queries.

.google.cloud.dialogflow.v2beta1.Agent.MatchMode match_mode = 9 [deprecated = true];

Returns
Type Description
Agent.MatchMode

The matchMode.

getMatchModeValue() (deprecated)

public int getMatchModeValue()

Deprecated. google.cloud.dialogflow.v2beta1.Agent.match_mode is deprecated. See google/cloud/dialogflow/v2beta1/agent.proto;l=355

Optional. Determines how intents are detected from user queries.

.google.cloud.dialogflow.v2beta1.Agent.MatchMode match_mode = 9 [deprecated = true];

Returns
Type Description
int

The enum numeric value on the wire for matchMode.

getParent()

public String getParent()

Required. The project of this agent. Format: projects/<Project ID> or projects/<Project ID>/locations/<Location ID>

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The project of this agent. Format: projects/<Project ID> or projects/<Project ID>/locations/<Location ID>

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

getSupportedLanguageCodes(int index)

public String getSupportedLanguageCodes(int index)

Optional. The list of all languages supported by this agent (except for the default_language_code).

repeated string supported_language_codes = 4;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The supportedLanguageCodes at the given index.

getSupportedLanguageCodesBytes(int index)

public ByteString getSupportedLanguageCodesBytes(int index)

Optional. The list of all languages supported by this agent (except for the default_language_code).

repeated string supported_language_codes = 4;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the supportedLanguageCodes at the given index.

getSupportedLanguageCodesCount()

public int getSupportedLanguageCodesCount()

Optional. The list of all languages supported by this agent (except for the default_language_code).

repeated string supported_language_codes = 4;

Returns
Type Description
int

The count of supportedLanguageCodes.

getSupportedLanguageCodesList()

public ProtocolStringList getSupportedLanguageCodesList()

Optional. The list of all languages supported by this agent (except for the default_language_code).

repeated string supported_language_codes = 4;

Returns
Type Description
ProtocolStringList

A list containing the supportedLanguageCodes.

getTier()

public Agent.Tier getTier()

Optional. The agent tier. If not specified, TIER_STANDARD is assumed.

.google.cloud.dialogflow.v2beta1.Agent.Tier tier = 15;

Returns
Type Description
Agent.Tier

The tier.

getTierValue()

public int getTierValue()

Optional. The agent tier. If not specified, TIER_STANDARD is assumed.

.google.cloud.dialogflow.v2beta1.Agent.Tier tier = 15;

Returns
Type Description
int

The enum numeric value on the wire for tier.

getTimeZone()

public String getTimeZone()

Required. The time zone of this agent from the time zone database, e.g., America/New_York, Europe/Paris.

string time_zone = 5;

Returns
Type Description
String

The timeZone.

getTimeZoneBytes()

public ByteString getTimeZoneBytes()

Required. The time zone of this agent from the time zone database, e.g., America/New_York, Europe/Paris.

string time_zone = 5;

Returns
Type Description
ByteString

The bytes for timeZone.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Agent other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Agent.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Agent.Builder
Overrides

setApiVersion(Agent.ApiVersion value)

public Agent.Builder setApiVersion(Agent.ApiVersion value)

Optional. API version displayed in Dialogflow console. If not specified, V2 API is assumed. Clients are free to query different service endpoints for different API versions. However, bots connectors and webhook calls will follow the specified API version.

.google.cloud.dialogflow.v2beta1.Agent.ApiVersion api_version = 14;

Parameter
Name Description
value Agent.ApiVersion

The apiVersion to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setApiVersionValue(int value)

public Agent.Builder setApiVersionValue(int value)

Optional. API version displayed in Dialogflow console. If not specified, V2 API is assumed. Clients are free to query different service endpoints for different API versions. However, bots connectors and webhook calls will follow the specified API version.

.google.cloud.dialogflow.v2beta1.Agent.ApiVersion api_version = 14;

Parameter
Name Description
value int

The enum numeric value on the wire for apiVersion to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setAvatarUri(String value)

public Agent.Builder setAvatarUri(String value)

Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.

string avatar_uri = 7;

Parameter
Name Description
value String

The avatarUri to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setAvatarUriBytes(ByteString value)

public Agent.Builder setAvatarUriBytes(ByteString value)

Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.

string avatar_uri = 7;

Parameter
Name Description
value ByteString

The bytes for avatarUri to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setClassificationThreshold(float value)

public Agent.Builder setClassificationThreshold(float value)

Optional. To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.

float classification_threshold = 10;

Parameter
Name Description
value float

The classificationThreshold to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setDefaultLanguageCode(String value)

public Agent.Builder setDefaultLanguageCode(String value)

Required. The default language of the agent as a language tag. See Language Support for a list of the currently supported language codes. This field cannot be set by the Update method.

string default_language_code = 3;

Parameter
Name Description
value String

The defaultLanguageCode to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setDefaultLanguageCodeBytes(ByteString value)

public Agent.Builder setDefaultLanguageCodeBytes(ByteString value)

Required. The default language of the agent as a language tag. See Language Support for a list of the currently supported language codes. This field cannot be set by the Update method.

string default_language_code = 3;

Parameter
Name Description
value ByteString

The bytes for defaultLanguageCode to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setDescription(String value)

public Agent.Builder setDescription(String value)

Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.

string description = 6;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Agent.Builder setDescriptionBytes(ByteString value)

Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.

string description = 6;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setDisplayName(String value)

public Agent.Builder setDisplayName(String value)

Required. The name of this agent.

string display_name = 2;

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Agent.Builder setDisplayNameBytes(ByteString value)

Required. The name of this agent.

string display_name = 2;

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setEnableLogging(boolean value)

public Agent.Builder setEnableLogging(boolean value)

Optional. Determines whether this agent should log conversation queries.

bool enable_logging = 8;

Parameter
Name Description
value boolean

The enableLogging to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Agent.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Agent.Builder
Overrides

setMatchMode(Agent.MatchMode value) (deprecated)

public Agent.Builder setMatchMode(Agent.MatchMode value)

Deprecated. google.cloud.dialogflow.v2beta1.Agent.match_mode is deprecated. See google/cloud/dialogflow/v2beta1/agent.proto;l=355

Optional. Determines how intents are detected from user queries.

.google.cloud.dialogflow.v2beta1.Agent.MatchMode match_mode = 9 [deprecated = true];

Parameter
Name Description
value Agent.MatchMode

The matchMode to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setMatchModeValue(int value) (deprecated)

public Agent.Builder setMatchModeValue(int value)

Deprecated. google.cloud.dialogflow.v2beta1.Agent.match_mode is deprecated. See google/cloud/dialogflow/v2beta1/agent.proto;l=355

Optional. Determines how intents are detected from user queries.

.google.cloud.dialogflow.v2beta1.Agent.MatchMode match_mode = 9 [deprecated = true];

Parameter
Name Description
value int

The enum numeric value on the wire for matchMode to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setParent(String value)

public Agent.Builder setParent(String value)

Required. The project of this agent. Format: projects/<Project ID> or projects/<Project ID>/locations/<Location ID>

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setParentBytes(ByteString value)

public Agent.Builder setParentBytes(ByteString value)

Required. The project of this agent. Format: projects/<Project ID> or projects/<Project ID>/locations/<Location ID>

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

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

public Agent.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Agent.Builder
Overrides

setSupportedLanguageCodes(int index, String value)

public Agent.Builder setSupportedLanguageCodes(int index, String value)

Optional. The list of all languages supported by this agent (except for the default_language_code).

repeated string supported_language_codes = 4;

Parameters
Name Description
index int

The index to set the value at.

value String

The supportedLanguageCodes to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setTier(Agent.Tier value)

public Agent.Builder setTier(Agent.Tier value)

Optional. The agent tier. If not specified, TIER_STANDARD is assumed.

.google.cloud.dialogflow.v2beta1.Agent.Tier tier = 15;

Parameter
Name Description
value Agent.Tier

The tier to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setTierValue(int value)

public Agent.Builder setTierValue(int value)

Optional. The agent tier. If not specified, TIER_STANDARD is assumed.

.google.cloud.dialogflow.v2beta1.Agent.Tier tier = 15;

Parameter
Name Description
value int

The enum numeric value on the wire for tier to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setTimeZone(String value)

public Agent.Builder setTimeZone(String value)

Required. The time zone of this agent from the time zone database, e.g., America/New_York, Europe/Paris.

string time_zone = 5;

Parameter
Name Description
value String

The timeZone to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setTimeZoneBytes(ByteString value)

public Agent.Builder setTimeZoneBytes(ByteString value)

Required. The time zone of this agent from the time zone database, e.g., America/New_York, Europe/Paris.

string time_zone = 5;

Parameter
Name Description
value ByteString

The bytes for timeZone to set.

Returns
Type Description
Agent.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Agent.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Agent.Builder
Overrides