Google Apps Chat V1 Client - Class Membership (0.7.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

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

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

The Google Group the membership corresponds to.

↳ 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

Resource name of the membership, assigned by the server.

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

Returns
Type Description
string

setName

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

setState

Output only. State of the membership.

Parameter
Name Description
var int
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

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
Returns
Type Description
$this

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.

Returns
Type Description
User|null

hasMember

setMember

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

The Google Group the membership corresponds to.

Returns
Type Description
Group|null

hasGroupMember

setGroupMember

The Google Group the membership corresponds to.

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