google-apis-chat_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1130b8f769c3c76d85a18bbc3349a0742b7492bba98270bacf337946b6fe222a
4
+ data.tar.gz: '0809cdb0e4b88afef1e2bb516c8be627db90aa5b37a8adcbe592a432bfbc4b1c'
5
+ SHA512:
6
+ metadata.gz: 7f6e11fec9dd2aef5c919915bb0de3dfb89ed51e8ed66def28d62f2f268c8e35005577d1de7b0a0439d726b97c90ed17f38d9492a68281a6a0ce159a35913d86
7
+ data.tar.gz: bd0951881e2fcdd26506ba2127ea66aa2bedf9bef5d70d0d2c10a40073443e074bcfe6be6ca26181a034c9ab82bdcf694c457e69830b6dbf7bf3bcf3cc25cb25
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-chat_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/chat_v1/*.rb
9
+ lib/google/apis/chat_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-chat_v1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201211
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1 of the Hangouts Chat API
2
+
3
+ This is a simple client library for version V1 of the Hangouts Chat API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/chat.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-chat_v1', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-chat_v1
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/chat_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::ChatV1::HangoutsChatService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Chat service in particular.)
67
+
68
+ For reference information on specific calls in the Hangouts Chat API, see the {Google::Apis::ChatV1::HangoutsChatService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-chat_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://developers.google.com/hangouts/chat) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/chat_v1"
@@ -0,0 +1,33 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/chat_v1/service.rb'
16
+ require 'google/apis/chat_v1/classes.rb'
17
+ require 'google/apis/chat_v1/representations.rb'
18
+ require 'google/apis/chat_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Hangouts Chat API
23
+ #
24
+ # Enables bots to fetch information and perform actions in Hangouts Chat.
25
+ #
26
+ # @see https://developers.google.com/hangouts/chat
27
+ module ChatV1
28
+ # Version of the Hangouts Chat API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1'
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,1186 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module ChatV1
24
+
25
+ # List of string parameters to supply when the action method is invoked. For
26
+ # example, consider three snooze buttons: snooze now, snooze 1 day, snooze next
27
+ # week. You might use action method = snooze(), passing the snooze type and
28
+ # snooze time in the list of string parameters.
29
+ class ActionParameter
30
+ include Google::Apis::Core::Hashable
31
+
32
+ # The name of the parameter for the action script.
33
+ # Corresponds to the JSON property `key`
34
+ # @return [String]
35
+ attr_accessor :key
36
+
37
+ # The value of the parameter.
38
+ # Corresponds to the JSON property `value`
39
+ # @return [String]
40
+ attr_accessor :value
41
+
42
+ def initialize(**args)
43
+ update!(**args)
44
+ end
45
+
46
+ # Update properties of this object
47
+ def update!(**args)
48
+ @key = args[:key] if args.key?(:key)
49
+ @value = args[:value] if args.key?(:value)
50
+ end
51
+ end
52
+
53
+ # Parameters that a bot can use to configure how it's response is posted.
54
+ class ActionResponse
55
+ include Google::Apis::Core::Hashable
56
+
57
+ # The type of bot response.
58
+ # Corresponds to the JSON property `type`
59
+ # @return [String]
60
+ attr_accessor :type
61
+
62
+ # URL for users to auth or config. (Only for REQUEST_CONFIG response types.)
63
+ # Corresponds to the JSON property `url`
64
+ # @return [String]
65
+ attr_accessor :url
66
+
67
+ def initialize(**args)
68
+ update!(**args)
69
+ end
70
+
71
+ # Update properties of this object
72
+ def update!(**args)
73
+ @type = args[:type] if args.key?(:type)
74
+ @url = args[:url] if args.key?(:url)
75
+ end
76
+ end
77
+
78
+ # Annotations associated with the plain-text body of the message. Example plain-
79
+ # text message body: ``` Hello @FooBot how are you!" ``` The corresponding
80
+ # annotations metadata: ``` "annotations":[` "type":"USER_MENTION", "startIndex":
81
+ # 6, "length":7, "userMention": ` "user": ` "name":"users/107946847022116401880",
82
+ # "displayName":"FooBot", "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" `, "
83
+ # type":"MENTION" ` `] ```
84
+ class Annotation
85
+ include Google::Apis::Core::Hashable
86
+
87
+ # Length of the substring in the plain-text message body this annotation
88
+ # corresponds to.
89
+ # Corresponds to the JSON property `length`
90
+ # @return [Fixnum]
91
+ attr_accessor :length
92
+
93
+ # Annotation metadata for slash commands (/).
94
+ # Corresponds to the JSON property `slashCommand`
95
+ # @return [Google::Apis::ChatV1::SlashCommandMetadata]
96
+ attr_accessor :slash_command
97
+
98
+ # Start index (0-based, inclusive) in the plain-text message body this
99
+ # annotation corresponds to.
100
+ # Corresponds to the JSON property `startIndex`
101
+ # @return [Fixnum]
102
+ attr_accessor :start_index
103
+
104
+ # The type of this annotation.
105
+ # Corresponds to the JSON property `type`
106
+ # @return [String]
107
+ attr_accessor :type
108
+
109
+ # Annotation metadata for user mentions (@).
110
+ # Corresponds to the JSON property `userMention`
111
+ # @return [Google::Apis::ChatV1::UserMentionMetadata]
112
+ attr_accessor :user_mention
113
+
114
+ def initialize(**args)
115
+ update!(**args)
116
+ end
117
+
118
+ # Update properties of this object
119
+ def update!(**args)
120
+ @length = args[:length] if args.key?(:length)
121
+ @slash_command = args[:slash_command] if args.key?(:slash_command)
122
+ @start_index = args[:start_index] if args.key?(:start_index)
123
+ @type = args[:type] if args.key?(:type)
124
+ @user_mention = args[:user_mention] if args.key?(:user_mention)
125
+ end
126
+ end
127
+
128
+ # An attachment in Hangouts Chat.
129
+ class Attachment
130
+ include Google::Apis::Core::Hashable
131
+
132
+ # A reference to the data of an attachment.
133
+ # Corresponds to the JSON property `attachmentDataRef`
134
+ # @return [Google::Apis::ChatV1::AttachmentDataRef]
135
+ attr_accessor :attachment_data_ref
136
+
137
+ # The original file name for the content, not the full path.
138
+ # Corresponds to the JSON property `contentName`
139
+ # @return [String]
140
+ attr_accessor :content_name
141
+
142
+ # The content type (MIME type) of the file.
143
+ # Corresponds to the JSON property `contentType`
144
+ # @return [String]
145
+ attr_accessor :content_type
146
+
147
+ # Output only. The download URL which should be used to allow a human user to
148
+ # download the attachment. Bots should not use this URL to download attachment
149
+ # content.
150
+ # Corresponds to the JSON property `downloadUri`
151
+ # @return [String]
152
+ attr_accessor :download_uri
153
+
154
+ # A reference to the data of a drive attachment.
155
+ # Corresponds to the JSON property `driveDataRef`
156
+ # @return [Google::Apis::ChatV1::DriveDataRef]
157
+ attr_accessor :drive_data_ref
158
+
159
+ # Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*
160
+ # ".
161
+ # Corresponds to the JSON property `name`
162
+ # @return [String]
163
+ attr_accessor :name
164
+
165
+ # The source of the attachment.
166
+ # Corresponds to the JSON property `source`
167
+ # @return [String]
168
+ attr_accessor :source
169
+
170
+ # Output only. The thumbnail URL which should be used to preview the attachment
171
+ # to a human user. Bots should not use this URL to download attachment content.
172
+ # Corresponds to the JSON property `thumbnailUri`
173
+ # @return [String]
174
+ attr_accessor :thumbnail_uri
175
+
176
+ def initialize(**args)
177
+ update!(**args)
178
+ end
179
+
180
+ # Update properties of this object
181
+ def update!(**args)
182
+ @attachment_data_ref = args[:attachment_data_ref] if args.key?(:attachment_data_ref)
183
+ @content_name = args[:content_name] if args.key?(:content_name)
184
+ @content_type = args[:content_type] if args.key?(:content_type)
185
+ @download_uri = args[:download_uri] if args.key?(:download_uri)
186
+ @drive_data_ref = args[:drive_data_ref] if args.key?(:drive_data_ref)
187
+ @name = args[:name] if args.key?(:name)
188
+ @source = args[:source] if args.key?(:source)
189
+ @thumbnail_uri = args[:thumbnail_uri] if args.key?(:thumbnail_uri)
190
+ end
191
+ end
192
+
193
+ # A reference to the data of an attachment.
194
+ class AttachmentDataRef
195
+ include Google::Apis::Core::Hashable
196
+
197
+ # The resource name of the attachment data. This is used with the media API to
198
+ # download the attachment data.
199
+ # Corresponds to the JSON property `resourceName`
200
+ # @return [String]
201
+ attr_accessor :resource_name
202
+
203
+ def initialize(**args)
204
+ update!(**args)
205
+ end
206
+
207
+ # Update properties of this object
208
+ def update!(**args)
209
+ @resource_name = args[:resource_name] if args.key?(:resource_name)
210
+ end
211
+ end
212
+
213
+ # A button. Can be a text button or an image button.
214
+ class Button
215
+ include Google::Apis::Core::Hashable
216
+
217
+ # An image button with an onclick action.
218
+ # Corresponds to the JSON property `imageButton`
219
+ # @return [Google::Apis::ChatV1::ImageButton]
220
+ attr_accessor :image_button
221
+
222
+ # A button with text and onclick action.
223
+ # Corresponds to the JSON property `textButton`
224
+ # @return [Google::Apis::ChatV1::TextButton]
225
+ attr_accessor :text_button
226
+
227
+ def initialize(**args)
228
+ update!(**args)
229
+ end
230
+
231
+ # Update properties of this object
232
+ def update!(**args)
233
+ @image_button = args[:image_button] if args.key?(:image_button)
234
+ @text_button = args[:text_button] if args.key?(:text_button)
235
+ end
236
+ end
237
+
238
+ # A card is a UI element that can contain UI widgets such as texts, images.
239
+ class Card
240
+ include Google::Apis::Core::Hashable
241
+
242
+ # The actions of this card.
243
+ # Corresponds to the JSON property `cardActions`
244
+ # @return [Array<Google::Apis::ChatV1::CardAction>]
245
+ attr_accessor :card_actions
246
+
247
+ # The header of the card. A header usually contains a title and an image.
248
+ # Corresponds to the JSON property `header`
249
+ # @return [Google::Apis::ChatV1::CardHeader]
250
+ attr_accessor :header
251
+
252
+ # Name of the card.
253
+ # Corresponds to the JSON property `name`
254
+ # @return [String]
255
+ attr_accessor :name
256
+
257
+ # Sections are separated by a line divider.
258
+ # Corresponds to the JSON property `sections`
259
+ # @return [Array<Google::Apis::ChatV1::Section>]
260
+ attr_accessor :sections
261
+
262
+ def initialize(**args)
263
+ update!(**args)
264
+ end
265
+
266
+ # Update properties of this object
267
+ def update!(**args)
268
+ @card_actions = args[:card_actions] if args.key?(:card_actions)
269
+ @header = args[:header] if args.key?(:header)
270
+ @name = args[:name] if args.key?(:name)
271
+ @sections = args[:sections] if args.key?(:sections)
272
+ end
273
+ end
274
+
275
+ # A card action is the action associated with the card. For an invoice card, a
276
+ # typical action would be: delete invoice, email invoice or open the invoice in
277
+ # browser.
278
+ class CardAction
279
+ include Google::Apis::Core::Hashable
280
+
281
+ # The label used to be displayed in the action menu item.
282
+ # Corresponds to the JSON property `actionLabel`
283
+ # @return [String]
284
+ attr_accessor :action_label
285
+
286
+ # An onclick action (e.g. open a link).
287
+ # Corresponds to the JSON property `onClick`
288
+ # @return [Google::Apis::ChatV1::OnClick]
289
+ attr_accessor :on_click
290
+
291
+ def initialize(**args)
292
+ update!(**args)
293
+ end
294
+
295
+ # Update properties of this object
296
+ def update!(**args)
297
+ @action_label = args[:action_label] if args.key?(:action_label)
298
+ @on_click = args[:on_click] if args.key?(:on_click)
299
+ end
300
+ end
301
+
302
+ #
303
+ class CardHeader
304
+ include Google::Apis::Core::Hashable
305
+
306
+ # The image's type (e.g. square border or circular border).
307
+ # Corresponds to the JSON property `imageStyle`
308
+ # @return [String]
309
+ attr_accessor :image_style
310
+
311
+ # The URL of the image in the card header.
312
+ # Corresponds to the JSON property `imageUrl`
313
+ # @return [String]
314
+ attr_accessor :image_url
315
+
316
+ # The subtitle of the card header.
317
+ # Corresponds to the JSON property `subtitle`
318
+ # @return [String]
319
+ attr_accessor :subtitle
320
+
321
+ # The title must be specified. The header has a fixed height: if both a title
322
+ # and subtitle is specified, each will take up 1 line. If only the title is
323
+ # specified, it will take up both lines.
324
+ # Corresponds to the JSON property `title`
325
+ # @return [String]
326
+ attr_accessor :title
327
+
328
+ def initialize(**args)
329
+ update!(**args)
330
+ end
331
+
332
+ # Update properties of this object
333
+ def update!(**args)
334
+ @image_style = args[:image_style] if args.key?(:image_style)
335
+ @image_url = args[:image_url] if args.key?(:image_url)
336
+ @subtitle = args[:subtitle] if args.key?(:subtitle)
337
+ @title = args[:title] if args.key?(:title)
338
+ end
339
+ end
340
+
341
+ # Google Chat events.
342
+ class DeprecatedEvent
343
+ include Google::Apis::Core::Hashable
344
+
345
+ # A form action describes the behavior when the form is submitted. For example,
346
+ # an Apps Script can be invoked to handle the form.
347
+ # Corresponds to the JSON property `action`
348
+ # @return [Google::Apis::ChatV1::FormAction]
349
+ attr_accessor :action
350
+
351
+ # The URL the bot should redirect the user to after they have completed an
352
+ # authorization or configuration flow outside of Google Chat. See the [
353
+ # Authorizing access to 3p services guide](/hangouts/chat/how-tos/auth-3p) for
354
+ # more information.
355
+ # Corresponds to the JSON property `configCompleteRedirectUrl`
356
+ # @return [String]
357
+ attr_accessor :config_complete_redirect_url
358
+
359
+ # The timestamp indicating when the event was dispatched.
360
+ # Corresponds to the JSON property `eventTime`
361
+ # @return [String]
362
+ attr_accessor :event_time
363
+
364
+ # A message in Hangouts Chat.
365
+ # Corresponds to the JSON property `message`
366
+ # @return [Google::Apis::ChatV1::Message]
367
+ attr_accessor :message
368
+
369
+ # A room or DM in Hangouts Chat.
370
+ # Corresponds to the JSON property `space`
371
+ # @return [Google::Apis::ChatV1::Space]
372
+ attr_accessor :space
373
+
374
+ # The bot-defined key for the thread related to the event. See the thread_key
375
+ # field of the `spaces.message.create` request for more information.
376
+ # Corresponds to the JSON property `threadKey`
377
+ # @return [String]
378
+ attr_accessor :thread_key
379
+
380
+ # A secret value that bots can use to verify if a request is from Google. The
381
+ # token is randomly generated by Google, remains static, and can be obtained
382
+ # from the Google Chat API configuration page in the Cloud Console. Developers
383
+ # can revoke/regenerate it if needed from the same page.
384
+ # Corresponds to the JSON property `token`
385
+ # @return [String]
386
+ attr_accessor :token
387
+
388
+ # The type of the event.
389
+ # Corresponds to the JSON property `type`
390
+ # @return [String]
391
+ attr_accessor :type
392
+
393
+ # A user in Hangouts Chat.
394
+ # Corresponds to the JSON property `user`
395
+ # @return [Google::Apis::ChatV1::User]
396
+ attr_accessor :user
397
+
398
+ def initialize(**args)
399
+ update!(**args)
400
+ end
401
+
402
+ # Update properties of this object
403
+ def update!(**args)
404
+ @action = args[:action] if args.key?(:action)
405
+ @config_complete_redirect_url = args[:config_complete_redirect_url] if args.key?(:config_complete_redirect_url)
406
+ @event_time = args[:event_time] if args.key?(:event_time)
407
+ @message = args[:message] if args.key?(:message)
408
+ @space = args[:space] if args.key?(:space)
409
+ @thread_key = args[:thread_key] if args.key?(:thread_key)
410
+ @token = args[:token] if args.key?(:token)
411
+ @type = args[:type] if args.key?(:type)
412
+ @user = args[:user] if args.key?(:user)
413
+ end
414
+ end
415
+
416
+ # A reference to the data of a drive attachment.
417
+ class DriveDataRef
418
+ include Google::Apis::Core::Hashable
419
+
420
+ # The id for the drive file, for use with the Drive API.
421
+ # Corresponds to the JSON property `driveFileId`
422
+ # @return [String]
423
+ attr_accessor :drive_file_id
424
+
425
+ def initialize(**args)
426
+ update!(**args)
427
+ end
428
+
429
+ # Update properties of this object
430
+ def update!(**args)
431
+ @drive_file_id = args[:drive_file_id] if args.key?(:drive_file_id)
432
+ end
433
+ end
434
+
435
+ # A generic empty message that you can re-use to avoid defining duplicated empty
436
+ # messages in your APIs. A typical example is to use it as the request or the
437
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
438
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
439
+ # `Empty` is empty JSON object ````.
440
+ class Empty
441
+ include Google::Apis::Core::Hashable
442
+
443
+ def initialize(**args)
444
+ update!(**args)
445
+ end
446
+
447
+ # Update properties of this object
448
+ def update!(**args)
449
+ end
450
+ end
451
+
452
+ # A form action describes the behavior when the form is submitted. For example,
453
+ # an Apps Script can be invoked to handle the form.
454
+ class FormAction
455
+ include Google::Apis::Core::Hashable
456
+
457
+ # The method name is used to identify which part of the form triggered the form
458
+ # submission. This information is echoed back to the bot as part of the card
459
+ # click event. The same method name can be used for several elements that
460
+ # trigger a common behavior if desired.
461
+ # Corresponds to the JSON property `actionMethodName`
462
+ # @return [String]
463
+ attr_accessor :action_method_name
464
+
465
+ # List of action parameters.
466
+ # Corresponds to the JSON property `parameters`
467
+ # @return [Array<Google::Apis::ChatV1::ActionParameter>]
468
+ attr_accessor :parameters
469
+
470
+ def initialize(**args)
471
+ update!(**args)
472
+ end
473
+
474
+ # Update properties of this object
475
+ def update!(**args)
476
+ @action_method_name = args[:action_method_name] if args.key?(:action_method_name)
477
+ @parameters = args[:parameters] if args.key?(:parameters)
478
+ end
479
+ end
480
+
481
+ # An image that is specified by a URL and can have an onclick action.
482
+ class Image
483
+ include Google::Apis::Core::Hashable
484
+
485
+ # The aspect ratio of this image (width/height). This field allows clients to
486
+ # reserve the right height for the image while waiting for it to load. It's not
487
+ # meant to override the native aspect ratio of the image. If unset, the server
488
+ # fills it by prefetching the image.
489
+ # Corresponds to the JSON property `aspectRatio`
490
+ # @return [Float]
491
+ attr_accessor :aspect_ratio
492
+
493
+ # The URL of the image.
494
+ # Corresponds to the JSON property `imageUrl`
495
+ # @return [String]
496
+ attr_accessor :image_url
497
+
498
+ # An onclick action (e.g. open a link).
499
+ # Corresponds to the JSON property `onClick`
500
+ # @return [Google::Apis::ChatV1::OnClick]
501
+ attr_accessor :on_click
502
+
503
+ def initialize(**args)
504
+ update!(**args)
505
+ end
506
+
507
+ # Update properties of this object
508
+ def update!(**args)
509
+ @aspect_ratio = args[:aspect_ratio] if args.key?(:aspect_ratio)
510
+ @image_url = args[:image_url] if args.key?(:image_url)
511
+ @on_click = args[:on_click] if args.key?(:on_click)
512
+ end
513
+ end
514
+
515
+ # An image button with an onclick action.
516
+ class ImageButton
517
+ include Google::Apis::Core::Hashable
518
+
519
+ # The icon specified by an enum that indices to an icon provided by Chat API.
520
+ # Corresponds to the JSON property `icon`
521
+ # @return [String]
522
+ attr_accessor :icon
523
+
524
+ # The icon specified by a URL.
525
+ # Corresponds to the JSON property `iconUrl`
526
+ # @return [String]
527
+ attr_accessor :icon_url
528
+
529
+ # The name of this image_button which will be used for accessibility. Default
530
+ # value will be provided if developers don't specify.
531
+ # Corresponds to the JSON property `name`
532
+ # @return [String]
533
+ attr_accessor :name
534
+
535
+ # An onclick action (e.g. open a link).
536
+ # Corresponds to the JSON property `onClick`
537
+ # @return [Google::Apis::ChatV1::OnClick]
538
+ attr_accessor :on_click
539
+
540
+ def initialize(**args)
541
+ update!(**args)
542
+ end
543
+
544
+ # Update properties of this object
545
+ def update!(**args)
546
+ @icon = args[:icon] if args.key?(:icon)
547
+ @icon_url = args[:icon_url] if args.key?(:icon_url)
548
+ @name = args[:name] if args.key?(:name)
549
+ @on_click = args[:on_click] if args.key?(:on_click)
550
+ end
551
+ end
552
+
553
+ # A UI element contains a key (label) and a value (content). And this element
554
+ # may also contain some actions such as onclick button.
555
+ class KeyValue
556
+ include Google::Apis::Core::Hashable
557
+
558
+ # The text of the bottom label. Formatted text supported.
559
+ # Corresponds to the JSON property `bottomLabel`
560
+ # @return [String]
561
+ attr_accessor :bottom_label
562
+
563
+ # A button. Can be a text button or an image button.
564
+ # Corresponds to the JSON property `button`
565
+ # @return [Google::Apis::ChatV1::Button]
566
+ attr_accessor :button
567
+
568
+ # The text of the content. Formatted text supported and always required.
569
+ # Corresponds to the JSON property `content`
570
+ # @return [String]
571
+ attr_accessor :content
572
+
573
+ # If the content should be multiline.
574
+ # Corresponds to the JSON property `contentMultiline`
575
+ # @return [Boolean]
576
+ attr_accessor :content_multiline
577
+ alias_method :content_multiline?, :content_multiline
578
+
579
+ # An enum value that will be replaced by the Chat API with the corresponding
580
+ # icon image.
581
+ # Corresponds to the JSON property `icon`
582
+ # @return [String]
583
+ attr_accessor :icon
584
+
585
+ # The icon specified by a URL.
586
+ # Corresponds to the JSON property `iconUrl`
587
+ # @return [String]
588
+ attr_accessor :icon_url
589
+
590
+ # An onclick action (e.g. open a link).
591
+ # Corresponds to the JSON property `onClick`
592
+ # @return [Google::Apis::ChatV1::OnClick]
593
+ attr_accessor :on_click
594
+
595
+ # The text of the top label. Formatted text supported.
596
+ # Corresponds to the JSON property `topLabel`
597
+ # @return [String]
598
+ attr_accessor :top_label
599
+
600
+ def initialize(**args)
601
+ update!(**args)
602
+ end
603
+
604
+ # Update properties of this object
605
+ def update!(**args)
606
+ @bottom_label = args[:bottom_label] if args.key?(:bottom_label)
607
+ @button = args[:button] if args.key?(:button)
608
+ @content = args[:content] if args.key?(:content)
609
+ @content_multiline = args[:content_multiline] if args.key?(:content_multiline)
610
+ @icon = args[:icon] if args.key?(:icon)
611
+ @icon_url = args[:icon_url] if args.key?(:icon_url)
612
+ @on_click = args[:on_click] if args.key?(:on_click)
613
+ @top_label = args[:top_label] if args.key?(:top_label)
614
+ end
615
+ end
616
+
617
+ #
618
+ class ListMembershipsResponse
619
+ include Google::Apis::Core::Hashable
620
+
621
+ # List of memberships in the requested (or first) page.
622
+ # Corresponds to the JSON property `memberships`
623
+ # @return [Array<Google::Apis::ChatV1::Membership>]
624
+ attr_accessor :memberships
625
+
626
+ # Continuation token to retrieve the next page of results. It will be empty for
627
+ # the last page of results.
628
+ # Corresponds to the JSON property `nextPageToken`
629
+ # @return [String]
630
+ attr_accessor :next_page_token
631
+
632
+ def initialize(**args)
633
+ update!(**args)
634
+ end
635
+
636
+ # Update properties of this object
637
+ def update!(**args)
638
+ @memberships = args[:memberships] if args.key?(:memberships)
639
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
640
+ end
641
+ end
642
+
643
+ #
644
+ class ListSpacesResponse
645
+ include Google::Apis::Core::Hashable
646
+
647
+ # Continuation token to retrieve the next page of results. It will be empty for
648
+ # the last page of results. Tokens expire in an hour. An error is thrown if an
649
+ # expired token is passed.
650
+ # Corresponds to the JSON property `nextPageToken`
651
+ # @return [String]
652
+ attr_accessor :next_page_token
653
+
654
+ # List of spaces in the requested (or first) page.
655
+ # Corresponds to the JSON property `spaces`
656
+ # @return [Array<Google::Apis::ChatV1::Space>]
657
+ attr_accessor :spaces
658
+
659
+ def initialize(**args)
660
+ update!(**args)
661
+ end
662
+
663
+ # Update properties of this object
664
+ def update!(**args)
665
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
666
+ @spaces = args[:spaces] if args.key?(:spaces)
667
+ end
668
+ end
669
+
670
+ # Media resource.
671
+ class Media
672
+ include Google::Apis::Core::Hashable
673
+
674
+ # Name of the media resource.
675
+ # Corresponds to the JSON property `resourceName`
676
+ # @return [String]
677
+ attr_accessor :resource_name
678
+
679
+ def initialize(**args)
680
+ update!(**args)
681
+ end
682
+
683
+ # Update properties of this object
684
+ def update!(**args)
685
+ @resource_name = args[:resource_name] if args.key?(:resource_name)
686
+ end
687
+ end
688
+
689
+ # Represents a membership relation in Hangouts Chat.
690
+ class Membership
691
+ include Google::Apis::Core::Hashable
692
+
693
+ # The creation time of the membership a.k.a the time at which the member joined
694
+ # the space, if applicable.
695
+ # Corresponds to the JSON property `createTime`
696
+ # @return [String]
697
+ attr_accessor :create_time
698
+
699
+ # A user in Hangouts Chat.
700
+ # Corresponds to the JSON property `member`
701
+ # @return [Google::Apis::ChatV1::User]
702
+ attr_accessor :member
703
+
704
+ #
705
+ # Corresponds to the JSON property `name`
706
+ # @return [String]
707
+ attr_accessor :name
708
+
709
+ # State of the membership.
710
+ # Corresponds to the JSON property `state`
711
+ # @return [String]
712
+ attr_accessor :state
713
+
714
+ def initialize(**args)
715
+ update!(**args)
716
+ end
717
+
718
+ # Update properties of this object
719
+ def update!(**args)
720
+ @create_time = args[:create_time] if args.key?(:create_time)
721
+ @member = args[:member] if args.key?(:member)
722
+ @name = args[:name] if args.key?(:name)
723
+ @state = args[:state] if args.key?(:state)
724
+ end
725
+ end
726
+
727
+ # A message in Hangouts Chat.
728
+ class Message
729
+ include Google::Apis::Core::Hashable
730
+
731
+ # Parameters that a bot can use to configure how it's response is posted.
732
+ # Corresponds to the JSON property `actionResponse`
733
+ # @return [Google::Apis::ChatV1::ActionResponse]
734
+ attr_accessor :action_response
735
+
736
+ # Output only. Annotations associated with the text in this message.
737
+ # Corresponds to the JSON property `annotations`
738
+ # @return [Array<Google::Apis::ChatV1::Annotation>]
739
+ attr_accessor :annotations
740
+
741
+ # Plain-text body of the message with all bot mentions stripped out.
742
+ # Corresponds to the JSON property `argumentText`
743
+ # @return [String]
744
+ attr_accessor :argument_text
745
+
746
+ # User uploaded attachment.
747
+ # Corresponds to the JSON property `attachment`
748
+ # @return [Array<Google::Apis::ChatV1::Attachment>]
749
+ attr_accessor :attachment
750
+
751
+ # Rich, formatted and interactive cards that can be used to display UI elements
752
+ # such as: formatted texts, buttons, clickable images. Cards are normally
753
+ # displayed below the plain-text body of the message.
754
+ # Corresponds to the JSON property `cards`
755
+ # @return [Array<Google::Apis::ChatV1::Card>]
756
+ attr_accessor :cards
757
+
758
+ # Output only. The time at which the message was created in Hangouts Chat server.
759
+ # Corresponds to the JSON property `createTime`
760
+ # @return [String]
761
+ attr_accessor :create_time
762
+
763
+ # A plain-text description of the message's cards, used when the actual cards
764
+ # cannot be displayed (e.g. mobile notifications).
765
+ # Corresponds to the JSON property `fallbackText`
766
+ # @return [String]
767
+ attr_accessor :fallback_text
768
+
769
+ # Resource name, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/
770
+ # messages/UMxbHmzDlr4.UMxbHmzDlr4
771
+ # Corresponds to the JSON property `name`
772
+ # @return [String]
773
+ attr_accessor :name
774
+
775
+ # Text for generating preview chips. This text will not be displayed to the user,
776
+ # but any links to images, web pages, videos, etc. included here will generate
777
+ # preview chips.
778
+ # Corresponds to the JSON property `previewText`
779
+ # @return [String]
780
+ attr_accessor :preview_text
781
+
782
+ # A user in Hangouts Chat.
783
+ # Corresponds to the JSON property `sender`
784
+ # @return [Google::Apis::ChatV1::User]
785
+ attr_accessor :sender
786
+
787
+ # A Slash Command in Hangouts Chat.
788
+ # Corresponds to the JSON property `slashCommand`
789
+ # @return [Google::Apis::ChatV1::SlashCommand]
790
+ attr_accessor :slash_command
791
+
792
+ # A room or DM in Hangouts Chat.
793
+ # Corresponds to the JSON property `space`
794
+ # @return [Google::Apis::ChatV1::Space]
795
+ attr_accessor :space
796
+
797
+ # Plain-text body of the message.
798
+ # Corresponds to the JSON property `text`
799
+ # @return [String]
800
+ attr_accessor :text
801
+
802
+ # A thread in Hangouts Chat.
803
+ # Corresponds to the JSON property `thread`
804
+ # @return [Google::Apis::ChatV1::Thread]
805
+ attr_accessor :thread
806
+
807
+ def initialize(**args)
808
+ update!(**args)
809
+ end
810
+
811
+ # Update properties of this object
812
+ def update!(**args)
813
+ @action_response = args[:action_response] if args.key?(:action_response)
814
+ @annotations = args[:annotations] if args.key?(:annotations)
815
+ @argument_text = args[:argument_text] if args.key?(:argument_text)
816
+ @attachment = args[:attachment] if args.key?(:attachment)
817
+ @cards = args[:cards] if args.key?(:cards)
818
+ @create_time = args[:create_time] if args.key?(:create_time)
819
+ @fallback_text = args[:fallback_text] if args.key?(:fallback_text)
820
+ @name = args[:name] if args.key?(:name)
821
+ @preview_text = args[:preview_text] if args.key?(:preview_text)
822
+ @sender = args[:sender] if args.key?(:sender)
823
+ @slash_command = args[:slash_command] if args.key?(:slash_command)
824
+ @space = args[:space] if args.key?(:space)
825
+ @text = args[:text] if args.key?(:text)
826
+ @thread = args[:thread] if args.key?(:thread)
827
+ end
828
+ end
829
+
830
+ # An onclick action (e.g. open a link).
831
+ class OnClick
832
+ include Google::Apis::Core::Hashable
833
+
834
+ # A form action describes the behavior when the form is submitted. For example,
835
+ # an Apps Script can be invoked to handle the form.
836
+ # Corresponds to the JSON property `action`
837
+ # @return [Google::Apis::ChatV1::FormAction]
838
+ attr_accessor :action
839
+
840
+ # A link that opens a new window.
841
+ # Corresponds to the JSON property `openLink`
842
+ # @return [Google::Apis::ChatV1::OpenLink]
843
+ attr_accessor :open_link
844
+
845
+ def initialize(**args)
846
+ update!(**args)
847
+ end
848
+
849
+ # Update properties of this object
850
+ def update!(**args)
851
+ @action = args[:action] if args.key?(:action)
852
+ @open_link = args[:open_link] if args.key?(:open_link)
853
+ end
854
+ end
855
+
856
+ # A link that opens a new window.
857
+ class OpenLink
858
+ include Google::Apis::Core::Hashable
859
+
860
+ # The URL to open.
861
+ # Corresponds to the JSON property `url`
862
+ # @return [String]
863
+ attr_accessor :url
864
+
865
+ def initialize(**args)
866
+ update!(**args)
867
+ end
868
+
869
+ # Update properties of this object
870
+ def update!(**args)
871
+ @url = args[:url] if args.key?(:url)
872
+ end
873
+ end
874
+
875
+ # A section contains a collection of widgets that are rendered (vertically) in
876
+ # the order that they are specified. Across all platforms, cards have a narrow
877
+ # fixed width, so there is currently no need for layout properties (e.g. float).
878
+ class Section
879
+ include Google::Apis::Core::Hashable
880
+
881
+ # The header of the section, text formatted supported.
882
+ # Corresponds to the JSON property `header`
883
+ # @return [String]
884
+ attr_accessor :header
885
+
886
+ # A section must contain at least 1 widget.
887
+ # Corresponds to the JSON property `widgets`
888
+ # @return [Array<Google::Apis::ChatV1::WidgetMarkup>]
889
+ attr_accessor :widgets
890
+
891
+ def initialize(**args)
892
+ update!(**args)
893
+ end
894
+
895
+ # Update properties of this object
896
+ def update!(**args)
897
+ @header = args[:header] if args.key?(:header)
898
+ @widgets = args[:widgets] if args.key?(:widgets)
899
+ end
900
+ end
901
+
902
+ # A Slash Command in Hangouts Chat.
903
+ class SlashCommand
904
+ include Google::Apis::Core::Hashable
905
+
906
+ # The id of the slash command invoked.
907
+ # Corresponds to the JSON property `commandId`
908
+ # @return [Fixnum]
909
+ attr_accessor :command_id
910
+
911
+ def initialize(**args)
912
+ update!(**args)
913
+ end
914
+
915
+ # Update properties of this object
916
+ def update!(**args)
917
+ @command_id = args[:command_id] if args.key?(:command_id)
918
+ end
919
+ end
920
+
921
+ # Annotation metadata for slash commands (/).
922
+ class SlashCommandMetadata
923
+ include Google::Apis::Core::Hashable
924
+
925
+ # A user in Hangouts Chat.
926
+ # Corresponds to the JSON property `bot`
927
+ # @return [Google::Apis::ChatV1::User]
928
+ attr_accessor :bot
929
+
930
+ # The command id of the invoked slash command.
931
+ # Corresponds to the JSON property `commandId`
932
+ # @return [Fixnum]
933
+ attr_accessor :command_id
934
+
935
+ # The name of the invoked slash command.
936
+ # Corresponds to the JSON property `commandName`
937
+ # @return [String]
938
+ attr_accessor :command_name
939
+
940
+ # Indicating whether the slash command is for a dialog.
941
+ # Corresponds to the JSON property `triggersDialog`
942
+ # @return [Boolean]
943
+ attr_accessor :triggers_dialog
944
+ alias_method :triggers_dialog?, :triggers_dialog
945
+
946
+ # The type of slash command.
947
+ # Corresponds to the JSON property `type`
948
+ # @return [String]
949
+ attr_accessor :type
950
+
951
+ def initialize(**args)
952
+ update!(**args)
953
+ end
954
+
955
+ # Update properties of this object
956
+ def update!(**args)
957
+ @bot = args[:bot] if args.key?(:bot)
958
+ @command_id = args[:command_id] if args.key?(:command_id)
959
+ @command_name = args[:command_name] if args.key?(:command_name)
960
+ @triggers_dialog = args[:triggers_dialog] if args.key?(:triggers_dialog)
961
+ @type = args[:type] if args.key?(:type)
962
+ end
963
+ end
964
+
965
+ # A room or DM in Hangouts Chat.
966
+ class Space
967
+ include Google::Apis::Core::Hashable
968
+
969
+ # Output only. The display name (only if the space is a room). Please note that
970
+ # this field might not be populated in direct messages between humans.
971
+ # Corresponds to the JSON property `displayName`
972
+ # @return [String]
973
+ attr_accessor :display_name
974
+
975
+ # Resource name of the space, in the form "spaces/*". Example: spaces/
976
+ # AAAAMpdlehYs
977
+ # Corresponds to the JSON property `name`
978
+ # @return [String]
979
+ attr_accessor :name
980
+
981
+ # Whether the space is a DM between a bot and a single human.
982
+ # Corresponds to the JSON property `singleUserBotDm`
983
+ # @return [Boolean]
984
+ attr_accessor :single_user_bot_dm
985
+ alias_method :single_user_bot_dm?, :single_user_bot_dm
986
+
987
+ # Whether the messages are threaded in this space.
988
+ # Corresponds to the JSON property `threaded`
989
+ # @return [Boolean]
990
+ attr_accessor :threaded
991
+ alias_method :threaded?, :threaded
992
+
993
+ # Output only. The type of a space. This is deprecated. Use `single_user_bot_dm`
994
+ # instead.
995
+ # Corresponds to the JSON property `type`
996
+ # @return [String]
997
+ attr_accessor :type
998
+
999
+ def initialize(**args)
1000
+ update!(**args)
1001
+ end
1002
+
1003
+ # Update properties of this object
1004
+ def update!(**args)
1005
+ @display_name = args[:display_name] if args.key?(:display_name)
1006
+ @name = args[:name] if args.key?(:name)
1007
+ @single_user_bot_dm = args[:single_user_bot_dm] if args.key?(:single_user_bot_dm)
1008
+ @threaded = args[:threaded] if args.key?(:threaded)
1009
+ @type = args[:type] if args.key?(:type)
1010
+ end
1011
+ end
1012
+
1013
+ # A button with text and onclick action.
1014
+ class TextButton
1015
+ include Google::Apis::Core::Hashable
1016
+
1017
+ # An onclick action (e.g. open a link).
1018
+ # Corresponds to the JSON property `onClick`
1019
+ # @return [Google::Apis::ChatV1::OnClick]
1020
+ attr_accessor :on_click
1021
+
1022
+ # The text of the button.
1023
+ # Corresponds to the JSON property `text`
1024
+ # @return [String]
1025
+ attr_accessor :text
1026
+
1027
+ def initialize(**args)
1028
+ update!(**args)
1029
+ end
1030
+
1031
+ # Update properties of this object
1032
+ def update!(**args)
1033
+ @on_click = args[:on_click] if args.key?(:on_click)
1034
+ @text = args[:text] if args.key?(:text)
1035
+ end
1036
+ end
1037
+
1038
+ # A paragraph of text. Formatted text supported.
1039
+ class TextParagraph
1040
+ include Google::Apis::Core::Hashable
1041
+
1042
+ #
1043
+ # Corresponds to the JSON property `text`
1044
+ # @return [String]
1045
+ attr_accessor :text
1046
+
1047
+ def initialize(**args)
1048
+ update!(**args)
1049
+ end
1050
+
1051
+ # Update properties of this object
1052
+ def update!(**args)
1053
+ @text = args[:text] if args.key?(:text)
1054
+ end
1055
+ end
1056
+
1057
+ # A thread in Hangouts Chat.
1058
+ class Thread
1059
+ include Google::Apis::Core::Hashable
1060
+
1061
+ # Resource name, in the form "spaces/*/threads/*". Example: spaces/AAAAMpdlehY/
1062
+ # threads/UMxbHmzDlr4
1063
+ # Corresponds to the JSON property `name`
1064
+ # @return [String]
1065
+ attr_accessor :name
1066
+
1067
+ def initialize(**args)
1068
+ update!(**args)
1069
+ end
1070
+
1071
+ # Update properties of this object
1072
+ def update!(**args)
1073
+ @name = args[:name] if args.key?(:name)
1074
+ end
1075
+ end
1076
+
1077
+ # A user in Hangouts Chat.
1078
+ class User
1079
+ include Google::Apis::Core::Hashable
1080
+
1081
+ # The user's display name.
1082
+ # Corresponds to the JSON property `displayName`
1083
+ # @return [String]
1084
+ attr_accessor :display_name
1085
+
1086
+ # Obfuscated domain information.
1087
+ # Corresponds to the JSON property `domainId`
1088
+ # @return [String]
1089
+ attr_accessor :domain_id
1090
+
1091
+ # True when the user is deleted or the user's proifle is not visible.
1092
+ # Corresponds to the JSON property `isAnonymous`
1093
+ # @return [Boolean]
1094
+ attr_accessor :is_anonymous
1095
+ alias_method :is_anonymous?, :is_anonymous
1096
+
1097
+ # Resource name, in the format "users/*".
1098
+ # Corresponds to the JSON property `name`
1099
+ # @return [String]
1100
+ attr_accessor :name
1101
+
1102
+ # User type.
1103
+ # Corresponds to the JSON property `type`
1104
+ # @return [String]
1105
+ attr_accessor :type
1106
+
1107
+ def initialize(**args)
1108
+ update!(**args)
1109
+ end
1110
+
1111
+ # Update properties of this object
1112
+ def update!(**args)
1113
+ @display_name = args[:display_name] if args.key?(:display_name)
1114
+ @domain_id = args[:domain_id] if args.key?(:domain_id)
1115
+ @is_anonymous = args[:is_anonymous] if args.key?(:is_anonymous)
1116
+ @name = args[:name] if args.key?(:name)
1117
+ @type = args[:type] if args.key?(:type)
1118
+ end
1119
+ end
1120
+
1121
+ # Annotation metadata for user mentions (@).
1122
+ class UserMentionMetadata
1123
+ include Google::Apis::Core::Hashable
1124
+
1125
+ # The type of user mention.
1126
+ # Corresponds to the JSON property `type`
1127
+ # @return [String]
1128
+ attr_accessor :type
1129
+
1130
+ # A user in Hangouts Chat.
1131
+ # Corresponds to the JSON property `user`
1132
+ # @return [Google::Apis::ChatV1::User]
1133
+ attr_accessor :user
1134
+
1135
+ def initialize(**args)
1136
+ update!(**args)
1137
+ end
1138
+
1139
+ # Update properties of this object
1140
+ def update!(**args)
1141
+ @type = args[:type] if args.key?(:type)
1142
+ @user = args[:user] if args.key?(:user)
1143
+ end
1144
+ end
1145
+
1146
+ # A widget is a UI element that presents texts, images, etc.
1147
+ class WidgetMarkup
1148
+ include Google::Apis::Core::Hashable
1149
+
1150
+ # A list of buttons. Buttons is also oneof data and only one of these fields
1151
+ # should be set.
1152
+ # Corresponds to the JSON property `buttons`
1153
+ # @return [Array<Google::Apis::ChatV1::Button>]
1154
+ attr_accessor :buttons
1155
+
1156
+ # An image that is specified by a URL and can have an onclick action.
1157
+ # Corresponds to the JSON property `image`
1158
+ # @return [Google::Apis::ChatV1::Image]
1159
+ attr_accessor :image
1160
+
1161
+ # A UI element contains a key (label) and a value (content). And this element
1162
+ # may also contain some actions such as onclick button.
1163
+ # Corresponds to the JSON property `keyValue`
1164
+ # @return [Google::Apis::ChatV1::KeyValue]
1165
+ attr_accessor :key_value
1166
+
1167
+ # A paragraph of text. Formatted text supported.
1168
+ # Corresponds to the JSON property `textParagraph`
1169
+ # @return [Google::Apis::ChatV1::TextParagraph]
1170
+ attr_accessor :text_paragraph
1171
+
1172
+ def initialize(**args)
1173
+ update!(**args)
1174
+ end
1175
+
1176
+ # Update properties of this object
1177
+ def update!(**args)
1178
+ @buttons = args[:buttons] if args.key?(:buttons)
1179
+ @image = args[:image] if args.key?(:image)
1180
+ @key_value = args[:key_value] if args.key?(:key_value)
1181
+ @text_paragraph = args[:text_paragraph] if args.key?(:text_paragraph)
1182
+ end
1183
+ end
1184
+ end
1185
+ end
1186
+ end