Class Agent

  • All Implemented Interfaces:
    AgentOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Agent
    extends com.google.protobuf.GeneratedMessageV3
    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](https://cloud.google.com/dialogflow/docs/agents-overview).
     
    Protobuf type google.cloud.dialogflow.v2.Agent
    See Also:
    Serialized Form
    • Field Detail

      • DISPLAY_NAME_FIELD_NUMBER

        public static final int DISPLAY_NAME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DEFAULT_LANGUAGE_CODE_FIELD_NUMBER

        public static final int DEFAULT_LANGUAGE_CODE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SUPPORTED_LANGUAGE_CODES_FIELD_NUMBER

        public static final int SUPPORTED_LANGUAGE_CODES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DESCRIPTION_FIELD_NUMBER

        public static final int DESCRIPTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • AVATAR_URI_FIELD_NUMBER

        public static final int AVATAR_URI_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ENABLE_LOGGING_FIELD_NUMBER

        public static final int ENABLE_LOGGING_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MATCH_MODE_FIELD_NUMBER

        public static final int MATCH_MODE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CLASSIFICATION_THRESHOLD_FIELD_NUMBER

        public static final int CLASSIFICATION_THRESHOLD_FIELD_NUMBER
        See Also:
        Constant Field Values
      • API_VERSION_FIELD_NUMBER

        public static final int API_VERSION_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • getParent

        public String getParent()
         Required. The project of this agent.
         Format: `projects/<Project ID>`.
         
        string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getParent in interface AgentOrBuilder
        Returns:
        The parent.
      • getParentBytes

        public com.google.protobuf.ByteString getParentBytes()
         Required. The project of this agent.
         Format: `projects/<Project ID>`.
         
        string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getParentBytes in interface AgentOrBuilder
        Returns:
        The bytes for parent.
      • getDisplayName

        public String getDisplayName()
         Required. The name of this agent.
         
        string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDisplayName in interface AgentOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         Required. The name of this agent.
         
        string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDisplayNameBytes in interface AgentOrBuilder
        Returns:
        The bytes for displayName.
      • getDefaultLanguageCode

        public String getDefaultLanguageCode()
         Required. The default language of the agent as a language tag. See
         [Language
         Support](https://cloud.google.com/dialogflow/docs/reference/language)
         for a list of the currently supported language codes. This field cannot be
         set by the `Update` method.
         
        string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDefaultLanguageCode in interface AgentOrBuilder
        Returns:
        The defaultLanguageCode.
      • getDefaultLanguageCodeBytes

        public com.google.protobuf.ByteString getDefaultLanguageCodeBytes()
         Required. The default language of the agent as a language tag. See
         [Language
         Support](https://cloud.google.com/dialogflow/docs/reference/language)
         for a list of the currently supported language codes. This field cannot be
         set by the `Update` method.
         
        string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDefaultLanguageCodeBytes in interface AgentOrBuilder
        Returns:
        The bytes for defaultLanguageCode.
      • getSupportedLanguageCodesList

        public com.google.protobuf.ProtocolStringList getSupportedLanguageCodesList()
         Optional. The list of all languages supported by this agent (except for the
         `default_language_code`).
         
        repeated string supported_language_codes = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getSupportedLanguageCodesList in interface AgentOrBuilder
        Returns:
        A list containing the supportedLanguageCodes.
      • 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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getSupportedLanguageCodesCount in interface AgentOrBuilder
        Returns:
        The count of supportedLanguageCodes.
      • getSupportedLanguageCodes

        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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getSupportedLanguageCodes in interface AgentOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The supportedLanguageCodes at the given index.
      • getSupportedLanguageCodesBytes

        public com.google.protobuf.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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getSupportedLanguageCodesBytes in interface AgentOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the supportedLanguageCodes at the given index.
      • getTimeZone

        public String getTimeZone()
         Required. The time zone of this agent from the
         [time zone database](https://www.iana.org/time-zones), e.g.,
         America/New_York, Europe/Paris.
         
        string time_zone = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getTimeZone in interface AgentOrBuilder
        Returns:
        The timeZone.
      • getTimeZoneBytes

        public com.google.protobuf.ByteString getTimeZoneBytes()
         Required. The time zone of this agent from the
         [time zone database](https://www.iana.org/time-zones), e.g.,
         America/New_York, Europe/Paris.
         
        string time_zone = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getTimeZoneBytes in interface AgentOrBuilder
        Returns:
        The bytes for timeZone.
      • 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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescription in interface AgentOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Optional. The description of this agent.
         The maximum length is 500 characters. If exceeded, the request is rejected.
         
        string description = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescriptionBytes in interface AgentOrBuilder
        Returns:
        The bytes for description.
      • 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](https://cloud.google.com/dialogflow/docs/integrations/web-demo)
         integration.
         
        string avatar_uri = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getAvatarUri in interface AgentOrBuilder
        Returns:
        The avatarUri.
      • getAvatarUriBytes

        public com.google.protobuf.ByteString getAvatarUriBytes()
         Optional. The URI of the agent's avatar.
         Avatars are used throughout the Dialogflow console and in the self-hosted
         [Web
         Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo)
         integration.
         
        string avatar_uri = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getAvatarUriBytes in interface AgentOrBuilder
        Returns:
        The bytes for avatarUri.
      • getEnableLogging

        public boolean getEnableLogging()
         Optional. Determines whether this agent should log conversation queries.
         
        bool enable_logging = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getEnableLogging in interface AgentOrBuilder
        Returns:
        The enableLogging.
      • getMatchModeValue

        @Deprecated
        public int getMatchModeValue()
        Deprecated.
        google.cloud.dialogflow.v2.Agent.match_mode is deprecated. See google/cloud/dialogflow/v2/agent.proto;l=354
         Optional. Determines how intents are detected from user queries.
         
        .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMatchModeValue in interface AgentOrBuilder
        Returns:
        The enum numeric value on the wire for matchMode.
      • getMatchMode

        @Deprecated
        public Agent.MatchMode getMatchMode()
        Deprecated.
        google.cloud.dialogflow.v2.Agent.match_mode is deprecated. See google/cloud/dialogflow/v2/agent.proto;l=354
         Optional. Determines how intents are detected from user queries.
         
        .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMatchMode in interface AgentOrBuilder
        Returns:
        The matchMode.
      • 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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getClassificationThreshold in interface AgentOrBuilder
        Returns:
        The classificationThreshold.
      • 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.v2.Agent.ApiVersion api_version = 14 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getApiVersionValue in interface AgentOrBuilder
        Returns:
        The enum numeric value on the wire for apiVersion.
      • 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.v2.Agent.ApiVersion api_version = 14 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getApiVersion in interface AgentOrBuilder
        Returns:
        The apiVersion.
      • getTierValue

        public int getTierValue()
         Optional. The agent tier. If not specified, TIER_STANDARD is assumed.
         
        .google.cloud.dialogflow.v2.Agent.Tier tier = 15 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getTierValue in interface AgentOrBuilder
        Returns:
        The enum numeric value on the wire for tier.
      • getTier

        public Agent.Tier getTier()
         Optional. The agent tier. If not specified, TIER_STANDARD is assumed.
         
        .google.cloud.dialogflow.v2.Agent.Tier tier = 15 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getTier in interface AgentOrBuilder
        Returns:
        The tier.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Agent parseFrom​(ByteBuffer data)
                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Agent parseFrom​(ByteBuffer data,
                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Agent parseFrom​(com.google.protobuf.ByteString data)
                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Agent parseFrom​(com.google.protobuf.ByteString data,
                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Agent parseFrom​(byte[] data)
                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Agent parseFrom​(byte[] data,
                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Agent parseFrom​(com.google.protobuf.CodedInputStream input,
                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                               throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Agent.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Agent.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Agent.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Agent getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Agent> parser()
      • getParserForType

        public com.google.protobuf.Parser<Agent> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Agent getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder