Class: Google::Apis::ChatV1::Space

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 space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Space

Returns a new instance of Space.



6463
6464
6465
# File 'lib/google/apis/chat_v1/classes.rb', line 6463

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

Instance Attribute Details

#access_settingsGoogle::Apis::ChatV1::AccessSettings

Represents the access setting of the space. Corresponds to the JSON property accessSettings



6303
6304
6305
# File 'lib/google/apis/chat_v1/classes.rb', line 6303

def access_settings
  @access_settings
end

#admin_installedBoolean Also known as: admin_installed?

Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging. Corresponds to the JSON property adminInstalled

Returns:

  • (Boolean)


6312
6313
6314
# File 'lib/google/apis/chat_v1/classes.rb', line 6312

def admin_installed
  @admin_installed
end

#create_timeString

Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when spaceType is GROUP_CHAT or SPACE. Corresponds to the JSON property createTime

Returns:

  • (String)


6322
6323
6324
# File 'lib/google/apis/chat_v1/classes.rb', line 6322

def create_time
  @create_time
end

#customerString

Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with app authentication and SpaceType is SPACE, otherwise should not be set. In the format customers/customer`, where customeris theidfrom the [Admin SDK customer resource](https:// developers.google.com/admin-sdk/directory/reference/rest/v1/customers). Private apps can also use thecustomers/my_customeralias to create the space in the same Google Workspace organization as the app. This field isn't populated for direct messages (DMs) or when the space is created by non-Google Workspace users. Corresponds to the JSON propertycustomer`

Returns:

  • (String)


6336
6337
6338
# File 'lib/google/apis/chat_v1/classes.rb', line 6336

def customer
  @customer
end

#display_nameString

Optional. The space's display name. Required when creating a space with a spaceType of SPACE. If you receive the error message ALREADY_EXISTS when creating a space or updating the displayName, try a different displayName. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters. Corresponds to the JSON property displayName

Returns:

  • (String)


6347
6348
6349
# File 'lib/google/apis/chat_v1/classes.rb', line 6347

def display_name
  @display_name
end

#external_user_allowedBoolean Also known as: external_user_allowed?

Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user. For existing spaces, this field is output only. Corresponds to the JSON property externalUserAllowed

Returns:

  • (Boolean)


6357
6358
6359
# File 'lib/google/apis/chat_v1/classes.rb', line 6357

def external_user_allowed
  @external_user_allowed
end

#import_modeBoolean Also known as: import_mode?

Optional. Whether this space is created in Import Mode as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete. Creating a space in Import Moderequires user authentication. Corresponds to the JSON property importMode

Returns:

  • (Boolean)


6367
6368
6369
# File 'lib/google/apis/chat_v1/classes.rb', line 6367

def import_mode
  @import_mode
end

#import_mode_expire_timeString

Output only. The time when the space will be automatically deleted by the system if it remains in import mode. Each space created in import mode must exit this mode before this expire time using spaces.completeImport. This field is only populated for spaces that were created with import mode. Corresponds to the JSON property importModeExpireTime

Returns:

  • (String)


6376
6377
6378
# File 'lib/google/apis/chat_v1/classes.rb', line 6376

def import_mode_expire_time
  @import_mode_expire_time
end

#last_active_timeString

Output only. Timestamp of the last message in the space. Corresponds to the JSON property lastActiveTime

Returns:

  • (String)


6381
6382
6383
# File 'lib/google/apis/chat_v1/classes.rb', line 6381

def last_active_time
  @last_active_time
end

#membership_countGoogle::Apis::ChatV1::MembershipCount

Represents the count of memberships of a space, grouped into categories. Corresponds to the JSON property membershipCount



6386
6387
6388
# File 'lib/google/apis/chat_v1/classes.rb', line 6386

def membership_count
  @membership_count
end

#nameString

Identifier. Resource name of the space. Format: spaces/spaceWherespace represents the system-assigned ID for the space. You can obtain the space ID by calling the spaces.list() method or from the space URL. For example, if the space URL is https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA, the space ID is AAAAAAAAA. Corresponds to the JSON property name

Returns:

  • (String)


6396
6397
6398
# File 'lib/google/apis/chat_v1/classes.rb', line 6396

def name
  @name
end

#permission_settingsGoogle::Apis::ChatV1::PermissionSettings

Permission settings that you can specify when updating an existing named space. To set permission settings when creating a space, specify the PredefinedPermissionSettings field in your request. Corresponds to the JSON property permissionSettings



