Package com.google.cloud.dialogflow.v2
Class Message.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Message.Builder>
com.google.cloud.dialogflow.v2.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.GeneratedMessage.Builder<Message.Builder>
implements MessageOrBuilder
Represents a message posted into a conversation.Protobuf type
google.cloud.dialogflow.v2.Message-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Required.Output only.Optional.Output only.Optional.Output only.Output only.Optional.Output only.Required.com.google.protobuf.ByteStringRequired.com.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.com.google.protobuf.ByteStringOptional.Output only.Output only.Output only.getName()Optional.com.google.protobuf.ByteStringOptional.Output only.com.google.protobuf.ByteStringOutput only.Output only.intOutput only.com.google.protobuf.TimestampOptional.com.google.protobuf.Timestamp.BuilderOptional.com.google.protobuf.TimestampOrBuilderOptional.Output only.Output only.Output only.booleanOutput only.booleanOutput only.booleanOptional.booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeCreateTime(com.google.protobuf.Timestamp value) Output only.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Output only.mergeSendTime(com.google.protobuf.Timestamp value) Optional.Output only.setContent(String value) Required.setContentBytes(com.google.protobuf.ByteString value) Required.setCreateTime(com.google.protobuf.Timestamp value) Output only.setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.setLanguageCode(String value) Optional.setLanguageCodeBytes(com.google.protobuf.ByteString value) Optional.Output only.setMessageAnnotation(MessageAnnotation.Builder builderForValue) Output only.Optional.setNameBytes(com.google.protobuf.ByteString value) Optional.setParticipant(String value) Output only.setParticipantBytes(com.google.protobuf.ByteString value) Output only.Output only.setParticipantRoleValue(int value) Output only.setSendTime(com.google.protobuf.Timestamp value) Optional.setSendTime(com.google.protobuf.Timestamp.Builder builderForValue) Optional.Output only.setSentimentAnalysis(SentimentAnalysisResult.Builder builderForValue) Output only.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Message.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Message.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Message.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Message.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Message.Builder>
-
mergeFrom
public Message.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Message.Builder>- Throws:
IOException
-
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:
getNamein interfaceMessageOrBuilder- 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:
getNameBytesin interfaceMessageOrBuilder- Returns:
- The bytes for name.
-
setName
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
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
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
Required. The message content.
string content = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getContentin interfaceMessageOrBuilder- Returns:
- The content.
-
getContentBytes
public com.google.protobuf.ByteString getContentBytes()Required. The message content.
string content = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getContentBytesin interfaceMessageOrBuilder- Returns:
- The bytes for content.
-
setContent
Required. The message content.
string content = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The content to set.- Returns:
- This builder for chaining.
-
clearContent
Required. The message content.
string content = 2 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setContentBytes
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
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:
getLanguageCodein interfaceMessageOrBuilder- 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:
getLanguageCodeBytesin interfaceMessageOrBuilder- Returns:
- The bytes for languageCode.
-
setLanguageCode
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
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
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
Output only. The participant that sends this message.
string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getParticipantin interfaceMessageOrBuilder- 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:
getParticipantBytesin interfaceMessageOrBuilder- Returns:
- The bytes for participant.
-
setParticipant
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
Output only. The participant that sends this message.
string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setParticipantBytes
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.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getParticipantRoleValuein interfaceMessageOrBuilder- Returns:
- The enum numeric value on the wire for participantRole.
-
setParticipantRoleValue
Output only. The role of the participant.
.google.cloud.dialogflow.v2.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
Output only. The role of the participant.
.google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getParticipantRolein interfaceMessageOrBuilder- Returns:
- The participantRole.
-
setParticipantRole
Output only. The role of the participant.
.google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The participantRole to set.- Returns:
- This builder for chaining.
-
clearParticipantRole
Output only. The role of the participant.
.google.cloud.dialogflow.v2.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:
hasCreateTimein interfaceMessageOrBuilder- 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:
getCreateTimein interfaceMessageOrBuilder- Returns:
- The createTime.
-
setCreateTime
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
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
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
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:
getCreateTimeOrBuilderin interfaceMessageOrBuilder
-
hasSendTime
public boolean hasSendTime()Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasSendTimein interfaceMessageOrBuilder- Returns:
- Whether the sendTime field is set.
-
getSendTime
public com.google.protobuf.Timestamp getSendTime()Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSendTimein interfaceMessageOrBuilder- Returns:
- The sendTime.
-
setSendTime
Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; -
setSendTime
Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; -
mergeSendTime
Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; -
clearSendTime
Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
.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. For voice messages, this is the time when an utterance started.
.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. For voice messages, this is the time when an utterance started.
.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSendTimeOrBuilderin interfaceMessageOrBuilder
-
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];- Specified by:
hasMessageAnnotationin interfaceMessageOrBuilder- Returns:
- Whether the messageAnnotation field is set.
-
getMessageAnnotation
Output only. The annotation for the message.
.google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getMessageAnnotationin interfaceMessageOrBuilder- Returns:
- The messageAnnotation.
-
setMessageAnnotation
Output only. The annotation for the message.
.google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setMessageAnnotation
Output only. The annotation for the message.
.google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeMessageAnnotation
Output only. The annotation for the message.
.google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearMessageAnnotation
Output only. The annotation for the message.
.google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getMessageAnnotationBuilder
Output only. The annotation for the message.
.google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getMessageAnnotationOrBuilder
Output only. The annotation for the message.
.google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getMessageAnnotationOrBuilderin interfaceMessageOrBuilder
-
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];- Specified by:
hasSentimentAnalysisin interfaceMessageOrBuilder- Returns:
- Whether the sentimentAnalysis field is set.
-
getSentimentAnalysis
Output only. The sentiment analysis result for the message.
.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSentimentAnalysisin interfaceMessageOrBuilder- Returns:
- The sentimentAnalysis.
-
setSentimentAnalysis
Output only. The sentiment analysis result for the message.
.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setSentimentAnalysis
Output only. The sentiment analysis result for the message.
.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeSentimentAnalysis
Output only. The sentiment analysis result for the message.
.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearSentimentAnalysis
Output only. The sentiment analysis result for the message.
.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getSentimentAnalysisBuilder
Output only. The sentiment analysis result for the message.
.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getSentimentAnalysisOrBuilder
Output only. The sentiment analysis result for the message.
.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSentimentAnalysisOrBuilderin interfaceMessageOrBuilder
-