Class Membership.Builder (0.13.0)

public static final class Membership.Builder extends GeneratedMessageV3.Builder<Membership.Builder> implements MembershipOrBuilder

Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.

Protobuf type google.chat.v1.Membership

Implements

MembershipOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Membership build()
Returns
Type Description
Membership

buildPartial()

public Membership buildPartial()
Returns
Type Description
Membership

clear()

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

clearCreateTime()

public Membership.Builder clearCreateTime()

Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Membership.Builder

clearDeleteTime()

public Membership.Builder clearDeleteTime()

Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Membership.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearGroupMember()

public Membership.Builder clearGroupMember()

The Google Group the membership corresponds to.

.google.chat.v1.Group group_member = 5;

Returns
Type Description
Membership.Builder

clearMember()

public Membership.Builder clearMember()

The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User member = 3;

Returns
Type Description
Membership.Builder

clearMemberType()

public Membership.Builder clearMemberType()
Returns
Type Description
Membership.Builder

clearName()

public Membership.Builder clearName()

Resource name of the membership, assigned by the server.

Format: spaces/{space}/members/{member}

string name = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
Membership.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRole()

public Membership.Builder clearRole()

Optional. User's role within a Chat space, which determines their permitted actions in the space.

This field can only be used as input in UpdateMembership.

.google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Membership.Builder

This builder for chaining.

clearState()

public Membership.Builder clearState()

Output only. State of the membership.

.google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Membership.Builder

This builder for chaining.

clone()

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

getCreateTime()

public Timestamp getCreateTime()

Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Membership getDefaultInstanceForType()
Returns
Type Description
Membership

getDeleteTime()

public Timestamp getDeleteTime()

Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Timestamp

The deleteTime.

getDeleteTimeBuilder()

public Timestamp.Builder getDeleteTimeBuilder()

Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getDeleteTimeOrBuilder()

public TimestampOrBuilder getDeleteTimeOrBuilder()

Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TimestampOrBuilder

getDescriptorForType()

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

getGroupMember()

public Group getGroupMember()

The Google Group the membership corresponds to.

.google.chat.v1.Group group_member = 5;

Returns
Type Description
Group

The groupMember.

getGroupMemberBuilder()

public Group.Builder getGroupMemberBuilder()

The Google Group the membership corresponds to.

.google.chat.v1.Group group_member = 5;

Returns
Type Description
Group.Builder

getGroupMemberOrBuilder()

public GroupOrBuilder getGroupMemberOrBuilder()

The Google Group the membership corresponds to.

.google.chat.v1.Group group_member = 5;

Returns
Type Description
GroupOrBuilder

getMember()

public User getMember()

The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User member = 3;

Returns
Type Description
User

The member.

getMemberBuilder()

public User.Builder getMemberBuilder()

The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User member = 3;

Returns
Type Description
User.Builder

getMemberOrBuilder()

public UserOrBuilder getMemberOrBuilder()

The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User member = 3;

Returns
Type Description
UserOrBuilder

getMemberTypeCase()

public Membership.MemberTypeCase getMemberTypeCase()
Returns
Type Description
Membership.MemberTypeCase

getName()

public String getName()

Resource name of the membership, assigned by the server.

Format: spaces/{space}/members/{member}

string name = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource name of the membership, assigned by the server.

Format: spaces/{space}/members/{member}

string name = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for name.

getRole()

public Membership.MembershipRole getRole()

Optional. User's role within a Chat space, which determines their permitted actions in the space.

This field can only be used as input in UpdateMembership.

.google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Membership.MembershipRole

The role.

getRoleValue()

public int getRoleValue()

Optional. User's role within a Chat space, which determines their permitted actions in the space.

This field can only be used as input in UpdateMembership.

.google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for role.

getState()

public Membership.MembershipState getState()

Output only. State of the membership.

.google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Membership.MembershipState

The state.

getStateValue()

public int getStateValue()

Output only. State of the membership.

.google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

