Class: Google::Apis::ChatV1::Availability

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 user's current availability information in Google Chat, including their state (for example, Active, Away, Do Not Disturb) and any custom status.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Availability

Returns a new instance of Availability.



424
425
426
# File 'lib/google/apis/chat_v1/classes.rb', line 424

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

Instance Attribute Details

#custom_statusGoogle::Apis::ChatV1::CustomStatus

Represents a user's custom status in Google Chat. This includes a short text message with an optional emoji that a user sets to give more context about their availability. Corresponds to the JSON property customStatus



402
403
404
# File 'lib/google/apis/chat_v1/classes.rb', line 402

def custom_status
  @custom_status
end

#do_not_disturb_metadataGoogle::Apis::ChatV1::DoNotDisturbMetadata

Metadata associated with the DO_NOT_DISTURB availability state, specifying when the state is set to expire. Corresponds to the JSON property doNotDisturbMetadata



408
409
410
# File 'lib/google/apis/chat_v1/classes.rb', line 408

def 
  @do_not_disturb_metadata
end

#nameString

Identifier. Resource name of the user's availability. Format: users/user/ availability user is the id for the Person in the People API or Admin SDK directory API. For example, users/123456789. The user's email address or me can also be used as an alias to refer to the caller. For example, users/user@ example.com or users/me. Corresponds to the JSON property name

Returns:

  • (String)


417
418
419
# File 'lib/google/apis/chat_v1/classes.rb', line 417

def name
  @name
end

#stateString

Output only. The user's current availability state. Corresponds to the JSON property state

Returns:

  • (String)


422
423
424
# File 'lib/google/apis/chat_v1/classes.rb', line 422

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



429
430
431
432
433
434
# File 'lib/google/apis/chat_v1/classes.rb', line 429

def update!(**args)
  @custom_status = args[:custom_status] if args.key?(:custom_status)
  @do_not_disturb_metadata = args[:do_not_disturb_metadata] if args.key?(:do_not_disturb_metadata)
  @name = args[:name] if args.key?(:name)
  @state = args[:state] if args.key?(:state)
end