Class QuotedMessageMetadata.Builder (0.49.0)

public static final class QuotedMessageMetadata.Builder extends GeneratedMessage.Builder<QuotedMessageMetadata.Builder> implements QuotedMessageMetadataOrBuilder

Information about a message that another message quotes.

When you create a message, you can quote messages within the same thread, or quote a root message to create a new root message. However, you can't quote a message reply from a different thread.

When you update a message, you can't add or replace the quotedMessageMetadata field, but you can remove it.

For example usage, see Quote another message.

Protobuf type google.chat.v1.QuotedMessageMetadata

Static Methods

getDescriptor()

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

Methods

build()

public QuotedMessageMetadata build()
Returns
Type Description
QuotedMessageMetadata

buildPartial()

public QuotedMessageMetadata buildPartial()
Returns
Type Description
QuotedMessageMetadata

clear()

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

clearForwardedMetadata()

public QuotedMessageMetadata.Builder clearForwardedMetadata()

Output only. Metadata about the source space of the quoted message. Populated only for FORWARD quote type.

.google.chat.v1.ForwardedMetadata forwarded_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
QuotedMessageMetadata.Builder

clearLastUpdateTime()

public QuotedMessageMetadata.Builder clearLastUpdateTime()

Required. The timestamp when the quoted message was created or when the quoted message was last updated.

If the message was edited, use this field, last_update_time. If the message was never edited, use create_time.

If last_update_time doesn't match the latest version of the quoted message, the request fails.

.google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
QuotedMessageMetadata.Builder

clearName()

public QuotedMessageMetadata.Builder clearName()

Required. Resource name of the message that is quoted.

Format: spaces/{space}/messages/{message}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
QuotedMessageMetadata.Builder

This builder for chaining.

clearQuoteType()

public QuotedMessageMetadata.Builder clearQuoteType()

Optional. Specifies the quote type. If not set, defaults to REPLY in the message read/write path for backward compatibility.

.google.chat.v1.QuotedMessageMetadata.QuoteType quote_type = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
QuotedMessageMetadata.Builder

This builder for chaining.

clearQuotedMessageSnapshot()

public QuotedMessageMetadata.Builder clearQuotedMessageSnapshot()

Output only. A snapshot of the quoted message's content.

.google.chat.v1.QuotedMessageSnapshot quoted_message_snapshot = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
QuotedMessageMetadata.Builder

getDefaultInstanceForType()

public QuotedMessageMetadata getDefaultInstanceForType()
Returns
Type Description
QuotedMessageMetadata

getDescriptorForType()

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

getForwardedMetadata()

public ForwardedMetadata getForwardedMetadata()

Output only. Metadata about the source space of the quoted message. Populated only for FORWARD quote type.

.google.chat.v1.ForwardedMetadata forwarded_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ForwardedMetadata

The forwardedMetadata.

getForwardedMetadataBuilder()

public ForwardedMetadata.Builder getForwardedMetadataBuilder()

Output only. Metadata about the source space of the quoted message. Populated only for FORWARD quote type.

.google.chat.v1.ForwardedMetadata forwarded_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ForwardedMetadata.Builder

getForwardedMetadataOrBuilder()

public ForwardedMetadataOrBuilder getForwardedMetadataOrBuilder()

Output only. Metadata about the source space of the quoted message. Populated only for FORWARD quote type.

.google.chat.v1.ForwardedMetadata forwarded_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ForwardedMetadataOrBuilder

getLastUpdateTime()

public Timestamp getLastUpdateTime()

Required. The timestamp when the quoted message was created or when the quoted message was last updated.

If the message was edited, use this field, last_update_time. If the message was never edited, use create_time.

If last_update_time doesn't match the latest version of the quoted message, the request fails.

.google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Timestamp

The lastUpdateTime.

getLastUpdateTimeBuilder()

public Timestamp.Builder getLastUpdateTimeBuilder()

Required. The timestamp when the quoted message was created or when the quoted message was last updated.

If the message was edited, use this field, last_update_time. If the message was never edited, use create_time.

If last_update_time doesn't match the latest version of the quoted message, the request fails.

