google-apps-chat-v1 0.a → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/apps/chat/v1/chat_service/client.rb +3663 -0
  6. data/lib/google/apps/chat/v1/chat_service/credentials.rb +63 -0
  7. data/lib/google/apps/chat/v1/chat_service/paths.rb +191 -0
  8. data/lib/google/apps/chat/v1/chat_service/rest/client.rb +3487 -0
  9. data/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb +1614 -0
  10. data/lib/google/apps/chat/v1/chat_service/rest.rb +53 -0
  11. data/lib/google/apps/chat/v1/chat_service.rb +56 -0
  12. data/lib/google/apps/chat/v1/rest.rb +37 -0
  13. data/lib/google/apps/chat/v1/version.rb +7 -2
  14. data/lib/google/apps/chat/v1.rb +45 -0
  15. data/lib/google/chat/v1/action_status_pb.rb +44 -0
  16. data/lib/google/chat/v1/annotation_pb.rb +55 -0
  17. data/lib/google/chat/v1/attachment_pb.rb +51 -0
  18. data/lib/google/chat/v1/chat_service_pb.rb +53 -0
  19. data/lib/google/chat/v1/chat_service_services_pb.rb +359 -0
  20. data/lib/google/chat/v1/contextual_addon_pb.rb +50 -0
  21. data/lib/google/chat/v1/deletion_metadata_pb.rb +43 -0
  22. data/lib/google/chat/v1/group_pb.rb +42 -0
  23. data/lib/google/chat/v1/history_state_pb.rb +42 -0
  24. data/lib/google/chat/v1/matched_url_pb.rb +44 -0
  25. data/lib/google/chat/v1/membership_pb.rb +61 -0
  26. data/lib/google/chat/v1/message_pb.rb +89 -0
  27. data/lib/google/chat/v1/reaction_pb.rb +54 -0
  28. data/lib/google/chat/v1/slash_command_pb.rb +42 -0
  29. data/lib/google/chat/v1/space_pb.rb +63 -0
  30. data/lib/google/chat/v1/space_read_state_pb.rb +51 -0
  31. data/lib/google/chat/v1/space_setup_pb.rb +48 -0
  32. data/lib/google/chat/v1/thread_read_state_pb.rb +48 -0
  33. data/lib/google/chat/v1/user_pb.rb +46 -0
  34. data/lib/google/chat/v1/widgets_pb.rb +53 -0
  35. data/lib/google-apps-chat-v1.rb +21 -0
  36. data/proto_docs/README.md +4 -0
  37. data/proto_docs/google/api/client.rb +399 -0
  38. data/proto_docs/google/api/field_behavior.rb +85 -0
  39. data/proto_docs/google/api/launch_stage.rb +71 -0
  40. data/proto_docs/google/api/resource.rb +222 -0
  41. data/proto_docs/google/apps/card/v1/card.rb +2076 -0
  42. data/proto_docs/google/chat/v1/action_status.rb +40 -0
  43. data/proto_docs/google/chat/v1/annotation.rb +186 -0
  44. data/proto_docs/google/chat/v1/attachment.rb +131 -0
  45. data/proto_docs/google/chat/v1/contextual_addon.rb +120 -0
  46. data/proto_docs/google/chat/v1/deletion_metadata.rb +60 -0
  47. data/proto_docs/google/chat/v1/group.rb +41 -0
  48. data/proto_docs/google/chat/v1/history_state.rb +42 -0
  49. data/proto_docs/google/chat/v1/matched_url.rb +37 -0
  50. data/proto_docs/google/chat/v1/membership.rb +294 -0
  51. data/proto_docs/google/chat/v1/message.rb +657 -0
  52. data/proto_docs/google/chat/v1/reaction.rb +185 -0
  53. data/proto_docs/google/chat/v1/slash_command.rb +37 -0
  54. data/proto_docs/google/chat/v1/space.rb +382 -0
  55. data/proto_docs/google/chat/v1/space_read_state.rb +104 -0
  56. data/proto_docs/google/chat/v1/space_setup.rb +92 -0
  57. data/proto_docs/google/chat/v1/thread_read_state.rb +66 -0
  58. data/proto_docs/google/chat/v1/user.rb +84 -0
  59. data/proto_docs/google/chat/v1/widgets.rb +293 -0
  60. data/proto_docs/google/protobuf/duration.rb +98 -0
  61. data/proto_docs/google/protobuf/empty.rb +34 -0
  62. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  63. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  64. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  65. data/proto_docs/google/rpc/code.rb +185 -0
  66. data/proto_docs/google/type/color.rb +173 -0
  67. metadata +128 -10
