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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Membership build()
Returns
TypeDescription
Membership

buildPartial()

public Membership buildPartial()
Returns
TypeDescription
Membership

clear()

public Membership.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Membership.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearGroupMember()

public Membership.Builder clearGroupMember()

The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported.

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

Returns
TypeDescription
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
TypeDescription
Membership.Builder

clearMemberType()

public Membership.Builder clearMemberType()
Returns
TypeDescription
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
TypeDescription
Membership.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Membership.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Membership.Builder
Overrides

clearRole()

public Membership.Builder clearRole()

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

Developer Preview: This field can only be used as input in UpdateMembership.

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

Returns
TypeDescription
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
TypeDescription
Membership.Builder

This builder for chaining.

clone()

public Membership.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Membership getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getGroupMember()

public Group getGroupMember()

The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported.

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

Returns
TypeDescription
Group

The groupMember.

getGroupMemberBuilder()

public Group.Builder getGroupMemberBuilder()

The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported.

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

Returns
TypeDescription
Group.Builder

getGroupMemberOrBuilder()

public GroupOrBuilder getGroupMemberOrBuilder()

The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported.

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

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

getMemberTypeCase()

public Membership.MemberTypeCase getMemberTypeCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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.

Developer Preview: This field can only be used as input in UpdateMembership.

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

Returns
TypeDescription
Membership.MembershipRole

The role.

getRoleValue()

public int getRoleValue()

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

Developer Preview: This field can only be used as input in UpdateMembership.

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

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

Whether the deleteTime field is set.

hasGroupMember()

public boolean hasGroupMember()

The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported.

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

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

Whether the member field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
Membership.Builder

mergeFrom(Membership other)

public Membership.Builder mergeFrom(Membership other)
Parameter
NameDescription
otherMembership
Returns
TypeDescription
Membership.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeGroupMember(Group value)

public Membership.Builder mergeGroupMember(Group value)

The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported.

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

Parameter
NameDescription
valueGroup
Returns
TypeDescription
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
NameDescription
valueUser
Returns
TypeDescription
Membership.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Membership.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Membership.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setGroupMember(Group value)

public Membership.Builder setGroupMember(Group value)

The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported.

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

Parameter
NameDescription
valueGroup
Returns
TypeDescription
Membership.Builder

setGroupMember(Group.Builder builderForValue)

public Membership.Builder setGroupMember(Group.Builder builderForValue)

The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported.

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

Parameter
NameDescription
builderForValueGroup.Builder
Returns
TypeDescription
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
NameDescription
valueUser
Returns
TypeDescription
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
NameDescription
builderForValueUser.Builder
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

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

The bytes for name to set.

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

Developer Preview: This field can only be used as input in UpdateMembership.

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

Parameter
NameDescription
valueMembership.MembershipRole

The role to set.

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

Developer Preview: This field can only be used as input in UpdateMembership.

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

Parameter
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueMembership.MembershipState

The state to set.

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

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

Returns
TypeDescription
Membership.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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