hasCreateTime()

public boolean hasCreateTime()

Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the createTime field is set.

hasDeleteTime()

public boolean hasDeleteTime()

Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the deleteTime field is set.

hasGroupMember()

public boolean hasGroupMember()

The Google Group the membership corresponds to.

.google.chat.v1.Group group_member = 5;

Returns
Type Description
boolean

Whether the groupMember field is set.

hasMember()

public boolean hasMember()

The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User member = 3;

Returns
Type Description
boolean

Whether the member field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Membership.Builder mergeCreateTime(Timestamp value)

Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Membership.Builder

mergeDeleteTime(Timestamp value)

public Membership.Builder mergeDeleteTime(Timestamp value)

Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Membership.Builder

mergeFrom(Membership other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeGroupMember(Group value)

public Membership.Builder mergeGroupMember(Group value)

The Google Group the membership corresponds to.

.google.chat.v1.Group group_member = 5;

Parameter
Name Description
value Group
Returns
Type Description
Membership.Builder

mergeMember(User value)

public Membership.Builder mergeMember(User value)

The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User member = 3;

Parameter
Name Description
value User
Returns
Type Description
Membership.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setCreateTime(Timestamp value)

public Membership.Builder setCreateTime(Timestamp value)

Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Membership.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Membership.Builder setCreateTime(Timestamp.Builder builderForValue)

Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Membership.Builder

setDeleteTime(Timestamp value)

public Membership.Builder setDeleteTime(Timestamp value)

Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Membership.Builder

setDeleteTime(Timestamp.Builder builderForValue)

public Membership.Builder setDeleteTime(Timestamp.Builder builderForValue)

Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.

.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Membership.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setGroupMember(Group value)

public Membership.Builder setGroupMember(Group value)

The Google Group the membership corresponds to.

.google.chat.v1.Group group_member = 5;

Parameter
Name Description
value Group
Returns
Type Description
Membership.Builder

setGroupMember(Group.Builder builderForValue)

public Membership.Builder setGroupMember(Group.Builder builderForValue)

The Google Group the membership corresponds to.

.google.chat.v1.Group group_member = 5;

Parameter
Name Description
builderForValue Group.Builder
Returns
Type Description
Membership.Builder

setMember(User value)

public Membership.Builder setMember(User value)

The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User member = 3;

Parameter
Name Description
value User
Returns
Type Description
Membership.Builder

setMember(User.Builder builderForValue)

public Membership.Builder setMember(User.Builder builderForValue)

The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User member = 3;

Parameter
Name Description
builderForValue User.Builder
Returns
Type Description
Membership.Builder

setName(String value)

public Membership.Builder setName(String value)

Resource name of the membership, assigned by the server.

Format: spaces/{space}/members/{member}

string name = 1 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Membership.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Membership.Builder setNameBytes(ByteString value)

Resource name of the membership, assigned by the server.

Format: spaces/{space}/members/{member}

string name = 1 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Membership.Builder

This builder for chaining.

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

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

setRole(Membership.MembershipRole value)

public Membership.Builder setRole(Membership.MembershipRole value)

Optional. User's role within a Chat space, which determines their permitted actions in the space.

This field can only be used as input in UpdateMembership.

.google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Membership.MembershipRole

The role to set.

Returns
Type Description
Membership.Builder

This builder for chaining.

setRoleValue(int value)

public Membership.Builder setRoleValue(int value)

Optional. User's role within a Chat space, which determines their permitted actions in the space.

This field can only be used as input in UpdateMembership.

.google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
Membership.Builder

This builder for chaining.

setState(Membership.MembershipState value)

public Membership.Builder setState(Membership.MembershipState value)

Output only. State of the membership.

.google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Membership.MembershipState

The state to set.

Returns
Type Description
Membership.Builder

This builder for chaining.

setStateValue(int value)

public Membership.Builder setStateValue(int value)

Output only. State of the membership.

.google.chat.v1.Membership.MembershipState 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
Membership.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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