@@ -0,0 +1,294 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Apps
22
+ module Chat
23
+ module V1
24
+ # Represents a membership relation in Google Chat, such as whether a user or
25
+ # Chat app is invited to, part of, or absent from a space.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Resource name of the membership, assigned by the server.
29
+ #
30
+ # Format: `spaces/{space}/members/{member}`
31
+ # @!attribute [r] state
32
+ # @return [::Google::Apps::Chat::V1::Membership::MembershipState]
33
+ # Output only. State of the membership.
34
+ # @!attribute [rw] role
35
+ # @return [::Google::Apps::Chat::V1::Membership::MembershipRole]
36
+ # Optional. User's role within a Chat space, which determines their permitted
37
+ # actions in the space.
38
+ #
39
+ # This field can only be used as input in `UpdateMembership`.
40
+ # @!attribute [rw] member
41
+ # @return [::Google::Apps::Chat::V1::User]
42
+ # The Google Chat user or app the membership corresponds to.
43
+ # If your Chat app [authenticates as a
44
+ # user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
45
+ # the output populates the
46
+ # [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
47
+ # `name` and `type`.
48
+ # @!attribute [rw] group_member
49
+ # @return [::Google::Apps::Chat::V1::Group]
50
+ # The Google Group the membership corresponds to.
51
+ # Only supports read operations. Other operations, like creating or
52
+ # updating a membership, aren't currently supported.
53
+ # @!attribute [rw] create_time
54
+ # @return [::Google::Protobuf::Timestamp]
55
+ # Optional. Immutable. The creation time of the membership, such as when a
56
+ # member joined or was invited to join a space. This field is output only,
57
+ # except when used to import historical memberships in import mode spaces.
58
+ # @!attribute [rw] delete_time
59
+ # @return [::Google::Protobuf::Timestamp]
60
+ # Optional. Immutable. The deletion time of the membership, such as when a
61
+ # member left or was removed from a space. This field is output only, except
62
+ # when used to import historical memberships in import mode spaces.
63
+ class Membership
64
+ include ::Google::Protobuf::MessageExts
65
+ extend ::Google::Protobuf::MessageExts::ClassMethods
66
+
67
+ # Specifies the member's relationship with a space. Other membership states
68
+ # might be supported in the future.
69
+ module MembershipState
70
+ # Default value. Don't use.
71
+ MEMBERSHIP_STATE_UNSPECIFIED = 0
72
+
73
+ # The user is added to the space, and can participate in the space.
74
+ JOINED = 1
75
+
76
+ # The user is invited to join the space, but hasn't joined it.
77
+ INVITED = 2
78
+
79
+ # The user doesn't belong to the space and doesn't have a pending
80
+ # invitation to join the space.
81
+ NOT_A_MEMBER = 3
82
+ end
83
+
84
+ # Represents a user's permitted actions in a Chat space. More enum values
85
+ # might be added in the future.
86
+ module MembershipRole
87
+ # Default value. For {::Google::Apps::Chat::V1::Membership#member users}: they
88
+ # aren't a member of the space, but can be invited. For
89
+ # {::Google::Apps::Chat::V1::Membership#group_member Google Groups}: they're always
90
+ # assigned this role (other enum values might be used in the future).
91
+ MEMBERSHIP_ROLE_UNSPECIFIED = 0
92
+
93
+ # A member of the space. The user has basic permissions, like sending
94
+ # messages to the space. In 1:1 and unnamed group conversations, everyone
95
+ # has this role.
96
+ ROLE_MEMBER = 1
97
+
98
+ # A space manager. The user has all basic permissions plus administrative
99
+ # permissions that let them manage the space, like adding or removing
100
+ # members. Only supported in
101
+ # {::Google::Apps::Chat::V1::Space::SpaceType SpaceType.SPACE}.
102
+ ROLE_MANAGER = 2
103
+ end
104
+ end
105
+
106
+ # Request message for creating a membership.
107
+ # @!attribute [rw] parent
108
+ # @return [::String]
109
+ # Required. The resource name of the space for which to create the
110
+ # membership.
111
+ #
112
+ # Format: spaces/\\{space}
113
+ # @!attribute [rw] membership
114
+ # @return [::Google::Apps::Chat::V1::Membership]
115
+ # Required. The membership relation to create.
116
+ # The `memberType` field must contain a user with the `user.name` and
117
+ # `user.type` fields populated. The server will assign a resource name
118
+ # and overwrite anything specified.
119
+ # When a Chat app creates a membership relation for a human user, it must use
120
+ # the `chat.memberships` scope, set `user.type` to `HUMAN`, and set
121
+ # `user.name` with format `users/{user}`, where `{user}` can be the email
122
+ # address for the user. For users in the same Workspace organization `{user}`
123
+ # can also be the `id` of the
124
+ # [person](https://developers.google.com/people/api/rest/v1/people) from the
125
+ # People API, or the `id` for the user in the Directory API. For example, if
126
+ # the People API Person profile ID for `user@example.com` is `123456789`, you
127
+ # can add the user to the space by setting the `membership.member.name` to
128
+ # `users/user@example.com` or `users/123456789`. When a Chat app creates a
129
+ # membership relation for itself, it must use the `chat.memberships.app`
130
+ # scope, set `user.type` to `BOT`, and set `user.name` to `users/app`.
131
+ class CreateMembershipRequest
132
+ include ::Google::Protobuf::MessageExts
133
+ extend ::Google::Protobuf::MessageExts::ClassMethods
134
+ end
135
+
136
+ # Request message for updating a membership.
137
+ # @!attribute [rw] membership
138
+ # @return [::Google::Apps::Chat::V1::Membership]
139
+ # Required. The membership to update. Only fields specified by `update_mask`
140
+ # are updated.
141
+ # @!attribute [rw] update_mask
142
+ # @return [::Google::Protobuf::FieldMask]
143
+ # Required. The field paths to update. Separate multiple values with commas
144
+ # or use `*` to update all field paths.
145
+ #
146
+ # Currently supported field paths:
147
+ #
148
+ # - `role`
149
+ class UpdateMembershipRequest
150
+ include ::Google::Protobuf::MessageExts
151
+ extend ::Google::Protobuf::MessageExts::ClassMethods
152
+ end
153
+
154
+ # Request message for listing memberships.
155
+ # @!attribute [rw] parent
156
+ # @return [::String]
157
+ # Required. The resource name of the space for which to fetch a membership
158
+ # list.
159
+ #
160
+ # Format: spaces/\\{space}
161
+ # @!attribute [rw] page_size
162
+ # @return [::Integer]
163
+ # Optional. The maximum number of memberships to return. The service might
164
+ # return fewer than this value.
165
+ #
166
+ # If unspecified, at most 100 memberships are returned.
167
+ #
168
+ # The maximum value is 1000. If you use a value more than 1000, it's
169
+ # automatically changed to 1000.
170
+ #
171
+ # Negative values return an `INVALID_ARGUMENT` error.
172
+ # @!attribute [rw] page_token
173
+ # @return [::String]
174
+ # Optional. A page token, received from a previous call to list memberships.
175
+ # Provide this parameter to retrieve the subsequent page.
176
+ #
177
+ # When paginating, all other parameters provided should match the call that
178
+ # provided the page token. Passing different values to the other parameters
179
+ # might lead to unexpected results.
180
+ # @!attribute [rw] filter
181
+ # @return [::String]
182
+ # Optional. A query filter.
183
+ #
184
+ # You can filter memberships by a member's role
185
+ # ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole))
186
+ # and type
187
+ # ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)).
188
+ #
189
+ # To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
190
+ #
191
+ # To filter by type, set `member.type` to `HUMAN` or `BOT`.
192
+ #
193
+ # To filter by both role and type, use the `AND` operator. To filter by
194
+ # either role or type, use the `OR` operator.
195
+ #
196
+ # For example, the following queries are valid:
197
+ #
198
+ # ```
199
+ # role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
200
+ # member.type = "HUMAN" AND role = "ROLE_MANAGER"
201
+ # ```
202
+ #
203
+ # The following queries are invalid:
204
+ #
205
+ # ```
206
+ # member.type = "HUMAN" AND member.type = "BOT"
207
+ # role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
208
+ # ```
209
+ #
210
+ #
211
+ # Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
212
+ # error.
213
+ # @!attribute [rw] show_groups
214
+ # @return [::Boolean]
215
+ # Optional. When `true`, also returns memberships associated with a
216
+ # {::Google::Apps::Chat::V1::Membership#group_member Google Group}, in
217
+ # addition to other types of memberships. If a
218
+ # {::Google::Apps::Chat::V1::ListMembershipsRequest#filter filter} is set,
219
+ # {::Google::Apps::Chat::V1::Membership#group_member Google Group}
220
+ # memberships that don't match the filter criteria aren't returned.
221
+ # @!attribute [rw] show_invited
222
+ # @return [::Boolean]
223
+ # Optional. When `true`, also returns memberships associated with
224
+ # {::Google::Apps::Chat::V1::Membership::MembershipState::INVITED invited} members, in
225
+ # addition to other types of memberships. If a
226
+ # filter is set,
227
+ # {::Google::Apps::Chat::V1::Membership::MembershipState::INVITED invited} memberships
228
+ # that don't match the filter criteria aren't returned.
229
+ #
230
+ # Currently requires [user
231
+ # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
232
+ class ListMembershipsRequest
233
+ include ::Google::Protobuf::MessageExts
234
+ extend ::Google::Protobuf::MessageExts::ClassMethods
235
+ end
236
+
237
+ # Response to list memberships of the space.
238
+ # @!attribute [rw] memberships
239
+ # @return [::Array<::Google::Apps::Chat::V1::Membership>]
240
+ # Unordered list. List of memberships in the requested (or first) page.
241
+ # @!attribute [rw] next_page_token
242
+ # @return [::String]
243
+ # A token that you can send as `pageToken` to retrieve the next page of
244
+ # results. If empty, there are no subsequent pages.
245
+ class ListMembershipsResponse
246
+ include ::Google::Protobuf::MessageExts
247
+ extend ::Google::Protobuf::MessageExts::ClassMethods
248
+ end
249
+
250
+ # Request to get a membership of a space.
251
+ # @!attribute [rw] name
252
+ # @return [::String]
253
+ # Required. Resource name of the membership to retrieve.
254
+ #
255
+ # To get the app's own membership, you can optionally use
256
+ # `spaces/{space}/members/app`.
257
+ #
258
+ # Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
259
+ #
260
+ # When [authenticated as a
261
+ # user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
262
+ # you can use the user's email as an alias for `{member}`. For example,
263
+ # `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
264
+ # email of the Google Chat user.
265
+ class GetMembershipRequest
266
+ include ::Google::Protobuf::MessageExts
267
+ extend ::Google::Protobuf::MessageExts::ClassMethods
268
+ end
269
+
270
+ # Request to delete a membership in a space.
271
+ # @!attribute [rw] name
272
+ # @return [::String]
273
+ # Required. Resource name of the membership to delete. Chat apps can delete
274
+ # human users' or their own memberships. Chat apps can't delete other apps'
275
+ # memberships.
276
+ #
277
+ # When deleting a human membership, requires the `chat.memberships` scope and
278
+ # `spaces/{space}/members/{member}` format. You can use the email as an
279
+ # alias for `{member}`. For example,
280
+ # `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
281
+ # email of the Google Chat user.
282
+ #
283
+ # When deleting an app membership, requires the `chat.memberships.app` scope
284
+ # and `spaces/{space}/members/app` format.
285
+ #
286
+ # Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`.
287
+ class DeleteMembershipRequest
288
+ include ::Google::Protobuf::MessageExts
289
+ extend ::Google::Protobuf::MessageExts::ClassMethods
290
+ end
291
+ end
292
+ end
293
+ end
294
+ end