Class Availability.Builder (0.59.0)

public static final class Availability.Builder extends GeneratedMessage.Builder<Availability.Builder> implements AvailabilityOrBuilder

Represents a user's current availability information in Google Chat, including their state (for example, Active, Away, Do Not Disturb) and any custom status.

Protobuf type google.chat.v1.Availability

Static Methods

getDescriptor()

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

Methods

build()

public Availability build()
Returns
Type Description
Availability

buildPartial()

public Availability buildPartial()
Returns
Type Description
Availability

clear()

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

clearCustomStatus()

public Availability.Builder clearCustomStatus()

Optional. The user's custom status.

.google.chat.v1.CustomStatus custom_status = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Availability.Builder

clearDoNotDisturbMetadata()

public Availability.Builder clearDoNotDisturbMetadata()

Output only. Metadata if the user state is set to DO_NOT_DISTURB.

.google.chat.v1.DoNotDisturbMetadata do_not_disturb_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Availability.Builder

clearName()

public Availability.Builder clearName()

Identifier. Resource name of the user's availability.

Format: users/{user}/availability

{user} is the id for the Person in the People API or Admin SDK directory API. For example, users/123456789.

The user's email address or me can also be used as an alias to refer to the caller. For example, users/user@example.com or users/me.

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

Returns
Type Description
Availability.Builder

This builder for chaining.

clearState()

public Availability.Builder clearState()

Output only. The user's current availability state.

.google.chat.v1.Availability.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Availability.Builder

This builder for chaining.

clearStateMetadata()

public Availability.Builder clearStateMetadata()
Returns
Type Description
Availability.Builder

getCustomStatus()

public CustomStatus getCustomStatus()

Optional. The user's custom status.

.google.chat.v1.CustomStatus custom_status = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomStatus

The customStatus.

getCustomStatusBuilder()

public CustomStatus.Builder getCustomStatusBuilder()

Optional. The user's custom status.

.google.chat.v1.CustomStatus custom_status = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomStatus.Builder

getCustomStatusOrBuilder()

public CustomStatusOrBuilder getCustomStatusOrBuilder()

Optional. The user's custom status.

.google.chat.v1.CustomStatus custom_status = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomStatusOrBuilder

getDefaultInstanceForType()

public Availability getDefaultInstanceForType()
Returns
Type Description
Availability

getDescriptorForType()

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

getDoNotDisturbMetadata()

public DoNotDisturbMetadata getDoNotDisturbMetadata()

Output only. Metadata if the user state is set to DO_NOT_DISTURB.

.google.chat.v1.DoNotDisturbMetadata do_not_disturb_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DoNotDisturbMetadata

The doNotDisturbMetadata.

getDoNotDisturbMetadataBuilder()

public DoNotDisturbMetadata.Builder getDoNotDisturbMetadataBuilder()

Output only. Metadata if the user state is set to DO_NOT_DISTURB.

.google.chat.v1.DoNotDisturbMetadata do_not_disturb_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DoNotDisturbMetadata.Builder

getDoNotDisturbMetadataOrBuilder()

public DoNotDisturbMetadataOrBuilder getDoNotDisturbMetadataOrBuilder()

Output only. Metadata if the user state is set to DO_NOT_DISTURB.

.google.chat.v1.DoNotDisturbMetadata do_not_disturb_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DoNotDisturbMetadataOrBuilder

getName()

public String getName()

Identifier. Resource name of the user's availability.

Format: users/{user}/availability

{user} is the id for the Person in the People API or Admin SDK directory API. For example, users/123456789.

The user's email address or me can also be used as an alias to refer to the caller. For example, users/user@example.com or users/me.

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Resource name of the user's availability.

Format: users/{user}/availability

{user} is the id for the Person in the People API or Admin SDK directory API. For example, users/123456789.

The user's email address or me can also be used as an alias to refer to the caller. For example, users/user@example.com or users/me.

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

Returns
Type Description
ByteString

The bytes for name.

getState()

public Availability.State getState()

