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.



3045
3046
3047
# File 'lib/google/apis/chat_v1/classes.rb', line 3045

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

Instance Attribute Details

#create_timeString

Output only. The creation time of the membership, such as when a member joined or was invited to join a space. Corresponds to the JSON property createTime

Returns:

  • (String)


3021
3022
3023
# File 'lib/google/apis/chat_v1/classes.rb', line 3021

def create_time
  @create_time
end

#memberGoogle::Apis::ChatV1::User

A user in Google Chat. Corresponds to the JSON property member



3026
3027
3028
# File 'lib/google/apis/chat_v1/classes.rb', line 3026

def member
  @member
end

#nameString

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

Returns:

  • (String)


3032
3033
3034
# File 'lib/google/apis/chat_v1/classes.rb', line 3032

def name
  @name
end

#roleString

Output only. User's role within a Chat space, which determines their permitted actions in the space. Corresponds to the JSON property role

Returns:

  • (String)


3038
3039
3040
# File 'lib/google/apis/chat_v1/classes.rb', line 3038

def role
  @role
end

#stateString

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

Returns:

  • (String)


3043
3044
3045
# File 'lib/google/apis/chat_v1/classes.rb', line 3043

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3050
3051
3052
3053
3054
3055
3056
# File 'lib/google/apis/chat_v1/classes.rb', line 3050

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @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