.google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getLastUpdateTimeOrBuilder()

public TimestampOrBuilder getLastUpdateTimeOrBuilder()

Required. The timestamp when the quoted message was created or when the quoted message was last updated.

If the message was edited, use this field, last_update_time. If the message was never edited, use create_time.

If last_update_time doesn't match the latest version of the quoted message, the request fails.

.google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimestampOrBuilder

getName()

public String getName()

Required. Resource name of the message that is quoted.

Format: spaces/{space}/messages/{message}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. Resource name of the message that is quoted.

Format: spaces/{space}/messages/{message}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for name.

getQuoteType()

public QuotedMessageMetadata.QuoteType getQuoteType()

Optional. Specifies the quote type. If not set, defaults to REPLY in the message read/write path for backward compatibility.

.google.chat.v1.QuotedMessageMetadata.QuoteType quote_type = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
QuotedMessageMetadata.QuoteType

The quoteType.

getQuoteTypeValue()

public int getQuoteTypeValue()

Optional. Specifies the quote type. If not set, defaults to REPLY in the message read/write path for backward compatibility.

.google.chat.v1.QuotedMessageMetadata.QuoteType quote_type = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for quoteType.

getQuotedMessageSnapshot()

public QuotedMessageSnapshot getQuotedMessageSnapshot()

Output only. A snapshot of the quoted message's content.

.google.chat.v1.QuotedMessageSnapshot quoted_message_snapshot = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
QuotedMessageSnapshot

The quotedMessageSnapshot.

getQuotedMessageSnapshotBuilder()

public QuotedMessageSnapshot.Builder getQuotedMessageSnapshotBuilder()

Output only. A snapshot of the quoted message's content.

.google.chat.v1.QuotedMessageSnapshot quoted_message_snapshot = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
QuotedMessageSnapshot.Builder

getQuotedMessageSnapshotOrBuilder()

public QuotedMessageSnapshotOrBuilder getQuotedMessageSnapshotOrBuilder()

Output only. A snapshot of the quoted message's content.

.google.chat.v1.QuotedMessageSnapshot quoted_message_snapshot = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
QuotedMessageSnapshotOrBuilder

hasForwardedMetadata()

public boolean hasForwardedMetadata()

Output only. Metadata about the source space of the quoted message. Populated only for FORWARD quote type.

.google.chat.v1.ForwardedMetadata forwarded_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the forwardedMetadata field is set.

hasLastUpdateTime()

public boolean hasLastUpdateTime()

Required. The timestamp when the quoted message was created or when the quoted message was last updated.

If the message was edited, use this field, last_update_time. If the message was never edited, use create_time.

If last_update_time doesn't match the latest version of the quoted message, the request fails.

.google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the lastUpdateTime field is set.

hasQuotedMessageSnapshot()

public boolean hasQuotedMessageSnapshot()

Output only. A snapshot of the quoted message's content.

.google.chat.v1.QuotedMessageSnapshot quoted_message_snapshot = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the quotedMessageSnapshot field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeForwardedMetadata(ForwardedMetadata value)

public QuotedMessageMetadata.Builder mergeForwardedMetadata(ForwardedMetadata value)

Output only. Metadata about the source space of the quoted message. Populated only for FORWARD quote type.

.google.chat.v1.ForwardedMetadata forwarded_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ForwardedMetadata
Returns
Type Description
QuotedMessageMetadata.Builder

