Class: Google::Apis::ChatV1::Membership

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Membership

Returns a new instance of Membership.



5180
5181
5182
# File 'lib/google/apis/chat_v1/classes.rb', line 5180

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#affiliationString

Output only. A user's relationship to the Workspace organization that owns the space. In spaces owned by consumer accounts, the affiliation of all members is EXTERNAL. Corresponds to the JSON property affiliation

Returns:

  • (String)


5133
5134
5135
# File 'lib/google/apis/chat_v1/classes.rb', line 5133

def affiliation
  @affiliation
end

#create_timeString

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. Corresponds to the JSON property createTime

Returns:

  • (String)


5140
5141
5142
# File 'lib/google/apis/chat_v1/classes.rb', line 5140

def create_time
  @create_time
end

#delete_timeString

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. Corresponds to the JSON property deleteTime

Returns:

  • (String)


5147
5148
5149
# File 'lib/google/apis/chat_v1/classes.rb', line 5147

def delete_time
  @delete_time
end

#group_memberGoogle::Apis::ChatV1::Group

A Google Group in Google Chat. Corresponds to the JSON property groupMember



5152
5153
5154
# File 'lib/google/apis/chat_v1/classes.rb', line 5152

def group_member
  @group_member
end

#memberGoogle::Apis::ChatV1::User

A user in Google Chat. When returned as an output from a request, if your Chat app authenticates as a user, the output for a User resource only populates the user's name and type. Corresponds to the JSON property member



5160
5161
5162
# File 'lib/google/apis/chat_v1/classes.rb', line 5160

def member
  @member
end

#nameString

Identifier. Resource name of the membership, assigned by the server. Format: spaces/space/members/member` Corresponds to the JSON propertyname`

Returns:

  • (String)


5166
5167
5168
# File 'lib/google/apis/chat_v1/classes.rb', line 5166

def name
  @name
end

#roleString

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. Corresponds to the JSON property role

Returns:

  • (String)


5173
5174
5175
# File 'lib/google/apis/chat_v1/classes.rb', line 5173

def role
  @role
end

#stateString

Output only. State of the membership. Corresponds to the JSON property state

Returns:

  • (String)


5178
5179
5180
# File 'lib/google/apis/chat_v1/classes.rb', line 5178

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
# File 'lib/google/apis/chat_v1/classes.rb', line 5185

def update!(**args)
  @affiliation = args[:affiliation] if args.key?(:affiliation)
  @create_time = args[:create_time] if args.key?(:create_time)
  @delete_time = args[:delete_time] if args.key?(:delete_time)
  @group_member = args[:group_member] if args.key?(:group_member)
  @member = args[:member] if args.key?(:member)
  @name = args[:name] if args.key?(:name)
  @role = args[:role] if args.key?(:role)
  @state = args[:state] if args.key?(:state)
end