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,104 @@
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
+ # A user's read state within a space, used to identify read and unread
25
+ # messages.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Resource name of the space read state.
29
+ #
30
+ # Format: `users/{user}/spaces/{space}/spaceReadState`
31
+ # @!attribute [rw] last_read_time
32
+ # @return [::Google::Protobuf::Timestamp]
33
+ # Optional. The time when the user's space read state was updated. Usually
34
+ # this corresponds with either the timestamp of the last read message, or a
35
+ # timestamp specified by the user to mark the last read position in a space.
36
+ class SpaceReadState
37
+ include ::Google::Protobuf::MessageExts
38
+ extend ::Google::Protobuf::MessageExts::ClassMethods
39
+ end
40
+
41
+ # Request message for GetSpaceReadState API.
42
+ # @!attribute [rw] name
43
+ # @return [::String]
44
+ # Required. Resource name of the space read state to retrieve.
45
+ #
46
+ # Only supports getting read state for the calling user.
47
+ #
48
+ # To refer to the calling user, set one of the following:
49
+ #
50
+ # - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
51
+ #
52
+ # - Their Workspace email address. For example,
53
+ # `users/user@example.com/spaces/{space}/spaceReadState`.
54
+ #
55
+ # - Their user id. For example,
56
+ # `users/123456789/spaces/{space}/spaceReadState`.
57
+ #
58
+ # Format: users/\\{user}/spaces/\\{space}/spaceReadState
59
+ class GetSpaceReadStateRequest
60
+ include ::Google::Protobuf::MessageExts
61
+ extend ::Google::Protobuf::MessageExts::ClassMethods
62
+ end
63
+
64
+ # Request message for UpdateSpaceReadState API.
65
+ # @!attribute [rw] space_read_state
66
+ # @return [::Google::Apps::Chat::V1::SpaceReadState]
67
+ # Required. The space read state and fields to update.
68
+ #
69
+ # Only supports updating read state for the calling user.
70
+ #
71
+ # To refer to the calling user, set one of the following:
72
+ #
73
+ # - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
74
+ #
75
+ # - Their Workspace email address. For example,
76
+ # `users/user@example.com/spaces/{space}/spaceReadState`.
77
+ #
78
+ # - Their user id. For example,
79
+ # `users/123456789/spaces/{space}/spaceReadState`.
80
+ #
81
+ # Format: users/\\{user}/spaces/\\{space}/spaceReadState
82
+ # @!attribute [rw] update_mask
83
+ # @return [::Google::Protobuf::FieldMask]
84
+ # Required. The field paths to update. Currently supported field paths:
85
+ #
86
+ # - `last_read_time`
87
+ #
88
+ # When the `last_read_time` is before the latest message create time, the
89
+ # space appears as unread in the UI.
90
+ #
91
+ # To mark the space as read, set `last_read_time` to any value later (larger)
92
+ # than the latest message create time. The `last_read_time` is coerced to
93
+ # match the latest message create time. Note that the space read state only
94
+ # affects the read state of messages that are visible in the space's
95
+ # top-level conversation. Replies in threads are unaffected by this
96
+ # timestamp, and instead rely on the thread read state.
97
+ class UpdateSpaceReadStateRequest
98
+ include ::Google::Protobuf::MessageExts
99
+ extend ::Google::Protobuf::MessageExts::ClassMethods
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,92 @@
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
+ # Request to create a space and add specified users to it.
25
+ # @!attribute [rw] space
26
+ # @return [::Google::Apps::Chat::V1::Space]
27
+ # Required. The `Space.spaceType` field is required.
28
+ #
29
+ # To create a space, set `Space.spaceType` to `SPACE` and set
30
+ # `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when
31
+ # setting up a space, try a different `displayName`. An existing space
32
+ # within the Google Workspace organization might already use this display
33
+ # name.
34
+ #
35
+ # To create a group chat, set `Space.spaceType` to
36
+ # `GROUP_CHAT`. Don't set `Space.displayName`.
37
+ #
38
+ # To create a 1:1 conversation between humans,
39
+ # set `Space.spaceType` to `DIRECT_MESSAGE` and set
40
+ # `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or
41
+ # `Space.spaceDetails`.
42
+ #
43
+ # To create an 1:1 conversation between a human and the calling Chat app, set
44
+ # `Space.spaceType` to `DIRECT_MESSAGE` and
45
+ # `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or
46
+ # `Space.spaceDetails`.
47
+ #
48
+ # If a `DIRECT_MESSAGE` space already exists, that space is returned instead
49
+ # of creating a new space.
50
+ # @!attribute [rw] request_id
51
+ # @return [::String]
52
+ # Optional. A unique identifier for this request.
53
+ # A random UUID is recommended.
54
+ # Specifying an existing request ID returns the space created with that ID
55
+ # instead of creating a new space.
56
+ # Specifying an existing request ID from the same Chat app with a different
57
+ # authenticated user returns an error.
58
+ # @!attribute [rw] memberships
59
+ # @return [::Array<::Google::Apps::Chat::V1::Membership>]
60
+ # Optional. The Google Chat users to invite to join the space. Omit the
61
+ # calling user, as they are added automatically.
62
+ #
63
+ # The set currently allows up to 20 memberships (in addition to the caller).
64
+ #
65
+ # The `Membership.member` field must contain a `user` with `name` populated
66
+ # (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only
67
+ # add human users when setting up a space (adding Chat apps is only supported
68
+ # for direct message setup with the calling app). You can also add members
69
+ # using the user's email as an alias for \\{user}. For example, the `user.name`
70
+ # can be `users/example@gmail.com`." To invite Gmail users or users from
71
+ # external Google Workspace domains, user's email must be used for
72
+ # `{user}`.
73
+ #
74
+ # Optional when setting `Space.spaceType` to `SPACE`.
75
+ #
76
+ # Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at
77
+ # least two memberships.
78
+ #
79
+ # Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human
80
+ # user, along with exactly one membership.
81
+ #
82
+ # Must be empty when creating a 1:1 conversation between a human and the
83
+ # calling Chat app (when setting `Space.spaceType` to
84
+ # `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`).
85
+ class SetUpSpaceRequest
86
+ include ::Google::Protobuf::MessageExts
87
+ extend ::Google::Protobuf::MessageExts::ClassMethods
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,66 @@
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
+ # A user's read state within a thread, used to identify read and unread
25
+ # messages.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Resource name of the thread read state.
29
+ #
30
+ # Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState`
31
+ # @!attribute [rw] last_read_time
32
+ # @return [::Google::Protobuf::Timestamp]
33
+ # The time when the user's thread read state was updated. Usually this
34
+ # corresponds with the timestamp of the last read message in a thread.
35
+ class ThreadReadState
36
+ include ::Google::Protobuf::MessageExts
37
+ extend ::Google::Protobuf::MessageExts::ClassMethods
38
+ end
39
+
40
+ # Request message for GetThreadReadStateRequest API.
41
+ # @!attribute [rw] name
42
+ # @return [::String]
43
+ # Required. Resource name of the thread read state to retrieve.
44
+ #
45
+ # Only supports getting read state for the calling user.
46
+ #
47
+ # To refer to the calling user, set one of the following:
48
+ #
49
+ # - The `me` alias. For example,
50
+ # `users/me/spaces/{space}/threads/{thread}/threadReadState`.
51
+ #
52
+ # - Their Workspace email address. For example,
53
+ # `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`.
54
+ #
55
+ # - Their user id. For example,
56
+ # `users/123456789/spaces/{space}/threads/{thread}/threadReadState`.
57
+ #
58
+ # Format: users/\\{user}/spaces/\\{space}/threads/\\{thread}/threadReadState
59
+ class GetThreadReadStateRequest
60
+ include ::Google::Protobuf::MessageExts
61
+ extend ::Google::Protobuf::MessageExts::ClassMethods
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,84 @@
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
+ # A user in Google Chat.
25
+ # When returned as an output from a request, if your Chat app [authenticates as
26
+ # a
27
+ # user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
28
+ # the output for a `User` resource only populates the user's `name` and `type`.
29
+ # @!attribute [rw] name
30
+ # @return [::String]
31
+ # Resource name for a Google Chat {::Google::Apps::Chat::V1::User user}.
32
+ #
33
+ # Format: `users/{user}`. `users/app` can be used as an alias for the calling
34
+ # app {::Google::Apps::Chat::V1::User::Type::BOT bot} user.
35
+ #
36
+ # For {::Google::Apps::Chat::V1::User::Type::HUMAN human users}, `{user}` is the same
37
+ # user identifier as:
38
+ #
39
+ # - the `id` for the
40
+ # [Person](https://developers.google.com/people/api/rest/v1/people) in the
41
+ # People API. For example, `users/123456789` in Chat API represents the same
42
+ # person as the `123456789` Person profile ID in People API.
43
+ #
44
+ # - the `id` for a
45
+ # [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
46
+ # in the Admin SDK Directory API.
47
+ #
48
+ # - the user's email address can be used as an alias for `{user}` in API
49
+ # requests. For example, if the People API Person profile ID for
50
+ # `user@example.com` is `123456789`, you can use `users/user@example.com` as
51
+ # an alias to reference `users/123456789`. Only the canonical resource name
52
+ # (for example `users/123456789`) will be returned from the API.
53
+ # @!attribute [r] display_name
54
+ # @return [::String]
55
+ # Output only. The user's display name.
56
+ # @!attribute [rw] domain_id
57
+ # @return [::String]
58
+ # Unique identifier of the user's Google Workspace domain.
59
+ # @!attribute [rw] type
60
+ # @return [::Google::Apps::Chat::V1::User::Type]
61
+ # User type.
62
+ # @!attribute [r] is_anonymous
63
+ # @return [::Boolean]
64
+ # Output only. When `true`, the user is deleted or their profile is not
65
+ # visible.
66
+ class User
67
+ include ::Google::Protobuf::MessageExts
68
+ extend ::Google::Protobuf::MessageExts::ClassMethods
69
+
70
+ module Type
71
+ # Default value for the enum. DO NOT USE.
72
+ TYPE_UNSPECIFIED = 0
73
+
74
+ # Human user.
75
+ HUMAN = 1
76
+
77
+ # Chat app user.
78
+ BOT = 2
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,293 @@
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
+ # A widget is a UI element that presents text and images.
25
+ # @!attribute [rw] text_paragraph
26
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::TextParagraph]
27
+ # Display a text paragraph in this widget.
28
+ # @!attribute [rw] image
29
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::Image]
30
+ # Display an image in this widget.
31
+ # @!attribute [rw] key_value
32
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::KeyValue]
33
+ # Display a key value item in this widget.
34
+ # @!attribute [rw] buttons
35
+ # @return [::Array<::Google::Apps::Chat::V1::WidgetMarkup::Button>]
36
+ # A list of buttons. Buttons is also `oneof data` and only one of these
37
+ # fields should be set.
38
+ class WidgetMarkup
39
+ include ::Google::Protobuf::MessageExts
40
+ extend ::Google::Protobuf::MessageExts::ClassMethods
41
+
42
+ # A paragraph of text. Formatted text supported. For more information
43
+ # about formatting text, see
44
+ # [Formatting text in Google Chat
45
+ # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
46
+ # and
47
+ # [Formatting
48
+ # text in Google Workspace
49
+ # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
50
+ # @!attribute [rw] text
51
+ # @return [::String]
52
+ class TextParagraph
53
+ include ::Google::Protobuf::MessageExts
54
+ extend ::Google::Protobuf::MessageExts::ClassMethods
55
+ end
56
+
57
+ # A button. Can be a text button or an image button.
58
+ # @!attribute [rw] text_button
59
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::TextButton]
60
+ # A button with text and `onclick` action.
61
+ # @!attribute [rw] image_button
62
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::ImageButton]
63
+ # A button with image and `onclick` action.
64
+ class Button
65
+ include ::Google::Protobuf::MessageExts
66
+ extend ::Google::Protobuf::MessageExts::ClassMethods
67
+ end
68
+
69
+ # A button with text and `onclick` action.
70
+ # @!attribute [rw] text
71
+ # @return [::String]
72
+ # The text of the button.
73
+ # @!attribute [rw] on_click
74
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick]
75
+ # The `onclick` action of the button.
76
+ class TextButton
77
+ include ::Google::Protobuf::MessageExts
78
+ extend ::Google::Protobuf::MessageExts::ClassMethods
79
+ end
80
+
81
+ # A UI element contains a key (label) and a value (content). This
82
+ # element can also contain some actions such as `onclick` button.
83
+ # @!attribute [rw] icon
84
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::Icon]
85
+ # An enum value that's replaced by the Chat API with the
86
+ # corresponding icon image.
87
+ # @!attribute [rw] icon_url
88
+ # @return [::String]
89
+ # The icon specified by a URL.
90
+ # @!attribute [rw] top_label
91
+ # @return [::String]
92
+ # The text of the top label. Formatted text supported. For more information
93
+ # about formatting text, see
94
+ # [Formatting text in Google Chat
95
+ # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
96
+ # and
97
+ # [Formatting
98
+ # text in Google Workspace
99
+ # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
100
+ # @!attribute [rw] content
101
+ # @return [::String]
102
+ # The text of the content. Formatted text supported and always required.
103
+ # For more information
104
+ # about formatting text, see
105
+ # [Formatting text in Google Chat
106
+ # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
107
+ # and
108
+ # [Formatting
109
+ # text in Google Workspace
110
+ # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
111
+ # @!attribute [rw] content_multiline
112
+ # @return [::Boolean]
113
+ # If the content should be multiline.
114
+ # @!attribute [rw] bottom_label
115
+ # @return [::String]
116
+ # The text of the bottom label. Formatted text supported. For more
117
+ # information about formatting text, see [Formatting text in Google Chat
118
+ # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
119
+ # and
120
+ # [Formatting
121
+ # text in Google Workspace
122
+ # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
123
+ # @!attribute [rw] on_click
124
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick]
125
+ # The `onclick` action. Only the top label, bottom label, and content
126
+ # region are clickable.
127
+ # @!attribute [rw] button
128
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::Button]
129
+ # A button that can be clicked to trigger an action.
130
+ class KeyValue
131
+ include ::Google::Protobuf::MessageExts
132
+ extend ::Google::Protobuf::MessageExts::ClassMethods
133
+ end
134
+
135
+ # An image that's specified by a URL and can have an `onclick` action.
136
+ # @!attribute [rw] image_url
137
+ # @return [::String]
138
+ # The URL of the image.
139
+ # @!attribute [rw] on_click
140
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick]
141
+ # The `onclick` action.
142
+ # @!attribute [rw] aspect_ratio
143
+ # @return [::Float]
144
+ # The aspect ratio of this image (width and height). This field lets you
145
+ # reserve the right height for the image while waiting for it to load.
146
+ # It's not meant to override the built-in aspect ratio of the image.
147
+ # If unset, the server fills it by prefetching the image.
148
+ class Image
149
+ include ::Google::Protobuf::MessageExts
150
+ extend ::Google::Protobuf::MessageExts::ClassMethods
151
+ end
152
+
153
+ # An image button with an `onclick` action.
154
+ # @!attribute [rw] icon
155
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::Icon]
156
+ # The icon specified by an `enum` that indices to an icon provided by
157
+ # Chat API.
158
+ # @!attribute [rw] icon_url
159
+ # @return [::String]
160
+ # The icon specified by a URL.
161
+ # @!attribute [rw] on_click
162
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::OnClick]
163
+ # The `onclick` action.
164
+ # @!attribute [rw] name
165
+ # @return [::String]
166
+ # The name of this `image_button` that's used for accessibility.
167
+ # Default value is provided if this name isn't specified.
168
+ class ImageButton
169
+ include ::Google::Protobuf::MessageExts
170
+ extend ::Google::Protobuf::MessageExts::ClassMethods
171
+ end
172
+
173
+ # An `onclick` action (for example, open a link).
174
+ # @!attribute [rw] action
175
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::FormAction]
176
+ # A form action is triggered by this `onclick` action if specified.
177
+ # @!attribute [rw] open_link
178
+ # @return [::Google::Apps::Chat::V1::WidgetMarkup::OpenLink]
179
+ # This `onclick` action triggers an open link action if specified.
180
+ class OnClick
181
+ include ::Google::Protobuf::MessageExts
182
+ extend ::Google::Protobuf::MessageExts::ClassMethods
183
+ end
184
+
185
+ # A link that opens a new window.
186
+ # @!attribute [rw] url
187
+ # @return [::String]
188
+ # The URL to open.
189
+ class OpenLink
190
+ include ::Google::Protobuf::MessageExts
191
+ extend ::Google::Protobuf::MessageExts::ClassMethods
192
+ end
193
+
194
+ # A form action describes the behavior when the form is submitted.
195
+ # For example, you can invoke Apps Script to handle the form.
196
+ # @!attribute [rw] action_method_name
197
+ # @return [::String]
198
+ # The method name is used to identify which part of the form triggered the
199
+ # form submission. This information is echoed back to the Chat app as part
200
+ # of the card click event. You can use the same method name for several
201
+ # elements that trigger a common behavior.
202
+ # @!attribute [rw] parameters
203
+ # @return [::Array<::Google::Apps::Chat::V1::WidgetMarkup::FormAction::ActionParameter>]
204
+ # List of action parameters.
205
+ class FormAction
206
+ include ::Google::Protobuf::MessageExts
207
+ extend ::Google::Protobuf::MessageExts::ClassMethods
208
+
209
+ # List of string parameters to supply when the action method is invoked.
210
+ # For example, consider three snooze buttons: snooze now, snooze one day,
211
+ # snooze next week. You might use `action method = snooze()`, passing the
212
+ # snooze type and snooze time in the list of string parameters.
213
+ # @!attribute [rw] key
214
+ # @return [::String]
215
+ # The name of the parameter for the action script.
216
+ # @!attribute [rw] value
217
+ # @return [::String]
218
+ # The value of the parameter.
219
+ class ActionParameter
220
+ include ::Google::Protobuf::MessageExts
221
+ extend ::Google::Protobuf::MessageExts::ClassMethods
222
+ end
223
+ end
224
+
225
+ # The set of supported icons.
226
+ module Icon
227
+ ICON_UNSPECIFIED = 0
228
+
229
+ AIRPLANE = 1
230
+
231
+ BOOKMARK = 26
232
+
233
+ BUS = 25
234
+
235
+ CAR = 9
236
+
237
+ CLOCK = 2
238
+
239
+ CONFIRMATION_NUMBER_ICON = 12
240
+
241
+ DOLLAR = 14
242
+
243
+ DESCRIPTION = 27
244
+
245
+ EMAIL = 10
246
+
247
+ EVENT_PERFORMER = 20
248
+
249
+ EVENT_SEAT = 21
250
+
251
+ FLIGHT_ARRIVAL = 16
252
+
253
+ FLIGHT_DEPARTURE = 15
254
+
255
+ HOTEL = 6
256
+
257
+ HOTEL_ROOM_TYPE = 17
258
+
259
+ INVITE = 19
260
+
261
+ MAP_PIN = 3
262
+
263
+ MEMBERSHIP = 24
264
+
265
+ MULTIPLE_PEOPLE = 18
266
+
267
+ OFFER = 30
268
+
269
+ PERSON = 11
270
+
271
+ PHONE = 13
272
+
273
+ RESTAURANT_ICON = 7
274
+
275
+ SHOPPING_CART = 8
276
+
277
+ STAR = 5
278
+
279
+ STORE = 22
280
+
281
+ TICKET = 4
282
+
283
+ TRAIN = 23
284
+
285
+ VIDEO_CAMERA = 28
286
+
287
+ VIDEO_PLAY = 29
288
+ end
289
+ end
290
+ end
291
+ end
292
+ end
293
+ end