Class Intent.TrainingPhrase

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase
All Implemented Interfaces:
Intent.TrainingPhraseOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
Intent

public static final class Intent.TrainingPhrase extends com.google.protobuf.GeneratedMessage implements Intent.TrainingPhraseOrBuilder
 Represents an example that the agent is trained on.
 
Protobuf type google.cloud.dialogflow.v2.Intent.TrainingPhrase
See Also:
  • Field Details

  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

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

      public String getName()
       Output only. The unique identifier of this training phrase.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface Intent.TrainingPhraseOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. The unique identifier of this training phrase.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface Intent.TrainingPhraseOrBuilder
      Returns:
      The bytes for name.
    • getTypeValue

      public int getTypeValue()
       Required. The type of the training phrase.
       
      .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTypeValue in interface Intent.TrainingPhraseOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • getType

      public Intent.TrainingPhrase.Type getType()
       Required. The type of the training phrase.
       
      .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getType in interface Intent.TrainingPhraseOrBuilder
      Returns:
      The type.
    • getPartsList

      public List<Intent.TrainingPhrase.Part> getPartsList()
       Required. The ordered list of training phrase parts.
       The parts are concatenated in order to form the training phrase.
      
       Note: The API does not automatically annotate training phrases like the
       Dialogflow Console does.
      
       Note: Do not forget to include whitespace at part boundaries,
       so the training phrase is well formatted when the parts are concatenated.
      
       If the training phrase does not need to be annotated with parameters,
       you just need a single part with only the
       [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
       field set.
      
       If you want to annotate the training phrase, you must create multiple
       parts, where the fields of each part are populated in one of two ways:
      
       -   `Part.text` is set to a part of the phrase that has no parameters.
       -   `Part.text` is set to a part of the phrase that you want to annotate,
       and the `entity_type`, `alias`, and `user_defined` fields are all
       set.
       
      repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPartsList in interface Intent.TrainingPhraseOrBuilder
    • getPartsOrBuilderList

      public List<? extends Intent.TrainingPhrase.PartOrBuilder> getPartsOrBuilderList()
       Required. The ordered list of training phrase parts.
       The parts are concatenated in order to form the training phrase.
      
       Note: The API does not automatically annotate training phrases like the
       Dialogflow Console does.
      
       Note: Do not forget to include whitespace at part boundaries,
       so the training phrase is well formatted when the parts are concatenated.
      
       If the training phrase does not need to be annotated with parameters,
       you just need a single part with only the
       [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
       field set.
      
       If you want to annotate the training phrase, you must create multiple
       parts, where the fields of each part are populated in one of two ways:
      
       -   `Part.text` is set to a part of the phrase that has no parameters.
       -   `Part.text` is set to a part of the phrase that you want to annotate,
       and the `entity_type`, `alias`, and `user_defined` fields are all
       set.
       
      repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPartsOrBuilderList in interface Intent.TrainingPhraseOrBuilder
    • getPartsCount

      public int getPartsCount()
       Required. The ordered list of training phrase parts.
       The parts are concatenated in order to form the training phrase.
      
       Note: The API does not automatically annotate training phrases like the
       Dialogflow Console does.
      
       Note: Do not forget to include whitespace at part boundaries,
       so the training phrase is well formatted when the parts are concatenated.
      
       If the training phrase does not need to be annotated with parameters,
       you just need a single part with only the
       [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
       field set.
      
       If you want to annotate the training phrase, you must create multiple
       parts, where the fields of each part are populated in one of two ways:
      
       -   `Part.text` is set to a part of the phrase that has no parameters.
       -   `Part.text` is set to a part of the phrase that you want to annotate,
       and the `entity_type`, `alias`, and `user_defined` fields are all
       set.
       
      repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPartsCount in interface Intent.TrainingPhraseOrBuilder
    • getParts

      public Intent.TrainingPhrase.Part getParts(int index)
       Required. The ordered list of training phrase parts.
       The parts are concatenated in order to form the training phrase.
      
       Note: The API does not automatically annotate training phrases like the
       Dialogflow Console does.
      
       Note: Do not forget to include whitespace at part boundaries,
       so the training phrase is well formatted when the parts are concatenated.
      
       If the training phrase does not need to be annotated with parameters,
       you just need a single part with only the
       [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
       field set.
      
       If you want to annotate the training phrase, you must create multiple
       parts, where the fields of each part are populated in one of two ways:
      
       -   `Part.text` is set to a part of the phrase that has no parameters.
       -   `Part.text` is set to a part of the phrase that you want to annotate,
       and the `entity_type`, `alias`, and `user_defined` fields are all
       set.
       
      repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getParts in interface Intent.TrainingPhraseOrBuilder
    • getPartsOrBuilder

      public Intent.TrainingPhrase.PartOrBuilder getPartsOrBuilder(int index)
       Required. The ordered list of training phrase parts.
       The parts are concatenated in order to form the training phrase.
      
       Note: The API does not automatically annotate training phrases like the
       Dialogflow Console does.
      
       Note: Do not forget to include whitespace at part boundaries,
       so the training phrase is well formatted when the parts are concatenated.
      
       If the training phrase does not need to be annotated with parameters,
       you just need a single part with only the
       [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
       field set.
      
       If you want to annotate the training phrase, you must create multiple
       parts, where the fields of each part are populated in one of two ways:
      
       -   `Part.text` is set to a part of the phrase that has no parameters.
       -   `Part.text` is set to a part of the phrase that you want to annotate,
       and the `entity_type`, `alias`, and `user_defined` fields are all
       set.
       
      repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPartsOrBuilder in interface Intent.TrainingPhraseOrBuilder
    • getTimesAddedCount

      public int getTimesAddedCount()
       Optional. Indicates how many times this example was added to
       the intent. Each time a developer adds an existing sample by editing an
       intent or training, this counter is increased.
       
      int32 times_added_count = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTimesAddedCount in interface Intent.TrainingPhraseOrBuilder
      Returns:
      The timesAddedCount.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • 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.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • 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.TrainingPhrase parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

      public static Intent.TrainingPhrase 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.TrainingPhrase parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

      public static Intent.TrainingPhrase parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Intent.TrainingPhrase parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Intent.TrainingPhrase parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Intent.TrainingPhrase parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Intent.TrainingPhrase parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

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

      public static Intent.TrainingPhrase.Builder newBuilder()
    • newBuilder

      public static Intent.TrainingPhrase.Builder newBuilder(Intent.TrainingPhrase prototype)
    • toBuilder

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

      protected Intent.TrainingPhrase.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Intent.TrainingPhrase getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<Intent.TrainingPhrase> 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.GeneratedMessage
    • getDefaultInstanceForType

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