mergeFrom(QuotedMessageMetadata other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeLastUpdateTime(Timestamp value)

public QuotedMessageMetadata.Builder mergeLastUpdateTime(Timestamp value)

Required. The timestamp when the quoted message was created or when the quoted message was last updated.

If the message was edited, use this field, last_update_time. If the message was never edited, use create_time.

If last_update_time doesn't match the latest version of the quoted message, the request fails.

.google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
QuotedMessageMetadata.Builder

mergeQuotedMessageSnapshot(QuotedMessageSnapshot value)

public QuotedMessageMetadata.Builder mergeQuotedMessageSnapshot(QuotedMessageSnapshot value)

Output only. A snapshot of the quoted message's content.

.google.chat.v1.QuotedMessageSnapshot quoted_message_snapshot = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value QuotedMessageSnapshot
Returns
Type Description
QuotedMessageMetadata.Builder

setForwardedMetadata(ForwardedMetadata value)

public QuotedMessageMetadata.Builder setForwardedMetadata(ForwardedMetadata value)

Output only. Metadata about the source space of the quoted message. Populated only for FORWARD quote type.

.google.chat.v1.ForwardedMetadata forwarded_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ForwardedMetadata
Returns
Type Description
QuotedMessageMetadata.Builder

setForwardedMetadata(ForwardedMetadata.Builder builderForValue)

public QuotedMessageMetadata.Builder setForwardedMetadata(ForwardedMetadata.Builder builderForValue)

Output only. Metadata about the source space of the quoted message. Populated only for FORWARD quote type.

.google.chat.v1.ForwardedMetadata forwarded_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue ForwardedMetadata.Builder
Returns
Type Description
QuotedMessageMetadata.Builder

setLastUpdateTime(Timestamp value)

public QuotedMessageMetadata.Builder setLastUpdateTime(Timestamp value)

Required. The timestamp when the quoted message was created or when the quoted message was last updated.

If the message was edited, use this field, last_update_time. If the message was never edited, use create_time.

If last_update_time doesn't match the latest version of the quoted message, the request fails.

.google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
QuotedMessageMetadata.Builder

setLastUpdateTime(Timestamp.Builder builderForValue)

public QuotedMessageMetadata.Builder setLastUpdateTime(Timestamp.Builder builderForValue)

Required. The timestamp when the quoted message was created or when the quoted message was last updated.

If the message was edited, use this field, last_update_time. If the message was never edited, use create_time.

If last_update_time doesn't match the latest version of the quoted message, the request fails.

.google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
QuotedMessageMetadata.Builder

setName(String value)

public QuotedMessageMetadata.Builder setName(String value)

Required. Resource name of the message that is quoted.

Format: spaces/{space}/messages/{message}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The name to set.

Returns
Type Description
QuotedMessageMetadata.Builder

This builder for chaining.

setNameBytes(ByteString value)

public QuotedMessageMetadata.Builder setNameBytes(ByteString value)

Required. Resource name of the message that is quoted.

Format: spaces/{space}/messages/{message}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
QuotedMessageMetadata.Builder

This builder for chaining.

setQuoteType(QuotedMessageMetadata.QuoteType value)

public QuotedMessageMetadata.Builder setQuoteType(QuotedMessageMetadata.QuoteType value)

Optional. Specifies the quote type. If not set, defaults to REPLY in the message read/write path for backward compatibility.

.google.chat.v1.QuotedMessageMetadata.QuoteType quote_type = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value QuotedMessageMetadata.QuoteType

The quoteType to set.

Returns
Type Description
QuotedMessageMetadata.Builder

This builder for chaining.

setQuoteTypeValue(int value)

public QuotedMessageMetadata.Builder setQuoteTypeValue(int value)

Optional. Specifies the quote type. If not set, defaults to REPLY in the message read/write path for backward compatibility.

.google.chat.v1.QuotedMessageMetadata.QuoteType quote_type = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
QuotedMessageMetadata.Builder

This builder for chaining.

setQuotedMessageSnapshot(QuotedMessageSnapshot value)

public QuotedMessageMetadata.Builder setQuotedMessageSnapshot(QuotedMessageSnapshot value)

Output only. A snapshot of the quoted message's content.

.google.chat.v1.QuotedMessageSnapshot quoted_message_snapshot = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value QuotedMessageSnapshot
Returns
Type Description
QuotedMessageMetadata.Builder

setQuotedMessageSnapshot(QuotedMessageSnapshot.Builder builderForValue)

public QuotedMessageMetadata.Builder setQuotedMessageSnapshot(QuotedMessageSnapshot.Builder builderForValue)

Output only. A snapshot of the quoted message's content.

.google.chat.v1.QuotedMessageSnapshot quoted_message_snapshot = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue QuotedMessageSnapshot.Builder
Returns
Type Description
QuotedMessageMetadata.Builder