Class: Google::Apis::ChatV1::SetUpSpaceRequest
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::SetUpSpaceRequest
- 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
Request to create a space and add specified users to it.
Instance Attribute Summary collapse
-
#memberships ⇒ Array<Google::Apis::ChatV1::Membership>
Optional.
-
#request_id ⇒ String
Optional.
-
#space ⇒ Google::Apis::ChatV1::Space
A space in Google Chat.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SetUpSpaceRequest
constructor
A new instance of SetUpSpaceRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SetUpSpaceRequest
Returns a new instance of SetUpSpaceRequest.
5832 5833 5834 |
# File 'lib/google/apis/chat_v1/classes.rb', line 5832 def initialize(**args) update!(**args) end |
Instance Attribute Details
#memberships ⇒ Array<Google::Apis::ChatV1::Membership>
Optional. The Google Chat users or groups to invite to join the space. Omit
the calling user, as they are added automatically. The set currently allows up
to 49 memberships (in addition to the caller). For human membership, the
Membership.member field must contain a user with name populated (format:
users/user) and `type` set to `User.Type.HUMAN`. You can only add human
users when setting up a space (adding Chat apps is only supported for direct
message setup with the calling app). You can also add members using the user's
email as an alias for `user`. For example, the `user.name` can be `users/
example@gmail.com`. To invite Gmail users or users from external Google
Workspace domains, user's email must be used foruser. For Google group
membership, the `Membership.group_member` field must contain a `group` with `
name` populated (format `groups/`group). You can only add Google groups when
setting Space.spaceType to SPACE. Optional when setting Space.spaceType
to SPACE. Required when setting Space.spaceType to GROUP_CHAT, along
with at least two memberships. Required when setting Space.spaceType to
DIRECT_MESSAGE with a human user, along with exactly one membership. Must be
empty when creating a 1:1 conversation between a human and the calling Chat
app (when setting Space.spaceType to DIRECT_MESSAGE and Space.
singleUserBotDm to true).
Corresponds to the JSON property memberships
5816 5817 5818 |
# File 'lib/google/apis/chat_v1/classes.rb', line 5816 def memberships @memberships end |
#request_id ⇒ String
Optional. A unique identifier for this request. A random UUID is recommended.
Specifying an existing request ID returns the space created with that ID
instead of creating a new space. Specifying an existing request ID from the
same Chat app with a different authenticated user returns an error.
Corresponds to the JSON property requestId
5824 5825 5826 |
# File 'lib/google/apis/chat_v1/classes.rb', line 5824 def request_id @request_id end |
#space ⇒ Google::Apis::ChatV1::Space
A space in Google Chat. Spaces are conversations between two or more users or
1:1 messages between a user and a Chat app.
Corresponds to the JSON property space
5830 5831 5832 |
# File 'lib/google/apis/chat_v1/classes.rb', line 5830 def space @space end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5837 5838 5839 5840 5841 |
# File 'lib/google/apis/chat_v1/classes.rb', line 5837 def update!(**args) @memberships = args[:memberships] if args.key?(:memberships) @request_id = args[:request_id] if args.key?(:request_id) @space = args[:space] if args.key?(:space) end |