Class Membership (0.19.0)

public final class Membership extends GeneratedMessageV3 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 Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DELETE_TIME_FIELD_NUMBER

public static final int DELETE_TIME_FIELD_NUMBER
Field Value
Type Description
int

GROUP_MEMBER_FIELD_NUMBER

public static final int GROUP_MEMBER_FIELD_NUMBER
Field Value
Type Description
int

MEMBER_FIELD_NUMBER

public static final int MEMBER_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

ROLE_FIELD_NUMBER

public static final int ROLE_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Membership getDefaultInstance()
Returns
Type Description
Membership

getDescriptor()

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

newBuilder()

public static Membership.Builder newBuilder()
Returns
Type Description
Membership.Builder

newBuilder(Membership prototype)

public static Membership.Builder newBuilder(Membership prototype)
Parameter
Name Description
prototype Membership
Returns
Type Description
Membership.Builder

parseDelimitedFrom(InputStream input)

public static Membership parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Membership
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Membership parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Membership
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Membership parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Membership
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Membership parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Membership
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Membership parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Membership
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Membership parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Membership
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Membership parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Membership
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Membership parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Membership
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Membership parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Membership
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Membership parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Membership
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Membership parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Membership
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Membership parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Membership
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Membership> parser()
Returns
Type Description
Parser<Membership>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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.

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.

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

getGroupMember()

public Group getGroupMember()

Optional. The Google Group the membership corresponds to.

Reading or mutating memberships for Google Groups requires user authentication.

.google.chat.v1.Group group_member = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Group

The groupMember.

getGroupMemberOrBuilder()

public GroupOrBuilder getGroupMemberOrBuilder()

Optional. The Google Group the membership corresponds to.

Reading or mutating memberships for Google Groups requires user authentication.

.google.chat.v1.Group group_member = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GroupOrBuilder

getMember()

public User getMember()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
User

The member.

getMemberOrBuilder()

public UserOrBuilder getMemberOrBuilder()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
UserOrBuilder

getMemberTypeCase()

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

getName()

public String getName()

Identifier. Resource name of the membership, assigned by the server.

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

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Resource name of the membership, assigned by the server.

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

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

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Membership> getParserForType()
Returns
Type Description
Parser<Membership>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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()

Optional. The Google Group the membership corresponds to.

Reading or mutating memberships for Google Groups requires user authentication.

.google.chat.v1.Group group_member = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the groupMember field is set.

hasMember()

public boolean hasMember()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the member field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Membership.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Membership.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException