Class Thread.Builder (0.49.0)

public static final class Thread.Builder extends GeneratedMessage.Builder<Thread.Builder> implements ThreadOrBuilder

A thread in a Google Chat space. For example usage, see Start or reply to a message thread.

If you specify a thread when creating a message, you can set the messageReplyOption field to determine what happens if no matching thread is found.

Protobuf type google.chat.v1.Thread

Implements

ThreadOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Thread build()
Returns
Type Description
Thread

buildPartial()

public Thread buildPartial()
Returns
Type Description
Thread

clear()

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

clearName()

public Thread.Builder clearName()

Identifier. Resource name of the thread.

Example: spaces/{space}/threads/{thread}

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

Returns
Type Description
Thread.Builder

This builder for chaining.

clearThreadKey()

public Thread.Builder clearThreadKey()

Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters.

This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread name field instead.

string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Thread.Builder

This builder for chaining.

getDefaultInstanceForType()

public Thread getDefaultInstanceForType()
Returns
Type Description
Thread

getDescriptorForType()

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

getName()

public String getName()

Identifier. Resource name of the thread.

Example: spaces/{space}/threads/{thread}

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Resource name of the thread.

Example: spaces/{space}/threads/{thread}

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

Returns
Type Description
ByteString

The bytes for name.

getThreadKey()

public String getThreadKey()

Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters.

This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread name field instead.

string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The threadKey.

getThreadKeyBytes()

public ByteString getThreadKeyBytes()

Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters.

This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread name field instead.

string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for threadKey.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Thread other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setName(String value)

public Thread.Builder setName(String value)

Identifier. Resource name of the thread.

Example: spaces/{space}/threads/{thread}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Thread.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Thread.Builder setNameBytes(ByteString value)

Identifier. Resource name of the thread.

Example: spaces/{space}/threads/{thread}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Thread.Builder

This builder for chaining.

setThreadKey(String value)

public Thread.Builder setThreadKey(String value)

Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters.

This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread name field instead.

string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The threadKey to set.

Returns
Type Description
Thread.Builder

This builder for chaining.

setThreadKeyBytes(ByteString value)

public Thread.Builder setThreadKeyBytes(ByteString value)

Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters.

This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread name field instead.

string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for threadKey to set.

Returns
Type Description
Thread.Builder

This builder for chaining.