Class Message.Builder (4.28.0)

public static final class Message.Builder extends GeneratedMessageV3.Builder<Message.Builder> implements MessageOrBuilder

Represents a message posted into a conversation.

Protobuf type google.cloud.dialogflow.v2beta1.Message

Implements

MessageOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Message.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Message.Builder
Overrides

build()

public Message build()
Returns
Type Description
Message

buildPartial()

public Message buildPartial()
Returns
Type Description
Message

clear()

public Message.Builder clear()
Returns
Type Description
Message.Builder
Overrides

clearContent()

public Message.Builder clearContent()

Required. The message content.

string content = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Message.Builder

This builder for chaining.

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];

Returns
Type Description
Message.Builder

clearField(Descriptors.FieldDescriptor field)

public Message.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Message.Builder
Overrides

clearLanguageCode()

public Message.Builder clearLanguageCode()

Optional. The message language. This should be a BCP-47 language tag. Example: "en-US".

string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Message.Builder

This builder for chaining.

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];

Returns
Type Description
Message.Builder

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
Type Description
Message.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Message.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Message.Builder
Overrides

clearParticipant()

public Message.Builder clearParticipant()

Output only. The participant that sends this message.

string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Message.Builder

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
Type Description
Message.Builder

This builder for chaining.

clearSendTime()

public Message.Builder clearSendTime()

Optional. The time when the message was sent.

.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Message.Builder

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];

Returns
Type Description
Message.Builder

clone()

public Message.Builder clone()
Returns
Type Description
Message.Builder
Overrides

getContent()

public String getContent()

Required. The message content.

string content = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The content.

getContentBytes()

public ByteString getContentBytes()

Required. The message content.

string content = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for content.

getCreateTime()

public 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];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public 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];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public 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];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Message getDefaultInstanceForType()
Returns
Type Description
Message

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLanguageCode()

public String getLanguageCode()

Optional. The message language. This should be a BCP-47 language tag. Example: "en-US".

string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

Optional. The message language. This should be a BCP-47 language tag. Example: "en-US".

string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for languageCode.

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];

Returns
Type Description
MessageAnnotation

The messageAnnotation.

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];

Returns
Type Description
MessageAnnotation.Builder

getMessageAnnotationOrBuilder()

public MessageAnnotationOrBuilder getMessageAnnotationOrBuilder()

Output only. The annotation for the message.

.google.cloud.dialogflow.v2beta1.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MessageAnnotationOrBuilder

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];

Returns
Type Description
String

The name.

getNameBytes()

public 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];

Returns
Type Description
ByteString

The bytes for name.

getParticipant()

public String getParticipant()

Output only. The participant that sends this message.

string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The participant.

getParticipantBytes()

public ByteString getParticipantBytes()

Output only. The participant that sends this message.

string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for participant.

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];

Returns
Type Description
Participant.Role

The participantRole.

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];

Returns
Type Description
int

The enum numeric value on the wire for participantRole.

getSendTime()

public Timestamp getSendTime()

Optional. The time when the message was sent.

.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Timestamp

The sendTime.

getSendTimeBuilder()

public Timestamp.Builder getSendTimeBuilder()

Optional. The time when the message was sent.

.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getSendTimeOrBuilder()

public TimestampOrBuilder getSendTimeOrBuilder()

Optional. The time when the message was sent.

.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TimestampOrBuilder

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];

Returns
Type Description
SentimentAnalysisResult

The sentimentAnalysis.

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];

Returns
Type Description
SentimentAnalysisResult.Builder

getSentimentAnalysisOrBuilder()

public SentimentAnalysisResultOrBuilder getSentimentAnalysisOrBuilder()

Output only. The sentiment analysis result for the message.

.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SentimentAnalysisResultOrBuilder

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];

Returns
Type Description
boolean

Whether the createTime field is set.

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];

Returns
Type Description
boolean

Whether the messageAnnotation field is set.

hasSendTime()

public boolean hasSendTime()

Optional. The time when the message was sent.

.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the sendTime field is set.

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];

Returns
Type Description
boolean

Whether the sentimentAnalysis field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Message.Builder mergeCreateTime(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];

Parameter
Name Description
value Timestamp
Returns
Type Description
Message.Builder

mergeFrom(Message other)

public Message.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Message.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Message.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Message.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Message.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Message.Builder
Overrides

mergeMessageAnnotation(MessageAnnotation value)

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];

Parameter
Name Description
value MessageAnnotation
Returns
Type Description
Message.Builder

mergeSendTime(Timestamp value)

public Message.Builder mergeSendTime(Timestamp value)

Optional. The time when the message was sent.

.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Message.Builder

mergeSentimentAnalysis(SentimentAnalysisResult value)

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];

Parameter
Name Description
value SentimentAnalysisResult
Returns
Type Description
Message.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Message.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Message.Builder
Overrides

setContent(String value)

public Message.Builder setContent(String value)

Required. The message content.

string content = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The content to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setContentBytes(ByteString value)

public Message.Builder setContentBytes(ByteString value)

Required. The message content.

string content = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for content to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public Message.Builder setCreateTime(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];

Parameter
Name Description
value Timestamp
Returns
Type Description
Message.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Message.Builder setCreateTime(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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Message.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Message.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Message.Builder
Overrides

setLanguageCode(String value)

public Message.Builder setLanguageCode(String value)

Optional. The message language. This should be a BCP-47 language tag. Example: "en-US".

string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The languageCode to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setLanguageCodeBytes(ByteString value)

public Message.Builder setLanguageCodeBytes(ByteString value)

Optional. The message language. This should be a BCP-47 language tag. Example: "en-US".

string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for languageCode to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setMessageAnnotation(MessageAnnotation value)

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];

Parameter
Name Description
value MessageAnnotation
Returns
Type Description
Message.Builder

setMessageAnnotation(MessageAnnotation.Builder builderForValue)

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];

Parameter
Name Description
builderForValue MessageAnnotation.Builder
Returns
Type Description
Message.Builder

setName(String value)

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];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Message.Builder setNameBytes(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];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setParticipant(String value)

public Message.Builder setParticipant(String value)

Output only. The participant that sends this message.

string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The participant to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setParticipantBytes(ByteString value)

public Message.Builder setParticipantBytes(ByteString value)

Output only. The participant that sends this message.

string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for participant to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setParticipantRole(Participant.Role value)

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];

Parameter
Name Description
value Participant.Role

The participantRole to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setParticipantRoleValue(int value)

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];

Parameter
Name Description
value int

The enum numeric value on the wire for participantRole to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Message.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Message.Builder
Overrides

setSendTime(Timestamp value)

public Message.Builder setSendTime(Timestamp value)

Optional. The time when the message was sent.

.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Message.Builder

setSendTime(Timestamp.Builder builderForValue)

public Message.Builder setSendTime(Timestamp.Builder builderForValue)

Optional. The time when the message was sent.

.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Message.Builder

setSentimentAnalysis(SentimentAnalysisResult value)

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];

Parameter
Name Description
value SentimentAnalysisResult
Returns
Type Description
Message.Builder

setSentimentAnalysis(SentimentAnalysisResult.Builder builderForValue)

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];

Parameter
Name Description
builderForValue SentimentAnalysisResult.Builder
Returns
Type Description
Message.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Message.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Message.Builder
Overrides