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.



2522
2523
2524
# File 'lib/google/apis/chat_v1/classes.rb', line 2522

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)


2505
2506
2507
# File 'lib/google/apis/chat_v1/classes.rb', line 2505

def create_time
  @create_time
end

#memberGoogle::Apis::ChatV1::User

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



2510
2511
2512
# File 'lib/google/apis/chat_v1/classes.rb', line 2510

def member
  @member
end

#nameString

Resource name of the membership. Format: spaces/space/members/member Corresponds to the JSON property name

Returns:

  • (String)


2515
2516
2517
# File 'lib/google/apis/chat_v1/classes.rb', line 2515

def name
  @name
end

#stateString

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

Returns:

  • (String)


2520
2521
2522
# File 'lib/google/apis/chat_v1/classes.rb', line 2520

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2527
2528
2529
2530
2531
2532
# File 'lib/google/apis/chat_v1/classes.rb', line 2527

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)
  @state = args[:state] if args.key?(:state)
end