Class Thread.Builder (0.3.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Thread.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Thread.Builder
Overrides

build()

public Thread build()
Returns
TypeDescription
Thread

buildPartial()

public Thread buildPartial()
Returns
TypeDescription
Thread

clear()

public Thread.Builder clear()
Returns
TypeDescription
Thread.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Thread.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Thread.Builder
Overrides

clearName()

public Thread.Builder clearName()

Output only. Resource name of the thread.

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

string name = 1;

Returns
TypeDescription
Thread.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Thread.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
Thread.Builder

This builder for chaining.

clone()

public Thread.Builder clone()
Returns
TypeDescription
Thread.Builder
Overrides

getDefaultInstanceForType()

public Thread getDefaultInstanceForType()
Returns
TypeDescription
Thread

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getName()

public String getName()

Output only. Resource name of the thread.

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

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Resource name of the thread.

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

string name = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for threadKey.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Thread other)

public Thread.Builder mergeFrom(Thread other)
Parameter
NameDescription
otherThread
Returns
TypeDescription
Thread.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Thread.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Thread.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Thread.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Thread.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Thread.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Thread.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Thread.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The threadKey to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for threadKey to set.

Returns
TypeDescription
Thread.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Thread.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Thread.Builder
Overrides