Class 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.GeneratedMessageV3.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.v2.AnnotatedMessagePart
    • Method Detail

      • 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.Builder<AnnotatedMessagePart.Builder>
      • clear

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public AnnotatedMessagePart.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotatedMessagePart.Builder>
      • setField

        public AnnotatedMessagePart.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotatedMessagePart.Builder>
      • clearField

        public AnnotatedMessagePart.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotatedMessagePart.Builder>
      • clearOneof

        public AnnotatedMessagePart.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotatedMessagePart.Builder>
      • setRepeatedField

        public AnnotatedMessagePart.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             int index,
                                                             Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotatedMessagePart.Builder>
      • addRepeatedField

        public AnnotatedMessagePart.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotatedMessagePart.Builder>
      • isInitialized

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

        public com.google.protobuf.ByteString getTextBytes()
         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)
         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()
         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)
         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()
         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()
         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)
         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()
         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)
         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()
         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()
         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)
         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)
         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)
         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()
         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()
         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()
         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
      • setUnknownFields

        public final AnnotatedMessagePart.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotatedMessagePart.Builder>
      • mergeUnknownFields

        public final AnnotatedMessagePart.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotatedMessagePart.Builder>