Class: Google::Apis::ChatV1::User

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

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ User

Returns a new instance of User.



5330
5331
5332
# File 'lib/google/apis/chat_v1/classes.rb', line 5330

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

Instance Attribute Details

#display_nameString

Output only. The user's display name. Corresponds to the JSON property displayName

Returns:

  • (String)


5296
5297
5298
# File 'lib/google/apis/chat_v1/classes.rb', line 5296

def display_name
  @display_name
end

#domain_idString

Unique identifier of the user's Google Workspace domain. Corresponds to the JSON property domainId

Returns:

  • (String)


5301
5302
5303
# File 'lib/google/apis/chat_v1/classes.rb', line 5301

def domain_id
  @domain_id
end

#is_anonymousBoolean Also known as: is_anonymous?

Output only. When true, the user is deleted or their profile is not visible. Corresponds to the JSON property isAnonymous

Returns:

  • (Boolean)


5306
5307
5308
# File 'lib/google/apis/chat_v1/classes.rb', line 5306

def is_anonymous
  @is_anonymous
end

#nameString

Resource name for a Google Chat user. Format: users/user. `users/app` can be used as an alias for the calling app bot user. For human users,useris the same user identifier as: - the `id` for the [Person](https://developers. google.com/people/api/rest/v1/people) in the People API. For example, `users/ 123456789` in Chat API represents the same person as the `123456789` Person profile ID in People API. - the `id` for a [user](https://developers.google. com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. - the user's email address can be used as an alias foruser`in API requests. For example, if the People API Person profile ID foruser@example. comis123456789, you can useusers/user@example.comas an alias to referenceusers/123456789. Only the canonical resource name (for example users/123456789) will be returned from the API. Corresponds to the JSON propertyname`

Returns:

  • (String)


5323
5324
5325
# File 'lib/google/apis/chat_v1/classes.rb', line 5323

def name
  @name
end

#typeString

User type. Corresponds to the JSON property type

Returns:

  • (String)


5328
5329
5330
# File 'lib/google/apis/chat_v1/classes.rb', line 5328

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5335
5336
5337
5338
5339
5340
5341
# File 'lib/google/apis/chat_v1/classes.rb', line 5335

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @domain_id = args[:domain_id] if args.key?(:domain_id)
  @is_anonymous = args[:is_anonymous] if args.key?(:is_anonymous)
  @name = args[:name] if args.key?(:name)
  @type = args[:type] if args.key?(:type)
end