Output only. The user's current availability state.

.google.chat.v1.Availability.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Availability.State

The state.

getStateMetadataCase()

public Availability.StateMetadataCase getStateMetadataCase()
Returns
Type Description
Availability.StateMetadataCase

getStateValue()

public int getStateValue()

Output only. The user's current availability state.

.google.chat.v1.Availability.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

hasCustomStatus()

public boolean hasCustomStatus()

Optional. The user's custom status.

.google.chat.v1.CustomStatus custom_status = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the customStatus field is set.

hasDoNotDisturbMetadata()

public boolean hasDoNotDisturbMetadata()

Output only. Metadata if the user state is set to DO_NOT_DISTURB.

.google.chat.v1.DoNotDisturbMetadata do_not_disturb_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the doNotDisturbMetadata field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCustomStatus(CustomStatus value)

public Availability.Builder mergeCustomStatus(CustomStatus value)

Optional. The user's custom status.

.google.chat.v1.CustomStatus custom_status = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CustomStatus
Returns
Type Description
Availability.Builder

mergeDoNotDisturbMetadata(DoNotDisturbMetadata value)

public Availability.Builder mergeDoNotDisturbMetadata(DoNotDisturbMetadata value)

Output only. Metadata if the user state is set to DO_NOT_DISTURB.

.google.chat.v1.DoNotDisturbMetadata do_not_disturb_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value DoNotDisturbMetadata
Returns
Type Description
Availability.Builder

mergeFrom(Availability other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setCustomStatus(CustomStatus value)

public Availability.Builder setCustomStatus(CustomStatus value)

Optional. The user's custom status.

.google.chat.v1.CustomStatus custom_status = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CustomStatus
Returns
Type Description
Availability.Builder

setCustomStatus(CustomStatus.Builder builderForValue)

public Availability.Builder setCustomStatus(CustomStatus.Builder builderForValue)

Optional. The user's custom status.

.google.chat.v1.CustomStatus custom_status = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue CustomStatus.Builder
Returns
Type Description
Availability.Builder

setDoNotDisturbMetadata(DoNotDisturbMetadata value)

public Availability.Builder setDoNotDisturbMetadata(DoNotDisturbMetadata value)

Output only. Metadata if the user state is set to DO_NOT_DISTURB.

.google.chat.v1.DoNotDisturbMetadata do_not_disturb_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value DoNotDisturbMetadata
Returns
Type Description
Availability.Builder

setDoNotDisturbMetadata(DoNotDisturbMetadata.Builder builderForValue)

public Availability.Builder setDoNotDisturbMetadata(DoNotDisturbMetadata.Builder builderForValue)

Output only. Metadata if the user state is set to DO_NOT_DISTURB.

.google.chat.v1.DoNotDisturbMetadata do_not_disturb_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue DoNotDisturbMetadata.Builder
Returns
Type Description
Availability.Builder

setName(String value)

public Availability.Builder setName(String value)

Identifier. Resource name of the user's availability.

Format: users/{user}/availability

{user} is the id for the Person in the People API or Admin SDK directory API. For example, users/123456789.

The user's email address or me can also be used as an alias to refer to the caller. For example, users/user@example.com or users/me.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Availability.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Availability.Builder setNameBytes(ByteString value)

Identifier. Resource name of the user's availability.

Format: users/{user}/availability

{user} is the id for the Person in the People API or Admin SDK directory API. For example, users/123456789.

The user's email address or me can also be used as an alias to refer to the caller. For example, users/user@example.com or users/me.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Availability.Builder

This builder for chaining.

setState(Availability.State value)

public Availability.Builder setState(Availability.State value)

Output only. The user's current availability state.

.google.chat.v1.Availability.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Availability.State

The state to set.

Returns
Type Description
Availability.Builder

This builder for chaining.

setStateValue(int value)

public Availability.Builder setStateValue(int value)

Output only. The user's current availability state.

.google.chat.v1.Availability.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
Availability.Builder

This builder for chaining.