Google Apps Chat V1 Client - Class Membership (0.13.0)

Reference documentation and code samples for the Google Apps Chat V1 Client class Membership.

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.

Generated from protobuf message google.chat.v1.Membership

Namespace

Google \ Apps \ Chat \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Identifier. Resource name of the membership, assigned by the server. Format: spaces/{space}/members/{member}

↳ state int

Output only. State of the membership.

↳ role int

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.

↳ member User

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.

↳ group_member Group

Optional. The Google Group the membership corresponds to. Reading or mutating memberships for Google Groups requires user authentication.

↳ create_time Google\Protobuf\Timestamp

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.

↳ delete_time Google\Protobuf\Timestamp

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.

getName

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

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

Returns
Type Description
string

setName

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

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

Parameter
Name Description
var string
Returns
Type Description
$this

getState

Output only. State of the membership.

Returns
Type Description
int Enum of type MembershipState.

setState

Output only. State of the membership.

Parameter
Name Description
var int

Enum of type MembershipState.

Returns
Type Description
$this

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.

Returns
Type Description
int Enum of type MembershipRole.

setRole

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.

Parameter
Name Description
var int

Enum of type MembershipRole.

Returns
Type Description
$this

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.

Returns
Type Description
User|null

hasMember

setMember

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.

Parameter
Name Description
var User
Returns
Type Description
$this

getGroupMember

Optional. The Google Group the membership corresponds to.

Reading or mutating memberships for Google Groups requires user authentication.

Returns
Type Description
Group|null

hasGroupMember

setGroupMember

Optional. The Google Group the membership corresponds to.

Reading or mutating memberships for Google Groups requires user authentication.

Parameter
Name Description
var Group
Returns
Type Description
$this

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.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

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.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

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.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasDeleteTime

clearDeleteTime

setDeleteTime

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.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getMemberType

Returns
Type Description
string