6404
6405
6406
# File 'lib/google/apis/chat_v1/classes.rb', line 6404

def permission_settings
  @permission_settings
end

#predefined_permission_settingsString

Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the PermissionSettings field. Setting predefined permission settings supports: - App authentication with administrator approval with the chat.app.spaces or chat.app.spaces.create scopes. - User authentication Corresponds to the JSON property predefinedPermissionSettings

Returns:

  • (String)


6417
6418
6419
# File 'lib/google/apis/chat_v1/classes.rb', line 6417

def predefined_permission_settings
  @predefined_permission_settings
end

#single_user_bot_dmBoolean Also known as: single_user_bot_dm?

Optional. Whether the space is a DM between a Chat app and a single human. Corresponds to the JSON property singleUserBotDm

Returns:

  • (Boolean)


6422
6423
6424
# File 'lib/google/apis/chat_v1/classes.rb', line 6422

def single_user_bot_dm
  @single_user_bot_dm
end

#space_detailsGoogle::Apis::ChatV1::SpaceDetails

Details about the space including description and rules. Corresponds to the JSON property spaceDetails



6428
6429
6430
# File 'lib/google/apis/chat_v1/classes.rb', line 6428

def space_details
  @space_details
end

#space_history_stateString

Optional. The message history state for messages and threads in this space. Corresponds to the JSON property spaceHistoryState

Returns:

  • (String)


6433
6434
6435
# File 'lib/google/apis/chat_v1/classes.rb', line 6433

def space_history_state
  @space_history_state
end

#space_threading_stateString

Output only. The threading state in the Chat space. Corresponds to the JSON property spaceThreadingState

Returns:

  • (String)


6438
6439
6440
# File 'lib/google/apis/chat_v1/classes.rb', line 6438

def space_threading_state
  @space_threading_state
end

#space_typeString

Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage. Corresponds to the JSON property spaceType

Returns:

  • (String)


6444
6445
6446
# File 'lib/google/apis/chat_v1/classes.rb', line 6444

def space_type
  @space_type
end

#space_uriString

Output only. The URI for a user to access the space. Corresponds to the JSON property spaceUri

Returns:

  • (String)


6449
6450
6451
# File 'lib/google/apis/chat_v1/classes.rb', line 6449

def space_uri
  @space_uri
end

#threadedBoolean Also known as: threaded?

Output only. Deprecated: Use spaceThreadingState instead. Whether messages are threaded in this space. Corresponds to the JSON property threaded

Returns:

  • (Boolean)


6455
6456
6457
# File 'lib/google/apis/chat_v1/classes.rb', line 6455

def threaded
  @threaded
end

#typeString

Output only. Deprecated: Use space_type instead. The type of a space. Corresponds to the JSON property type

Returns:

  • (String)


6461
6462
6463
# File 'lib/google/apis/chat_v1/classes.rb', line 6461

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
# File 'lib/google/apis/chat_v1/classes.rb', line 6468

def update!(**args)
  @access_settings = args[:access_settings] if args.key?(:access_settings)
  @admin_installed = args[:admin_installed] if args.key?(:admin_installed)
  @create_time = args[:create_time] if args.key?(:create_time)
  @customer = args[:customer] if args.key?(:customer)
  @display_name = args[:display_name] if args.key?(:display_name)
  @external_user_allowed = args[:external_user_allowed] if args.key?(:external_user_allowed)
  @import_mode = args[:import_mode] if args.key?(:import_mode)
  @import_mode_expire_time = args[:import_mode_expire_time] if args.key?(:import_mode_expire_time)
  @last_active_time = args[:last_active_time] if args.key?(:last_active_time)
  @membership_count = args[:membership_count] if args.key?(:membership_count)
  @name = args[:name] if args.key?(:name)
  @permission_settings = args[:permission_settings] if args.key?(:permission_settings)
  @predefined_permission_settings = args[:predefined_permission_settings] if args.key?(:predefined_permission_settings)
  @single_user_bot_dm = args[:single_user_bot_dm] if args.key?(:single_user_bot_dm)
  @space_details = args[:space_details] if args.key?(:space_details)
  @space_history_state = args[:space_history_state] if args.key?(:space_history_state)
  @space_threading_state = args[:space_threading_state] if args.key?(:space_threading_state)
  @space_type = args[:space_type] if args.key?(:space_type)
  @space_uri = args[:space_uri] if args.key?(:space_uri)
  @threaded = args[:threaded] if args.key?(:threaded)
  @type = args[:type] if args.key?(:type)
end