Class ConversationMessage.Builder (3.97.0)

public static final class ConversationMessage.Builder extends GeneratedMessage.Builder<ConversationMessage.Builder> implements ConversationMessageOrBuilder

Single message in a conversation.

Protobuf type google.privacy.dlp.v2.ConversationMessage

Static Methods

getDescriptor()

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

Methods

build()

public ConversationMessage build()
Returns
Type Description
ConversationMessage

buildPartial()

public ConversationMessage buildPartial()
Returns
Type Description
ConversationMessage

clear()

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

clearContent()

public ConversationMessage.Builder clearContent()

The contents of this message.

string content = 1;

Returns
Type Description
ConversationMessage.Builder

This builder for chaining.

clearMessageType()

public ConversationMessage.Builder clearMessageType()

The type of message.

.google.privacy.dlp.v2.ConversationMessage.MessageType message_type = 2;

Returns
Type Description
ConversationMessage.Builder

This builder for chaining.

clearParticipantId()

public ConversationMessage.Builder clearParticipantId()

Optional. The identifier of the participant, for example 'test-user' or 'gemini'. The participant ID can contain lowercase letters, numbers, and hyphens; that is, it must match the regular expression: ^a-z?$. The maximum length is 63 characters.

string participant_id = 3;

Returns
Type Description
ConversationMessage.Builder

This builder for chaining.

getContent()

public String getContent()

The contents of this message.

string content = 1;

Returns
Type Description
String

The content.

getContentBytes()

public ByteString getContentBytes()

The contents of this message.

string content = 1;

Returns
Type Description
ByteString

The bytes for content.

getDefaultInstanceForType()

public ConversationMessage getDefaultInstanceForType()
Returns
Type Description
ConversationMessage

getDescriptorForType()

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

getMessageType()

public ConversationMessage.MessageType getMessageType()

The type of message.

.google.privacy.dlp.v2.ConversationMessage.MessageType message_type = 2;

Returns
Type Description
ConversationMessage.MessageType

The messageType.

getMessageTypeValue()

public int getMessageTypeValue()

The type of message.

.google.privacy.dlp.v2.ConversationMessage.MessageType message_type = 2;

Returns
Type Description
int

The enum numeric value on the wire for messageType.

getParticipantId()

public String getParticipantId()

Optional. The identifier of the participant, for example 'test-user' or 'gemini'. The participant ID can contain lowercase letters, numbers, and hyphens; that is, it must match the regular expression: ^a-z?$. The maximum length is 63 characters.

string participant_id = 3;

Returns
Type Description
String

The participantId.

getParticipantIdBytes()

public ByteString getParticipantIdBytes()

Optional. The identifier of the participant, for example 'test-user' or 'gemini'. The participant ID can contain lowercase letters, numbers, and hyphens; that is, it must match the regular expression: ^a-z?$. The maximum length is 63 characters.

string participant_id = 3;

Returns
Type Description
ByteString

The bytes for participantId.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ConversationMessage other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setContent(String value)

public ConversationMessage.Builder setContent(String value)

The contents of this message.

string content = 1;

Parameter
Name Description
value String

The content to set.

Returns
Type Description
ConversationMessage.Builder

This builder for chaining.

setContentBytes(ByteString value)

public ConversationMessage.Builder setContentBytes(ByteString value)

The contents of this message.

string content = 1;

Parameter
Name Description
value ByteString

The bytes for content to set.

Returns
Type Description
ConversationMessage.Builder

This builder for chaining.

setMessageType(ConversationMessage.MessageType value)

public ConversationMessage.Builder setMessageType(ConversationMessage.MessageType value)

The type of message.

.google.privacy.dlp.v2.ConversationMessage.MessageType message_type = 2;

Parameter
Name Description
value ConversationMessage.MessageType

The messageType to set.

Returns
Type Description
ConversationMessage.Builder

This builder for chaining.

setMessageTypeValue(int value)

public ConversationMessage.Builder setMessageTypeValue(int value)

The type of message.

.google.privacy.dlp.v2.ConversationMessage.MessageType message_type = 2;

Parameter
Name Description
value int

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

Returns
Type Description
ConversationMessage.Builder

This builder for chaining.

setParticipantId(String value)

public ConversationMessage.Builder setParticipantId(String value)

Optional. The identifier of the participant, for example 'test-user' or 'gemini'. The participant ID can contain lowercase letters, numbers, and hyphens; that is, it must match the regular expression: ^a-z?$. The maximum length is 63 characters.

string participant_id = 3;

Parameter
Name Description
value String

The participantId to set.

Returns
Type Description
ConversationMessage.Builder

This builder for chaining.

setParticipantIdBytes(ByteString value)

public ConversationMessage.Builder setParticipantIdBytes(ByteString value)

Optional. The identifier of the participant, for example 'test-user' or 'gemini'. The participant ID can contain lowercase letters, numbers, and hyphens; that is, it must match the regular expression: ^a-z?$. The maximum length is 63 characters.

string participant_id = 3;

Parameter
Name Description
value ByteString

The bytes for participantId to set.

Returns
Type Description
ConversationMessage.Builder

This builder for chaining.