@@ -39,9 +39,17 @@ class AccessSettings
3939 # Make a space discoverable to a target audience](https://developers.google.com/
4040 # workspace/chat/space-target-audience). Format: `audiences/`audience`` To use
4141 # the default target audience for the Google Workspace organization, set to `
42- # audiences/default`. This field is not populated when using the `chat.bot`
43- # scope with [app authentication](https://developers.google.com/workspace/chat/
44- # authenticate-authorize-chat-app).
42+ # audiences/default`. Reading the target audience supports: - [User
43+ # authentication](https://developers.google.com/workspace/chat/authenticate-
44+ # authorize-chat-user) - [App authentication](https://developers.google.com/
45+ # workspace/chat/authenticate-authorize-chat-app) with [administrator approval](
46+ # https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope
47+ # in [Developer Preview](https://developers.google.com/workspace/preview). This
48+ # field is not populated when using the `chat.bot` scope with [app
49+ # authentication](https://developers.google.com/workspace/chat/authenticate-
50+ # authorize-chat-app). Setting the target audience requires [user authentication]
51+ # (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
52+ # .
4553 # Corresponds to the JSON property `audience`
4654 # @return [String]
4755 attr_accessor :audience
@@ -4269,6 +4277,96 @@ def update!(**args)
42694277 end
42704278 end
42714279
4280+ # Represents a space permission setting.
4281+ class PermissionSetting
4282+ include Google ::Apis ::Core ::Hashable
4283+
4284+ # Whether spaces managers have this permission.
4285+ # Corresponds to the JSON property `managersAllowed`
4286+ # @return [Boolean]
4287+ attr_accessor :managers_allowed
4288+ alias_method :managers_allowed? , :managers_allowed
4289+
4290+ # Whether non-manager members have this permission.
4291+ # Corresponds to the JSON property `membersAllowed`
4292+ # @return [Boolean]
4293+ attr_accessor :members_allowed
4294+ alias_method :members_allowed? , :members_allowed
4295+
4296+ def initialize ( **args )
4297+ update! ( **args )
4298+ end
4299+
4300+ # Update properties of this object
4301+ def update! ( **args )
4302+ @managers_allowed = args [ :managers_allowed ] if args . key? ( :managers_allowed )
4303+ @members_allowed = args [ :members_allowed ] if args . key? ( :members_allowed )
4304+ end
4305+ end
4306+
4307+ # [Permission settings](https://support.google.com/chat/answer/13340792) for a
4308+ # named space. To set permission settings when creating a space, specify the `
4309+ # PredefinedPermissionSettings` field in your request.
4310+ class PermissionSettings
4311+ include Google ::Apis ::Core ::Hashable
4312+
4313+ # Represents a space permission setting.
4314+ # Corresponds to the JSON property `manageApps`
4315+ # @return [Google::Apis::ChatV1::PermissionSetting]
4316+ attr_accessor :manage_apps
4317+
4318+ # Represents a space permission setting.
4319+ # Corresponds to the JSON property `manageMembersAndGroups`
4320+ # @return [Google::Apis::ChatV1::PermissionSetting]
4321+ attr_accessor :manage_members_and_groups
4322+
4323+ # Represents a space permission setting.
4324+ # Corresponds to the JSON property `manageWebhooks`
4325+ # @return [Google::Apis::ChatV1::PermissionSetting]
4326+ attr_accessor :manage_webhooks
4327+
4328+ # Represents a space permission setting.
4329+ # Corresponds to the JSON property `modifySpaceDetails`
4330+ # @return [Google::Apis::ChatV1::PermissionSetting]
4331+ attr_accessor :modify_space_details
4332+
4333+ # Represents a space permission setting.
4334+ # Corresponds to the JSON property `postMessages`
4335+ # @return [Google::Apis::ChatV1::PermissionSetting]
4336+ attr_accessor :post_messages
4337+
4338+ # Represents a space permission setting.
4339+ # Corresponds to the JSON property `replyMessages`
4340+ # @return [Google::Apis::ChatV1::PermissionSetting]
4341+ attr_accessor :reply_messages
4342+
4343+ # Represents a space permission setting.
4344+ # Corresponds to the JSON property `toggleHistory`
4345+ # @return [Google::Apis::ChatV1::PermissionSetting]
4346+ attr_accessor :toggle_history
4347+
4348+ # Represents a space permission setting.
4349+ # Corresponds to the JSON property `useAtMentionAll`
4350+ # @return [Google::Apis::ChatV1::PermissionSetting]
4351+ attr_accessor :use_at_mention_all
4352+
4353+ def initialize ( **args )
4354+ update! ( **args )
4355+ end
4356+
4357+ # Update properties of this object
4358+ def update! ( **args )
4359+ @manage_apps = args [ :manage_apps ] if args . key? ( :manage_apps )
4360+ @manage_members_and_groups = args [ :manage_members_and_groups ] if args . key? ( :manage_members_and_groups )
4361+ @manage_webhooks = args [ :manage_webhooks ] if args . key? ( :manage_webhooks )
4362+ @modify_space_details = args [ :modify_space_details ] if args . key? ( :modify_space_details )
4363+ @post_messages = args [ :post_messages ] if args . key? ( :post_messages )
4364+ @reply_messages = args [ :reply_messages ] if args . key? ( :reply_messages )
4365+ @toggle_history = args [ :toggle_history ] if args . key? ( :toggle_history )
4366+ @use_at_mention_all = args [ :use_at_mention_all ] if args . key? ( :use_at_mention_all )
4367+ end
4368+ end
4369+
42724370 # Information about a quoted message.
42734371 class QuotedMessageMetadata
42744372 include Google ::Apis ::Core ::Hashable
@@ -4706,7 +4804,9 @@ class Space
47064804
47074805 # Optional. Whether this space is created in `Import Mode` as part of a data
47084806 # migration into Google Workspace. While spaces are being imported, they aren't
4709- # visible to users until the import is complete.
4807+ # visible to users until the import is complete. Creating a space in `Import
4808+ # Mode`requires [user authentication](https://developers.google.com/workspace/
4809+ # chat/authenticate-authorize-chat-user).
47104810 # Corresponds to the JSON property `importMode`
47114811 # @return [Boolean]
47124812 attr_accessor :import_mode
@@ -4732,6 +4832,20 @@ class Space
47324832 # @return [String]
47334833 attr_accessor :name
47344834
4835+ # [Permission settings](https://support.google.com/chat/answer/13340792) for a
4836+ # named space. To set permission settings when creating a space, specify the `
4837+ # PredefinedPermissionSettings` field in your request.
4838+ # Corresponds to the JSON property `permissionSettings`
4839+ # @return [Google::Apis::ChatV1::PermissionSettings]
4840+ attr_accessor :permission_settings
4841+
4842+ # Optional. Input only. Space permission settings. Input for creating a space, a
4843+ # collaboration space is created if this field is not set. After you create the
4844+ # space, settings are populated in the `PermissionSettings` field.
4845+ # Corresponds to the JSON property `predefinedPermissionSettings`
4846+ # @return [String]
4847+ attr_accessor :predefined_permission_settings
4848+
47354849 # Optional. Whether the space is a DM between a Chat app and a single human.
47364850 # Corresponds to the JSON property `singleUserBotDm`
47374851 # @return [Boolean]
@@ -4791,6 +4905,8 @@ def update!(**args)
47914905 @last_active_time = args [ :last_active_time ] if args . key? ( :last_active_time )
47924906 @membership_count = args [ :membership_count ] if args . key? ( :membership_count )
47934907 @name = args [ :name ] if args . key? ( :name )
4908+ @permission_settings = args [ :permission_settings ] if args . key? ( :permission_settings )
4909+ @predefined_permission_settings = args [ :predefined_permission_settings ] if args . key? ( :predefined_permission_settings )
47944910 @single_user_bot_dm = args [ :single_user_bot_dm ] if args . key? ( :single_user_bot_dm )
47954911 @space_details = args [ :space_details ] if args . key? ( :space_details )
47964912 @space_history_state = args [ :space_history_state ] if args . key? ( :space_history_state )
0 commit comments