Class Message.Builder

  • All Implemented Interfaces:
    MessageOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Message

    public static final class Message.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Message.Builder>
    implements MessageOrBuilder
     Represents a message posted into a conversation.
     
    Protobuf type google.cloud.dialogflow.v2beta1.Message
    • 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<Message.Builder>
      • clear

        public Message.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<Message.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<Message.Builder>
      • getDefaultInstanceForType

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

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

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

        public Message.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<Message.Builder>
      • setField

        public Message.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<Message.Builder>
      • clearField

        public Message.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<Message.Builder>
      • clearOneof

        public Message.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<Message.Builder>
      • setRepeatedField

        public Message.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<Message.Builder>
      • addRepeatedField

        public Message.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<Message.Builder>
      • mergeFrom

        public Message.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<Message.Builder>
      • isInitialized

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

        public Message.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<Message.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Optional. The unique identifier of the message.
         Format: `projects/<Project ID>/locations/<Location
         ID>/conversations/<Conversation ID>/messages/<Message ID>`.
         
        string name = 1 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getName in interface MessageOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Optional. The unique identifier of the message.
         Format: `projects/<Project ID>/locations/<Location
         ID>/conversations/<Conversation ID>/messages/<Message ID>`.
         
        string name = 1 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getNameBytes in interface MessageOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Message.Builder setName​(String value)
         Optional. The unique identifier of the message.
         Format: `projects/<Project ID>/locations/<Location
         ID>/conversations/<Conversation ID>/messages/<Message ID>`.
         
        string name = 1 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Message.Builder clearName()
         Optional. The unique identifier of the message.
         Format: `projects/<Project ID>/locations/<Location
         ID>/conversations/<Conversation ID>/messages/<Message ID>`.
         
        string name = 1 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setNameBytes

        public Message.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Optional. The unique identifier of the message.
         Format: `projects/<Project ID>/locations/<Location
         ID>/conversations/<Conversation ID>/messages/<Message ID>`.
         
        string name = 1 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getContent

        public String getContent()
         Required. The message content.
         
        string content = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getContent in interface MessageOrBuilder
        Returns:
        The content.
      • getContentBytes

        public com.google.protobuf.ByteString getContentBytes()
         Required. The message content.
         
        string content = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getContentBytes in interface MessageOrBuilder
        Returns:
        The bytes for content.
      • setContent

        public Message.Builder setContent​(String value)
         Required. The message content.
         
        string content = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The content to set.
        Returns:
        This builder for chaining.
      • clearContent

        public Message.Builder clearContent()
         Required. The message content.
         
        string content = 2 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setContentBytes

        public Message.Builder setContentBytes​(com.google.protobuf.ByteString value)
         Required. The message content.
         
        string content = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for content to set.
        Returns:
        This builder for chaining.
      • getLanguageCode

        public String getLanguageCode()
         Optional. The message language.
         This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
         language tag. Example: "en-US".
         
        string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLanguageCode in interface MessageOrBuilder
        Returns:
        The languageCode.
      • getLanguageCodeBytes

        public com.google.protobuf.ByteString getLanguageCodeBytes()
         Optional. The message language.
         This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
         language tag. Example: "en-US".
         
        string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLanguageCodeBytes in interface MessageOrBuilder
        Returns:
        The bytes for languageCode.
      • setLanguageCode

        public Message.Builder setLanguageCode​(String value)
         Optional. The message language.
         This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
         language tag. Example: "en-US".
         
        string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The languageCode to set.
        Returns:
        This builder for chaining.
      • clearLanguageCode

        public Message.Builder clearLanguageCode()
         Optional. The message language.
         This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
         language tag. Example: "en-US".
         
        string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setLanguageCodeBytes

        public Message.Builder setLanguageCodeBytes​(com.google.protobuf.ByteString value)
         Optional. The message language.
         This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
         language tag. Example: "en-US".
         
        string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for languageCode to set.
        Returns:
        This builder for chaining.
      • getParticipant

        public String getParticipant()
         Output only. The participant that sends this message.
         
        string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getParticipant in interface MessageOrBuilder
        Returns:
        The participant.
      • getParticipantBytes

        public com.google.protobuf.ByteString getParticipantBytes()
         Output only. The participant that sends this message.
         
        string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getParticipantBytes in interface MessageOrBuilder
        Returns:
        The bytes for participant.
      • setParticipant

        public Message.Builder setParticipant​(String value)
         Output only. The participant that sends this message.
         
        string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The participant to set.
        Returns:
        This builder for chaining.
      • clearParticipant

        public Message.Builder clearParticipant()
         Output only. The participant that sends this message.
         
        string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setParticipantBytes

        public Message.Builder setParticipantBytes​(com.google.protobuf.ByteString value)
         Output only. The participant that sends this message.
         
        string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for participant to set.
        Returns:
        This builder for chaining.
      • getParticipantRoleValue

        public int getParticipantRoleValue()
         Output only. The role of the participant.
         
        .google.cloud.dialogflow.v2beta1.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getParticipantRoleValue in interface MessageOrBuilder
        Returns:
        The enum numeric value on the wire for participantRole.
      • setParticipantRoleValue

        public Message.Builder setParticipantRoleValue​(int value)
         Output only. The role of the participant.
         
        .google.cloud.dialogflow.v2beta1.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The enum numeric value on the wire for participantRole to set.
        Returns:
        This builder for chaining.
      • getParticipantRole

        public Participant.Role getParticipantRole()
         Output only. The role of the participant.
         
        .google.cloud.dialogflow.v2beta1.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getParticipantRole in interface MessageOrBuilder
        Returns:
        The participantRole.
      • setParticipantRole

        public Message.Builder setParticipantRole​(Participant.Role value)
         Output only. The role of the participant.
         
        .google.cloud.dialogflow.v2beta1.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The participantRole to set.
        Returns:
        This builder for chaining.
      • clearParticipantRole

        public Message.Builder clearParticipantRole()
         Output only. The role of the participant.
         
        .google.cloud.dialogflow.v2beta1.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. The time when the message was created in Contact Center AI.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface MessageOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The time when the message was created in Contact Center AI.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface MessageOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public Message.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The time when the message was created in Contact Center AI.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public Message.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The time when the message was created in Contact Center AI.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public Message.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The time when the message was created in Contact Center AI.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public Message.Builder clearCreateTime()
         Output only. The time when the message was created in Contact Center AI.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. The time when the message was created in Contact Center AI.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The time when the message was created in Contact Center AI.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface MessageOrBuilder
      • hasSendTime

        public boolean hasSendTime()
         Optional. The time when the message was sent.
         
        .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasSendTime in interface MessageOrBuilder
        Returns:
        Whether the sendTime field is set.
      • getSendTime

        public com.google.protobuf.Timestamp getSendTime()
         Optional. The time when the message was sent.
         
        .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getSendTime in interface MessageOrBuilder
        Returns:
        The sendTime.
      • setSendTime

        public Message.Builder setSendTime​(com.google.protobuf.Timestamp value)
         Optional. The time when the message was sent.
         
        .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];
      • setSendTime

        public Message.Builder setSendTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Optional. The time when the message was sent.
         
        .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];
      • mergeSendTime

        public Message.Builder mergeSendTime​(com.google.protobuf.Timestamp value)
         Optional. The time when the message was sent.
         
        .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];
      • clearSendTime

        public Message.Builder clearSendTime()
         Optional. The time when the message was sent.
         
        .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];
      • getSendTimeBuilder

        public com.google.protobuf.Timestamp.Builder getSendTimeBuilder()
         Optional. The time when the message was sent.
         
        .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];
      • getSendTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder()
         Optional. The time when the message was sent.
         
        .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getSendTimeOrBuilder in interface MessageOrBuilder
      • hasMessageAnnotation

        public boolean hasMessageAnnotation()
         Output only. The annotation for the message.
         
        .google.cloud.dialogflow.v2beta1.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasMessageAnnotation in interface MessageOrBuilder
        Returns:
        Whether the messageAnnotation field is set.
      • getMessageAnnotation

        public MessageAnnotation getMessageAnnotation()
         Output only. The annotation for the message.
         
        .google.cloud.dialogflow.v2beta1.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getMessageAnnotation in interface MessageOrBuilder
        Returns:
        The messageAnnotation.
      • setMessageAnnotation

        public Message.Builder setMessageAnnotation​(MessageAnnotation value)
         Output only. The annotation for the message.
         
        .google.cloud.dialogflow.v2beta1.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setMessageAnnotation

        public Message.Builder setMessageAnnotation​(MessageAnnotation.Builder builderForValue)
         Output only. The annotation for the message.
         
        .google.cloud.dialogflow.v2beta1.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeMessageAnnotation

        public Message.Builder mergeMessageAnnotation​(MessageAnnotation value)
         Output only. The annotation for the message.
         
        .google.cloud.dialogflow.v2beta1.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearMessageAnnotation

        public Message.Builder clearMessageAnnotation()
         Output only. The annotation for the message.
         
        .google.cloud.dialogflow.v2beta1.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getMessageAnnotationBuilder

        public MessageAnnotation.Builder getMessageAnnotationBuilder()
         Output only. The annotation for the message.
         
        .google.cloud.dialogflow.v2beta1.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • hasSentimentAnalysis

        public boolean hasSentimentAnalysis()
         Output only. The sentiment analysis result for the message.
         
        .google.cloud.dialogflow.v2beta1.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasSentimentAnalysis in interface MessageOrBuilder
        Returns:
        Whether the sentimentAnalysis field is set.
      • getSentimentAnalysis

        public SentimentAnalysisResult getSentimentAnalysis()
         Output only. The sentiment analysis result for the message.
         
        .google.cloud.dialogflow.v2beta1.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSentimentAnalysis in interface MessageOrBuilder
        Returns:
        The sentimentAnalysis.
      • setSentimentAnalysis

        public Message.Builder setSentimentAnalysis​(SentimentAnalysisResult value)
         Output only. The sentiment analysis result for the message.
         
        .google.cloud.dialogflow.v2beta1.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setSentimentAnalysis

        public Message.Builder setSentimentAnalysis​(SentimentAnalysisResult.Builder builderForValue)
         Output only. The sentiment analysis result for the message.
         
        .google.cloud.dialogflow.v2beta1.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeSentimentAnalysis

        public Message.Builder mergeSentimentAnalysis​(SentimentAnalysisResult value)
         Output only. The sentiment analysis result for the message.
         
        .google.cloud.dialogflow.v2beta1.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearSentimentAnalysis

        public Message.Builder clearSentimentAnalysis()
         Output only. The sentiment analysis result for the message.
         
        .google.cloud.dialogflow.v2beta1.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getSentimentAnalysisBuilder

        public SentimentAnalysisResult.Builder getSentimentAnalysisBuilder()
         Output only. The sentiment analysis result for the message.
         
        .google.cloud.dialogflow.v2beta1.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setUnknownFields

        public final Message.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<Message.Builder>
      • mergeUnknownFields

        public final Message.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<Message.Builder>