Class Message.Builder (4.5.11)

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.v2.Message

Implements

MessageOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Message.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Message.Builder
Overrides

build()

public Message build()
Returns
TypeDescription
Message

buildPartial()

public Message buildPartial()
Returns
TypeDescription
Message

clear()

public Message.Builder clear()
Returns
TypeDescription
Message.Builder
Overrides

clearContent()

public Message.Builder clearContent()

Required. The message content.

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

Returns
TypeDescription
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
TypeDescription
Message.Builder

clearField(Descriptors.FieldDescriptor field)

public Message.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
Message.Builder

This builder for chaining.

clearMessageAnnotation()

public Message.Builder clearMessageAnnotation()

Output only. The annotation for the message.

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

Returns
TypeDescription
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
TypeDescription
Message.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Message.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
Message.Builder

This builder for chaining.

clearParticipantRole()

public Message.Builder clearParticipantRole()

Output only. The role of the participant.

.google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
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
TypeDescription
Message.Builder

clearSentimentAnalysis()

public Message.Builder clearSentimentAnalysis()

Output only. The sentiment analysis result for the message.

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

Returns
TypeDescription
Message.Builder

clone()

public Message.Builder clone()
Returns
TypeDescription
Message.Builder
Overrides

getContent()

public String getContent()

Required. The message content.

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

Returns
TypeDescription
String

The content.

getContentBytes()

public ByteString getContentBytes()

Required. The message content.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Message getDefaultInstanceForType()
Returns
TypeDescription
Message

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for languageCode.

getMessageAnnotation()

public MessageAnnotation getMessageAnnotation()

Output only. The annotation for the message.

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

Returns
TypeDescription
MessageAnnotation

The messageAnnotation.

getMessageAnnotationBuilder()

public MessageAnnotation.Builder getMessageAnnotationBuilder()

Output only. The annotation for the message.

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

Returns
TypeDescription
MessageAnnotation.Builder

getMessageAnnotationOrBuilder()

public MessageAnnotationOrBuilder getMessageAnnotationOrBuilder()

Output only. The annotation for the message.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for participant.

getParticipantRole()

public Participant.Role getParticipantRole()

Output only. The role of the participant.

.google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Participant.Role

The participantRole.

getParticipantRoleValue()

public int getParticipantRoleValue()

Output only. The role of the participant.

.google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getSentimentAnalysis()

public SentimentAnalysisResult getSentimentAnalysis()

Output only. The sentiment analysis result for the message.

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

Returns
TypeDescription
SentimentAnalysisResult

The sentimentAnalysis.

getSentimentAnalysisBuilder()

public SentimentAnalysisResult.Builder getSentimentAnalysisBuilder()

Output only. The sentiment analysis result for the message.

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

Returns
TypeDescription
SentimentAnalysisResult.Builder

getSentimentAnalysisOrBuilder()

public SentimentAnalysisResultOrBuilder getSentimentAnalysisOrBuilder()

Output only. The sentiment analysis result for the message.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the createTime field is set.

hasMessageAnnotation()

public boolean hasMessageAnnotation()

Output only. The annotation for the message.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the sendTime field is set.

hasSentimentAnalysis()

public boolean hasSentimentAnalysis()

Output only. The sentiment analysis result for the message.

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

Returns
TypeDescription
boolean

Whether the sentimentAnalysis field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
Message.Builder

mergeFrom(Message other)

public Message.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Message.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Message.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Message.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Message.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Message.Builder
Overrides

mergeMessageAnnotation(MessageAnnotation value)

public Message.Builder mergeMessageAnnotation(MessageAnnotation value)

Output only. The annotation for the message.

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

Parameter
NameDescription
valueMessageAnnotation
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
Message.Builder

mergeSentimentAnalysis(SentimentAnalysisResult value)

public Message.Builder mergeSentimentAnalysis(SentimentAnalysisResult value)

Output only. The sentiment analysis result for the message.

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

Parameter
NameDescription
valueSentimentAnalysisResult
Returns
TypeDescription
Message.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Message.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The content to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for content to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Message.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Message.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The languageCode to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for languageCode to set.

Returns
TypeDescription
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.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueMessageAnnotation
Returns
TypeDescription
Message.Builder

setMessageAnnotation(MessageAnnotation.Builder builderForValue)

public Message.Builder setMessageAnnotation(MessageAnnotation.Builder builderForValue)

Output only. The annotation for the message.

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

Parameter
NameDescription
builderForValueMessageAnnotation.Builder
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
valueString

The participant to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for participant to set.

Returns
TypeDescription
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.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueParticipant.Role

The participantRole to set.

Returns
TypeDescription
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.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Message.Builder

setSentimentAnalysis(SentimentAnalysisResult value)

public Message.Builder setSentimentAnalysis(SentimentAnalysisResult value)

Output only. The sentiment analysis result for the message.

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

Parameter
NameDescription
valueSentimentAnalysisResult
Returns
TypeDescription
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.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueSentimentAnalysisResult.Builder
Returns
TypeDescription
Message.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Message.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Message.Builder
Overrides