Class Thread.Builder (0.9.0)

public static final class Thread.Builder extends GeneratedMessageV3.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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Thread.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Thread.Builder
Overrides

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

clearField(Descriptors.FieldDescriptor field)

public Thread.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Thread.Builder
Overrides

clearName()

public Thread.Builder clearName()

Output only. Resource name of the thread.

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

string name = 1;

Returns
Type Description
Thread.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Thread.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Thread.Builder
Overrides

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.

clone()

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

getDefaultInstanceForType()

public Thread getDefaultInstanceForType()
Returns
Type Description
Thread

getDescriptorForType()

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

getName()

public String getName()

Output only. Resource name of the thread.

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

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Resource name of the thread.

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

string name = 1;

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 GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Thread.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Thread.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Thread.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Thread.Builder
Overrides

setName(String value)

public Thread.Builder setName(String value)

Output only. Resource name of the thread.

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

string name = 1;

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)

Output only. Resource name of the thread.

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

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Thread.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Thread.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Thread.Builder
Overrides

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.

setUnknownFields(UnknownFieldSet unknownFields)

public final Thread.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Thread.Builder
Overrides