Class Intent

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

    public final class Intent
    extends com.google.protobuf.GeneratedMessageV3
    implements IntentOrBuilder
     An intent represents a user's intent to interact with a conversational agent.
    
     You can provide information for the Dialogflow API to use to match user input
     to an intent by adding training phrases (i.e., examples of user input) to
     your intent.
     
    Protobuf type google.cloud.dialogflow.cx.v3.Intent
    See Also:
    Serialized Form
    • 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()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getName

        public String getName()
         The unique identifier of the intent.
         Required for the
         [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent]
         method.
         [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent]
         populates the name automatically.
         Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
         ID>/intents/<Intent ID>`.
         
        string name = 1;
        Specified by:
        getName in interface IntentOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The unique identifier of the intent.
         Required for the
         [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent]
         method.
         [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent]
         populates the name automatically.
         Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
         ID>/intents/<Intent ID>`.
         
        string name = 1;
        Specified by:
        getNameBytes in interface IntentOrBuilder
        Returns:
        The bytes for name.
      • getDisplayName

        public String getDisplayName()
         Required. The human-readable name of the intent, unique within the agent.
         
        string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDisplayName in interface IntentOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         Required. The human-readable name of the intent, unique within the agent.
         
        string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDisplayNameBytes in interface IntentOrBuilder
        Returns:
        The bytes for displayName.
      • getTrainingPhrasesList

        public List<Intent.TrainingPhrase> getTrainingPhrasesList()
         The collection of training phrases the agent is trained on to identify the
         intent.
         
        repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3;
        Specified by:
        getTrainingPhrasesList in interface IntentOrBuilder
      • getTrainingPhrasesCount

        public int getTrainingPhrasesCount()
         The collection of training phrases the agent is trained on to identify the
         intent.
         
        repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3;
        Specified by:
        getTrainingPhrasesCount in interface IntentOrBuilder
      • getTrainingPhrases

        public Intent.TrainingPhrase getTrainingPhrases​(int index)
         The collection of training phrases the agent is trained on to identify the
         intent.
         
        repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3;
        Specified by:
        getTrainingPhrases in interface IntentOrBuilder
      • getParametersList

        public List<Intent.Parameter> getParametersList()
         The collection of parameters associated with the intent.
         
        repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;
        Specified by:
        getParametersList in interface IntentOrBuilder
      • getParametersCount

        public int getParametersCount()
         The collection of parameters associated with the intent.
         
        repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;
        Specified by:
        getParametersCount in interface IntentOrBuilder
      • getParameters

        public Intent.Parameter getParameters​(int index)
         The collection of parameters associated with the intent.
         
        repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;
        Specified by:
        getParameters in interface IntentOrBuilder
      • getPriority

        public int getPriority()
         The priority of this intent. Higher numbers represent higher
         priorities.
        
         - If the supplied value is unspecified or 0, the service
           translates the value to 500,000, which corresponds to the
           `Normal` priority in the console.
         - If the supplied value is negative, the intent is ignored
           in runtime detect intent requests.
         
        int32 priority = 5;
        Specified by:
        getPriority in interface IntentOrBuilder
        Returns:
        The priority.
      • getIsFallback

        public boolean getIsFallback()
         Indicates whether this is a fallback intent. Currently only default
         fallback intent is allowed in the agent, which is added upon agent
         creation.
         Adding training phrases to fallback intent is useful in the case of
         requests that are mistakenly matched, since training phrases assigned to
         fallback intents act as negative examples that triggers no-match event.
         
        bool is_fallback = 6;
        Specified by:
        getIsFallback in interface IntentOrBuilder
        Returns:
        The isFallback.
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: IntentOrBuilder
         The key/value metadata to label an intent. Labels can contain
         lowercase letters, digits and the symbols '-' and '_'. International
         characters are allowed, including letters from unicase alphabets. Keys must
         start with a letter. Keys and values can be no longer than 63 characters
         and no more than 128 bytes.
        
         Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed
         Dialogflow defined labels include:
         * sys-head
         * sys-contextual
         The above labels do not require value. "sys-head" means the intent is a
         head intent. "sys.contextual" means the intent is a contextual intent.
         
        map<string, string> labels = 7;
        Specified by:
        getLabelsCount in interface IntentOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         The key/value metadata to label an intent. Labels can contain
         lowercase letters, digits and the symbols '-' and '_'. International
         characters are allowed, including letters from unicase alphabets. Keys must
         start with a letter. Keys and values can be no longer than 63 characters
         and no more than 128 bytes.
        
         Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed
         Dialogflow defined labels include:
         * sys-head
         * sys-contextual
         The above labels do not require value. "sys-head" means the intent is a
         head intent. "sys.contextual" means the intent is a contextual intent.
         
        map<string, string> labels = 7;
        Specified by:
        containsLabels in interface IntentOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         The key/value metadata to label an intent. Labels can contain
         lowercase letters, digits and the symbols '-' and '_'. International
         characters are allowed, including letters from unicase alphabets. Keys must
         start with a letter. Keys and values can be no longer than 63 characters
         and no more than 128 bytes.
        
         Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed
         Dialogflow defined labels include:
         * sys-head
         * sys-contextual
         The above labels do not require value. "sys-head" means the intent is a
         head intent. "sys.contextual" means the intent is a contextual intent.
         
        map<string, string> labels = 7;
        Specified by:
        getLabelsMap in interface IntentOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         The key/value metadata to label an intent. Labels can contain
         lowercase letters, digits and the symbols '-' and '_'. International
         characters are allowed, including letters from unicase alphabets. Keys must
         start with a letter. Keys and values can be no longer than 63 characters
         and no more than 128 bytes.
        
         Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed
         Dialogflow defined labels include:
         * sys-head
         * sys-contextual
         The above labels do not require value. "sys-head" means the intent is a
         head intent. "sys.contextual" means the intent is a contextual intent.
         
        map<string, string> labels = 7;
        Specified by:
        getLabelsOrDefault in interface IntentOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         The key/value metadata to label an intent. Labels can contain
         lowercase letters, digits and the symbols '-' and '_'. International
         characters are allowed, including letters from unicase alphabets. Keys must
         start with a letter. Keys and values can be no longer than 63 characters
         and no more than 128 bytes.
        
         Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed
         Dialogflow defined labels include:
         * sys-head
         * sys-contextual
         The above labels do not require value. "sys-head" means the intent is a
         head intent. "sys.contextual" means the intent is a contextual intent.
         
        map<string, string> labels = 7;
        Specified by:
        getLabelsOrThrow in interface IntentOrBuilder
      • getDescription

        public String getDescription()
         Human readable description for better understanding an intent like its
         scope, content, result etc. Maximum character limit: 140 characters.
         
        string description = 8;
        Specified by:
        getDescription in interface IntentOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Human readable description for better understanding an intent like its
         scope, content, result etc. Maximum character limit: 140 characters.
         
        string description = 8;
        Specified by:
        getDescriptionBytes in interface IntentOrBuilder
        Returns:
        The bytes for description.
      • 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 Intent parseFrom​(ByteBuffer data)
                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public static Intent getDefaultInstance()
      • parser

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

        public com.google.protobuf.Parser<Intent> 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 Intent getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder