Class MessagePin.Builder (0.63.0)

public static final class MessagePin.Builder extends GeneratedMessage.Builder<MessagePin.Builder> implements MessagePinOrBuilder

A pin on a Chat message. For more information see Pin a message.

Protobuf type google.chat.v1.MessagePin

Implements

MessagePinOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public MessagePin build()
Returns
Type Description
MessagePin

buildPartial()

public MessagePin buildPartial()
Returns
Type Description
MessagePin

clear()

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

clearMessage()

public MessagePin.Builder clearMessage()

Required. Immutable. The resource name of the message that is pinned. Format: spaces/{space}/messages/{message}

string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
MessagePin.Builder

This builder for chaining.

clearName()

public MessagePin.Builder clearName()

Identifier. The resource name of the message pin. Format: spaces/{space}/messagePins/{message_pin} The resource ID component matches the resource ID component of the message. For example, a message with spaces/AAA/messages/bbb.ccc corresponds to the message pin with the resource name spaces/AAA/messagePins/bbb.ccc.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
MessagePin.Builder

This builder for chaining.

getDefaultInstanceForType()

public MessagePin getDefaultInstanceForType()
Returns
Type Description
MessagePin

getDescriptorForType()

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

getMessage()

public String getMessage()

Required. Immutable. The resource name of the message that is pinned. Format: spaces/{space}/messages/{message}

string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The message.

getMessageBytes()

public ByteString getMessageBytes()

Required. Immutable. The resource name of the message that is pinned. Format: spaces/{space}/messages/{message}

string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for message.

getName()

public String getName()

Identifier. The resource name of the message pin. Format: spaces/{space}/messagePins/{message_pin} The resource ID component matches the resource ID component of the message. For example, a message with spaces/AAA/messages/bbb.ccc corresponds to the message pin with the resource name spaces/AAA/messagePins/bbb.ccc.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the message pin. Format: spaces/{space}/messagePins/{message_pin} The resource ID component matches the resource ID component of the message. For example, a message with spaces/AAA/messages/bbb.ccc corresponds to the message pin with the resource name spaces/AAA/messagePins/bbb.ccc.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MessagePin other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setMessage(String value)

public MessagePin.Builder setMessage(String value)

Required. Immutable. The resource name of the message that is pinned. Format: spaces/{space}/messages/{message}

string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The message to set.

Returns
Type Description
MessagePin.Builder

This builder for chaining.

setMessageBytes(ByteString value)

public MessagePin.Builder setMessageBytes(ByteString value)

Required. Immutable. The resource name of the message that is pinned. Format: spaces/{space}/messages/{message}

string message = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for message to set.

Returns
Type Description
MessagePin.Builder

This builder for chaining.

setName(String value)

public MessagePin.Builder setName(String value)

Identifier. The resource name of the message pin. Format: spaces/{space}/messagePins/{message_pin} The resource ID component matches the resource ID component of the message. For example, a message with spaces/AAA/messages/bbb.ccc corresponds to the message pin with the resource name spaces/AAA/messagePins/bbb.ccc.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
MessagePin.Builder

This builder for chaining.

setNameBytes(ByteString value)

public MessagePin.Builder setNameBytes(ByteString value)

Identifier. The resource name of the message pin. Format: spaces/{space}/messagePins/{message_pin} The resource ID component matches the resource ID component of the message. For example, a message with spaces/AAA/messages/bbb.ccc corresponds to the message pin with the resource name spaces/AAA/messagePins/bbb.ccc.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
MessagePin.Builder

This builder for chaining.