Class AnnotatedMessagePart.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AnnotatedMessagePart.Builder>
com.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.Builder
All Implemented Interfaces:
AnnotatedMessagePartOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AnnotatedMessagePart

public static final class AnnotatedMessagePart.Builder extends com.google.protobuf.GeneratedMessage.Builder<AnnotatedMessagePart.Builder> implements AnnotatedMessagePartOrBuilder
 Represents a part of a message possibly annotated with an entity. The part
 can be an entity or purely a part of the message between two entities or
 message start/end.
 
Protobuf type google.cloud.dialogflow.v2beta1.AnnotatedMessagePart
  • 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.Builder<AnnotatedMessagePart.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<AnnotatedMessagePart.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<AnnotatedMessagePart.Builder>
    • getDefaultInstanceForType

      public AnnotatedMessagePart getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public AnnotatedMessagePart build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public AnnotatedMessagePart buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public AnnotatedMessagePart.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AnnotatedMessagePart.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<AnnotatedMessagePart.Builder>
    • mergeFrom

      public AnnotatedMessagePart.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AnnotatedMessagePart.Builder>
      Throws:
      IOException
    • getText

      public String getText()
       Required. A part of a message possibly annotated with an entity.
       
      string text = 1;
      Specified by:
      getText in interface AnnotatedMessagePartOrBuilder
      Returns:
      The text.
    • getTextBytes

      public com.google.protobuf.ByteString getTextBytes()
       Required. A part of a message possibly annotated with an entity.
       
      string text = 1;
      Specified by:
      getTextBytes in interface AnnotatedMessagePartOrBuilder
      Returns:
      The bytes for text.
    • setText

      public AnnotatedMessagePart.Builder setText(String value)
       Required. A part of a message possibly annotated with an entity.
       
      string text = 1;
      Parameters:
      value - The text to set.
      Returns:
      This builder for chaining.
    • clearText

      public AnnotatedMessagePart.Builder clearText()
       Required. A part of a message possibly annotated with an entity.
       
      string text = 1;
      Returns:
      This builder for chaining.
    • setTextBytes

      public AnnotatedMessagePart.Builder setTextBytes(com.google.protobuf.ByteString value)
       Required. A part of a message possibly annotated with an entity.
       
      string text = 1;
      Parameters:
      value - The bytes for text to set.
      Returns:
      This builder for chaining.
    • getEntityType

      public String getEntityType()
       Optional. The [Dialogflow system entity
       type](https://cloud.google.com/dialogflow/docs/reference/system-entities)
       of this message part. If this is empty, Dialogflow could not annotate the
       phrase part with a system entity.
       
      string entity_type = 2;
      Specified by:
      getEntityType in interface AnnotatedMessagePartOrBuilder
      Returns:
      The entityType.
    • getEntityTypeBytes

      public com.google.protobuf.ByteString getEntityTypeBytes()
       Optional. The [Dialogflow system entity
       type](https://cloud.google.com/dialogflow/docs/reference/system-entities)
       of this message part. If this is empty, Dialogflow could not annotate the
       phrase part with a system entity.
       
      string entity_type = 2;
      Specified by:
      getEntityTypeBytes in interface AnnotatedMessagePartOrBuilder
      Returns:
      The bytes for entityType.
    • setEntityType

      public AnnotatedMessagePart.Builder setEntityType(String value)
       Optional. The [Dialogflow system entity
       type](https://cloud.google.com/dialogflow/docs/reference/system-entities)
       of this message part. If this is empty, Dialogflow could not annotate the
       phrase part with a system entity.
       
      string entity_type = 2;
      Parameters:
      value - The entityType to set.
      Returns:
      This builder for chaining.
    • clearEntityType

      public AnnotatedMessagePart.Builder clearEntityType()
       Optional. The [Dialogflow system entity
       type](https://cloud.google.com/dialogflow/docs/reference/system-entities)
       of this message part. If this is empty, Dialogflow could not annotate the
       phrase part with a system entity.
       
      string entity_type = 2;
      Returns:
      This builder for chaining.
    • setEntityTypeBytes

      public AnnotatedMessagePart.Builder setEntityTypeBytes(com.google.protobuf.ByteString value)
       Optional. The [Dialogflow system entity
       type](https://cloud.google.com/dialogflow/docs/reference/system-entities)
       of this message part. If this is empty, Dialogflow could not annotate the
       phrase part with a system entity.
       
      string entity_type = 2;
      Parameters:
      value - The bytes for entityType to set.
      Returns:
      This builder for chaining.
    • hasFormattedValue

      public boolean hasFormattedValue()
       Optional. The [Dialogflow system entity formatted value
       ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
       this message part. For example for a system entity of type
       `@sys.unit-currency`, this may contain:
       <pre>
       {
       "amount": 5,
       "currency": "USD"
       }
       </pre>
       
      .google.protobuf.Value formatted_value = 3;
      Specified by:
      hasFormattedValue in interface AnnotatedMessagePartOrBuilder
      Returns:
      Whether the formattedValue field is set.
    • getFormattedValue

      public com.google.protobuf.Value getFormattedValue()
       Optional. The [Dialogflow system entity formatted value
       ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
       this message part. For example for a system entity of type
       `@sys.unit-currency`, this may contain:
       <pre>
       {
       "amount": 5,
       "currency": "USD"
       }
       </pre>
       
      .google.protobuf.Value formatted_value = 3;
      Specified by:
      getFormattedValue in interface AnnotatedMessagePartOrBuilder
      Returns:
      The formattedValue.
    • setFormattedValue

      public AnnotatedMessagePart.Builder setFormattedValue(com.google.protobuf.Value value)
       Optional. The [Dialogflow system entity formatted value
       ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
       this message part. For example for a system entity of type
       `@sys.unit-currency`, this may contain:
       <pre>
       {
       "amount": 5,
       "currency": "USD"
       }
       </pre>
       
      .google.protobuf.Value formatted_value = 3;
    • setFormattedValue

      public AnnotatedMessagePart.Builder setFormattedValue(com.google.protobuf.Value.Builder builderForValue)
       Optional. The [Dialogflow system entity formatted value
       ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
       this message part. For example for a system entity of type
       `@sys.unit-currency`, this may contain:
       <pre>
       {
       "amount": 5,
       "currency": "USD"
       }
       </pre>
       
      .google.protobuf.Value formatted_value = 3;
    • mergeFormattedValue

      public AnnotatedMessagePart.Builder mergeFormattedValue(com.google.protobuf.Value value)
       Optional. The [Dialogflow system entity formatted value
       ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
       this message part. For example for a system entity of type
       `@sys.unit-currency`, this may contain:
       <pre>
       {
       "amount": 5,
       "currency": "USD"
       }
       </pre>
       
      .google.protobuf.Value formatted_value = 3;
    • clearFormattedValue

      public AnnotatedMessagePart.Builder clearFormattedValue()
       Optional. The [Dialogflow system entity formatted value
       ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
       this message part. For example for a system entity of type
       `@sys.unit-currency`, this may contain:
       <pre>
       {
       "amount": 5,
       "currency": "USD"
       }
       </pre>
       
      .google.protobuf.Value formatted_value = 3;
    • getFormattedValueBuilder

      public com.google.protobuf.Value.Builder getFormattedValueBuilder()
       Optional. The [Dialogflow system entity formatted value
       ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
       this message part. For example for a system entity of type
       `@sys.unit-currency`, this may contain:
       <pre>
       {
       "amount": 5,
       "currency": "USD"
       }
       </pre>
       
      .google.protobuf.Value formatted_value = 3;
    • getFormattedValueOrBuilder

      public com.google.protobuf.ValueOrBuilder getFormattedValueOrBuilder()
       Optional. The [Dialogflow system entity formatted value
       ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
       this message part. For example for a system entity of type
       `@sys.unit-currency`, this may contain:
       <pre>
       {
       "amount": 5,
       "currency": "USD"
       }
       </pre>
       
      .google.protobuf.Value formatted_value = 3;
      Specified by:
      getFormattedValueOrBuilder in interface AnnotatedMessagePartOrBuilder