google-apis-cloudiot_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-cloudiot_v1.rb +15 -0
- data/lib/google/apis/cloudiot_v1.rb +40 -0
- data/lib/google/apis/cloudiot_v1/classes.rb +1251 -0
- data/lib/google/apis/cloudiot_v1/gem_version.rb +28 -0
- data/lib/google/apis/cloudiot_v1/representations.rb +553 -0
- data/lib/google/apis/cloudiot_v1/service.rb +967 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e187d993d06f7a910db68ae0aee4c3a89f800f69345d02b356678497dade8f74
|
4
|
+
data.tar.gz: 66bfc8b4e0b58ea1cbed54b4a7ab1ecd12a3c8d65cafa7f999e3affe855408e6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eddfd8af2e08793ec0e7a57f7a03a8a5eb00330c1dba66ca5b009d3642293acca61edf3b7cc8912f8da6ca146b4db7644afd8f829d2b859af6ec2675596146fb
|
7
|
+
data.tar.gz: 3a7474393c5cb94be53d69a4d837d27d31b50080b5707d21c7b927ed878ef2790726fa423d2d9ea2505c543492c203b002f88ec66e295e3a0c7c907f57a5ba02
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-cloudiot_v1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/cloudiot_v1/*.rb
|
9
|
+
lib/google/apis/cloudiot_v1.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -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.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1 of the Cloud IoT API
|
2
|
+
|
3
|
+
This is a simple client library for version V1 of the Cloud IoT 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/cloudiot.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-cloudiot_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-cloudiot_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/cloudiot_v1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::CloudiotV1::CloudIotService.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 Cloudiot service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Cloud IoT API, see the {Google::Apis::CloudiotV1::CloudIotService 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-cloudiot_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://cloud.google.com/iot) 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/cloudiot_v1"
|
@@ -0,0 +1,40 @@
|
|
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/cloudiot_v1/service.rb'
|
16
|
+
require 'google/apis/cloudiot_v1/classes.rb'
|
17
|
+
require 'google/apis/cloudiot_v1/representations.rb'
|
18
|
+
require 'google/apis/cloudiot_v1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Cloud IoT API
|
23
|
+
#
|
24
|
+
# Registers and manages IoT (Internet of Things) devices that connect to the
|
25
|
+
# Google Cloud Platform.
|
26
|
+
#
|
27
|
+
# @see https://cloud.google.com/iot
|
28
|
+
module CloudiotV1
|
29
|
+
# Version of the Cloud IoT API this client connects to.
|
30
|
+
# This is NOT the gem version.
|
31
|
+
VERSION = 'V1'
|
32
|
+
|
33
|
+
# View and manage your data across Google Cloud Platform services
|
34
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
35
|
+
|
36
|
+
# Register and manage devices in the Google Cloud IoT service
|
37
|
+
AUTH_CLOUDIOT = 'https://www.googleapis.com/auth/cloudiot'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,1251 @@
|
|
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 CloudiotV1
|
24
|
+
|
25
|
+
# Request for `BindDeviceToGateway`.
|
26
|
+
class BindDeviceToGatewayRequest
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Required. The device to associate with the specified gateway. The value of `
|
30
|
+
# device_id` can be either the device numeric ID or the user-defined device
|
31
|
+
# identifier.
|
32
|
+
# Corresponds to the JSON property `deviceId`
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :device_id
|
35
|
+
|
36
|
+
# Required. The value of `gateway_id` can be either the device numeric ID or the
|
37
|
+
# user-defined device identifier.
|
38
|
+
# Corresponds to the JSON property `gatewayId`
|
39
|
+
# @return [String]
|
40
|
+
attr_accessor :gateway_id
|
41
|
+
|
42
|
+
def initialize(**args)
|
43
|
+
update!(**args)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Update properties of this object
|
47
|
+
def update!(**args)
|
48
|
+
@device_id = args[:device_id] if args.key?(:device_id)
|
49
|
+
@gateway_id = args[:gateway_id] if args.key?(:gateway_id)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Response for `BindDeviceToGateway`.
|
54
|
+
class BindDeviceToGatewayResponse
|
55
|
+
include Google::Apis::Core::Hashable
|
56
|
+
|
57
|
+
def initialize(**args)
|
58
|
+
update!(**args)
|
59
|
+
end
|
60
|
+
|
61
|
+
# Update properties of this object
|
62
|
+
def update!(**args)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Associates `members` with a `role`.
|
67
|
+
class Binding
|
68
|
+
include Google::Apis::Core::Hashable
|
69
|
+
|
70
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
71
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
72
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
73
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
74
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
75
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
76
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
77
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
78
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
79
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
80
|
+
# string" description: "Create a notification string with a timestamp."
|
81
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
82
|
+
# exact variables and functions that may be referenced within an expression are
|
83
|
+
# determined by the service that evaluates it. See the service documentation for
|
84
|
+
# additional information.
|
85
|
+
# Corresponds to the JSON property `condition`
|
86
|
+
# @return [Google::Apis::CloudiotV1::Expr]
|
87
|
+
attr_accessor :condition
|
88
|
+
|
89
|
+
# Specifies the identities requesting access for a Cloud Platform resource. `
|
90
|
+
# members` can have the following values: * `allUsers`: A special identifier
|
91
|
+
# that represents anyone who is on the internet; with or without a Google
|
92
|
+
# account. * `allAuthenticatedUsers`: A special identifier that represents
|
93
|
+
# anyone who is authenticated with a Google account or a service account. * `
|
94
|
+
# user:`emailid``: An email address that represents a specific Google account.
|
95
|
+
# For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
|
96
|
+
# address that represents a service account. For example, `my-other-app@appspot.
|
97
|
+
# gserviceaccount.com`. * `group:`emailid``: An email address that represents a
|
98
|
+
# Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
|
99
|
+
# `uniqueid``: An email address (plus unique identifier) representing a user
|
100
|
+
# that has been recently deleted. For example, `alice@example.com?uid=
|
101
|
+
# 123456789012345678901`. If the user is recovered, this value reverts to `user:`
|
102
|
+
# emailid`` and the recovered user retains the role in the binding. * `deleted:
|
103
|
+
# serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
|
104
|
+
# identifier) representing a service account that has been recently deleted. For
|
105
|
+
# example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
|
106
|
+
# If the service account is undeleted, this value reverts to `serviceAccount:`
|
107
|
+
# emailid`` and the undeleted service account retains the role in the binding. *
|
108
|
+
# `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
|
109
|
+
# identifier) representing a Google group that has been recently deleted. For
|
110
|
+
# example, `admins@example.com?uid=123456789012345678901`. If the group is
|
111
|
+
# recovered, this value reverts to `group:`emailid`` and the recovered group
|
112
|
+
# retains the role in the binding. * `domain:`domain``: The G Suite domain (
|
113
|
+
# primary) that represents all the users of that domain. For example, `google.
|
114
|
+
# com` or `example.com`.
|
115
|
+
# Corresponds to the JSON property `members`
|
116
|
+
# @return [Array<String>]
|
117
|
+
attr_accessor :members
|
118
|
+
|
119
|
+
# Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
|
120
|
+
# , or `roles/owner`.
|
121
|
+
# Corresponds to the JSON property `role`
|
122
|
+
# @return [String]
|
123
|
+
attr_accessor :role
|
124
|
+
|
125
|
+
def initialize(**args)
|
126
|
+
update!(**args)
|
127
|
+
end
|
128
|
+
|
129
|
+
# Update properties of this object
|
130
|
+
def update!(**args)
|
131
|
+
@condition = args[:condition] if args.key?(:condition)
|
132
|
+
@members = args[:members] if args.key?(:members)
|
133
|
+
@role = args[:role] if args.key?(:role)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
# The device resource.
|
138
|
+
class Device
|
139
|
+
include Google::Apis::Core::Hashable
|
140
|
+
|
141
|
+
# If a device is blocked, connections or requests from this device will fail.
|
142
|
+
# Can be used to temporarily prevent the device from connecting if, for example,
|
143
|
+
# the sensor is generating bad data and needs maintenance.
|
144
|
+
# Corresponds to the JSON property `blocked`
|
145
|
+
# @return [Boolean]
|
146
|
+
attr_accessor :blocked
|
147
|
+
alias_method :blocked?, :blocked
|
148
|
+
|
149
|
+
# The device configuration. Eventually delivered to devices.
|
150
|
+
# Corresponds to the JSON property `config`
|
151
|
+
# @return [Google::Apis::CloudiotV1::DeviceConfig]
|
152
|
+
attr_accessor :config
|
153
|
+
|
154
|
+
# The credentials used to authenticate this device. To allow credential rotation
|
155
|
+
# without interruption, multiple device credentials can be bound to this device.
|
156
|
+
# No more than 3 credentials can be bound to a single device at a time. When new
|
157
|
+
# credentials are added to a device, they are verified against the registry
|
158
|
+
# credentials. For details, see the description of the `DeviceRegistry.
|
159
|
+
# credentials` field.
|
160
|
+
# Corresponds to the JSON property `credentials`
|
161
|
+
# @return [Array<Google::Apis::CloudiotV1::DeviceCredential>]
|
162
|
+
attr_accessor :credentials
|
163
|
+
|
164
|
+
# Gateway-related configuration and state.
|
165
|
+
# Corresponds to the JSON property `gatewayConfig`
|
166
|
+
# @return [Google::Apis::CloudiotV1::GatewayConfig]
|
167
|
+
attr_accessor :gateway_config
|
168
|
+
|
169
|
+
# The user-defined device identifier. The device ID must be unique within a
|
170
|
+
# device registry.
|
171
|
+
# Corresponds to the JSON property `id`
|
172
|
+
# @return [String]
|
173
|
+
attr_accessor :id
|
174
|
+
|
175
|
+
# [Output only] The last time a cloud-to-device config version acknowledgment
|
176
|
+
# was received from the device. This field is only for configurations sent
|
177
|
+
# through MQTT.
|
178
|
+
# Corresponds to the JSON property `lastConfigAckTime`
|
179
|
+
# @return [String]
|
180
|
+
attr_accessor :last_config_ack_time
|
181
|
+
|
182
|
+
# [Output only] The last time a cloud-to-device config version was sent to the
|
183
|
+
# device.
|
184
|
+
# Corresponds to the JSON property `lastConfigSendTime`
|
185
|
+
# @return [String]
|
186
|
+
attr_accessor :last_config_send_time
|
187
|
+
|
188
|
+
# The `Status` type defines a logical error model that is suitable for different
|
189
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
190
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
191
|
+
# data: error code, error message, and error details. You can find out more
|
192
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
193
|
+
# //cloud.google.com/apis/design/errors).
|
194
|
+
# Corresponds to the JSON property `lastErrorStatus`
|
195
|
+
# @return [Google::Apis::CloudiotV1::Status]
|
196
|
+
attr_accessor :last_error_status
|
197
|
+
|
198
|
+
# [Output only] The time the most recent error occurred, such as a failure to
|
199
|
+
# publish to Cloud Pub/Sub. This field is the timestamp of 'last_error_status'.
|
200
|
+
# Corresponds to the JSON property `lastErrorTime`
|
201
|
+
# @return [String]
|
202
|
+
attr_accessor :last_error_time
|
203
|
+
|
204
|
+
# [Output only] The last time a telemetry event was received. Timestamps are
|
205
|
+
# periodically collected and written to storage; they may be stale by a few
|
206
|
+
# minutes.
|
207
|
+
# Corresponds to the JSON property `lastEventTime`
|
208
|
+
# @return [String]
|
209
|
+
attr_accessor :last_event_time
|
210
|
+
|
211
|
+
# [Output only] The last time an MQTT `PINGREQ` was received. This field applies
|
212
|
+
# only to devices connecting through MQTT. MQTT clients usually only send `
|
213
|
+
# PINGREQ` messages if the connection is idle, and no other messages have been
|
214
|
+
# sent. Timestamps are periodically collected and written to storage; they may
|
215
|
+
# be stale by a few minutes.
|
216
|
+
# Corresponds to the JSON property `lastHeartbeatTime`
|
217
|
+
# @return [String]
|
218
|
+
attr_accessor :last_heartbeat_time
|
219
|
+
|
220
|
+
# [Output only] The last time a state event was received. Timestamps are
|
221
|
+
# periodically collected and written to storage; they may be stale by a few
|
222
|
+
# minutes.
|
223
|
+
# Corresponds to the JSON property `lastStateTime`
|
224
|
+
# @return [String]
|
225
|
+
attr_accessor :last_state_time
|
226
|
+
|
227
|
+
# **Beta Feature** The logging verbosity for device activity. If unspecified,
|
228
|
+
# DeviceRegistry.log_level will be used.
|
229
|
+
# Corresponds to the JSON property `logLevel`
|
230
|
+
# @return [String]
|
231
|
+
attr_accessor :log_level
|
232
|
+
|
233
|
+
# The metadata key-value pairs assigned to the device. This metadata is not
|
234
|
+
# interpreted or indexed by Cloud IoT Core. It can be used to add contextual
|
235
|
+
# information for the device. Keys must conform to the regular expression a-zA-Z+
|
236
|
+
# and be less than 128 bytes in length. Values are free-form strings. Each
|
237
|
+
# value must be less than or equal to 32 KB in size. The total size of all keys
|
238
|
+
# and values must be less than 256 KB, and the maximum number of key-value pairs
|
239
|
+
# is 500.
|
240
|
+
# Corresponds to the JSON property `metadata`
|
241
|
+
# @return [Hash<String,String>]
|
242
|
+
attr_accessor :metadata
|
243
|
+
|
244
|
+
# The resource path name. For example, `projects/p1/locations/us-central1/
|
245
|
+
# registries/registry0/devices/dev0` or `projects/p1/locations/us-central1/
|
246
|
+
# registries/registry0/devices/`num_id``. When `name` is populated as a response
|
247
|
+
# from the service, it always ends in the device numeric ID.
|
248
|
+
# Corresponds to the JSON property `name`
|
249
|
+
# @return [String]
|
250
|
+
attr_accessor :name
|
251
|
+
|
252
|
+
# [Output only] A server-defined unique numeric ID for the device. This is a
|
253
|
+
# more compact way to identify devices, and it is globally unique.
|
254
|
+
# Corresponds to the JSON property `numId`
|
255
|
+
# @return [Fixnum]
|
256
|
+
attr_accessor :num_id
|
257
|
+
|
258
|
+
# The device state, as reported by the device.
|
259
|
+
# Corresponds to the JSON property `state`
|
260
|
+
# @return [Google::Apis::CloudiotV1::DeviceState]
|
261
|
+
attr_accessor :state
|
262
|
+
|
263
|
+
def initialize(**args)
|
264
|
+
update!(**args)
|
265
|
+
end
|
266
|
+
|
267
|
+
# Update properties of this object
|
268
|
+
def update!(**args)
|
269
|
+
@blocked = args[:blocked] if args.key?(:blocked)
|
270
|
+
@config = args[:config] if args.key?(:config)
|
271
|
+
@credentials = args[:credentials] if args.key?(:credentials)
|
272
|
+
@gateway_config = args[:gateway_config] if args.key?(:gateway_config)
|
273
|
+
@id = args[:id] if args.key?(:id)
|
274
|
+
@last_config_ack_time = args[:last_config_ack_time] if args.key?(:last_config_ack_time)
|
275
|
+
@last_config_send_time = args[:last_config_send_time] if args.key?(:last_config_send_time)
|
276
|
+
@last_error_status = args[:last_error_status] if args.key?(:last_error_status)
|
277
|
+
@last_error_time = args[:last_error_time] if args.key?(:last_error_time)
|
278
|
+
@last_event_time = args[:last_event_time] if args.key?(:last_event_time)
|
279
|
+
@last_heartbeat_time = args[:last_heartbeat_time] if args.key?(:last_heartbeat_time)
|
280
|
+
@last_state_time = args[:last_state_time] if args.key?(:last_state_time)
|
281
|
+
@log_level = args[:log_level] if args.key?(:log_level)
|
282
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
283
|
+
@name = args[:name] if args.key?(:name)
|
284
|
+
@num_id = args[:num_id] if args.key?(:num_id)
|
285
|
+
@state = args[:state] if args.key?(:state)
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
# The device configuration. Eventually delivered to devices.
|
290
|
+
class DeviceConfig
|
291
|
+
include Google::Apis::Core::Hashable
|
292
|
+
|
293
|
+
# The device configuration data.
|
294
|
+
# Corresponds to the JSON property `binaryData`
|
295
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
296
|
+
# @return [String]
|
297
|
+
attr_accessor :binary_data
|
298
|
+
|
299
|
+
# [Output only] The time at which this configuration version was updated in
|
300
|
+
# Cloud IoT Core. This timestamp is set by the server.
|
301
|
+
# Corresponds to the JSON property `cloudUpdateTime`
|
302
|
+
# @return [String]
|
303
|
+
attr_accessor :cloud_update_time
|
304
|
+
|
305
|
+
# [Output only] The time at which Cloud IoT Core received the acknowledgment
|
306
|
+
# from the device, indicating that the device has received this configuration
|
307
|
+
# version. If this field is not present, the device has not yet acknowledged
|
308
|
+
# that it received this version. Note that when the config was sent to the
|
309
|
+
# device, many config versions may have been available in Cloud IoT Core while
|
310
|
+
# the device was disconnected, and on connection, only the latest version is
|
311
|
+
# sent to the device. Some versions may never be sent to the device, and
|
312
|
+
# therefore are never acknowledged. This timestamp is set by Cloud IoT Core.
|
313
|
+
# Corresponds to the JSON property `deviceAckTime`
|
314
|
+
# @return [String]
|
315
|
+
attr_accessor :device_ack_time
|
316
|
+
|
317
|
+
# [Output only] The version of this update. The version number is assigned by
|
318
|
+
# the server, and is always greater than 0 after device creation. The version
|
319
|
+
# must be 0 on the `CreateDevice` request if a `config` is specified; the
|
320
|
+
# response of `CreateDevice` will always have a value of 1.
|
321
|
+
# Corresponds to the JSON property `version`
|
322
|
+
# @return [Fixnum]
|
323
|
+
attr_accessor :version
|
324
|
+
|
325
|
+
def initialize(**args)
|
326
|
+
update!(**args)
|
327
|
+
end
|
328
|
+
|
329
|
+
# Update properties of this object
|
330
|
+
def update!(**args)
|
331
|
+
@binary_data = args[:binary_data] if args.key?(:binary_data)
|
332
|
+
@cloud_update_time = args[:cloud_update_time] if args.key?(:cloud_update_time)
|
333
|
+
@device_ack_time = args[:device_ack_time] if args.key?(:device_ack_time)
|
334
|
+
@version = args[:version] if args.key?(:version)
|
335
|
+
end
|
336
|
+
end
|
337
|
+
|
338
|
+
# A server-stored device credential used for authentication.
|
339
|
+
class DeviceCredential
|
340
|
+
include Google::Apis::Core::Hashable
|
341
|
+
|
342
|
+
# [Optional] The time at which this credential becomes invalid. This credential
|
343
|
+
# will be ignored for new client authentication requests after this timestamp;
|
344
|
+
# however, it will not be automatically deleted.
|
345
|
+
# Corresponds to the JSON property `expirationTime`
|
346
|
+
# @return [String]
|
347
|
+
attr_accessor :expiration_time
|
348
|
+
|
349
|
+
# A public key format and data.
|
350
|
+
# Corresponds to the JSON property `publicKey`
|
351
|
+
# @return [Google::Apis::CloudiotV1::PublicKeyCredential]
|
352
|
+
attr_accessor :public_key
|
353
|
+
|
354
|
+
def initialize(**args)
|
355
|
+
update!(**args)
|
356
|
+
end
|
357
|
+
|
358
|
+
# Update properties of this object
|
359
|
+
def update!(**args)
|
360
|
+
@expiration_time = args[:expiration_time] if args.key?(:expiration_time)
|
361
|
+
@public_key = args[:public_key] if args.key?(:public_key)
|
362
|
+
end
|
363
|
+
end
|
364
|
+
|
365
|
+
# A container for a group of devices.
|
366
|
+
class DeviceRegistry
|
367
|
+
include Google::Apis::Core::Hashable
|
368
|
+
|
369
|
+
# The credentials used to verify the device credentials. No more than 10
|
370
|
+
# credentials can be bound to a single registry at a time. The verification
|
371
|
+
# process occurs at the time of device creation or update. If this field is
|
372
|
+
# empty, no verification is performed. Otherwise, the credentials of a newly
|
373
|
+
# created device or added credentials of an updated device should be signed with
|
374
|
+
# one of these registry credentials. Note, however, that existing devices will
|
375
|
+
# never be affected by modifications to this list of credentials: after a device
|
376
|
+
# has been successfully created in a registry, it should be able to connect even
|
377
|
+
# if its registry credentials are revoked, deleted, or modified.
|
378
|
+
# Corresponds to the JSON property `credentials`
|
379
|
+
# @return [Array<Google::Apis::CloudiotV1::RegistryCredential>]
|
380
|
+
attr_accessor :credentials
|
381
|
+
|
382
|
+
# The configuration for notification of telemetry events received from the
|
383
|
+
# device. All telemetry events that were successfully published by the device
|
384
|
+
# and acknowledged by Cloud IoT Core are guaranteed to be delivered to Cloud Pub/
|
385
|
+
# Sub. If multiple configurations match a message, only the first matching
|
386
|
+
# configuration is used. If you try to publish a device telemetry event using
|
387
|
+
# MQTT without specifying a Cloud Pub/Sub topic for the device's registry, the
|
388
|
+
# connection closes automatically. If you try to do so using an HTTP connection,
|
389
|
+
# an error is returned. Up to 10 configurations may be provided.
|
390
|
+
# Corresponds to the JSON property `eventNotificationConfigs`
|
391
|
+
# @return [Array<Google::Apis::CloudiotV1::EventNotificationConfig>]
|
392
|
+
attr_accessor :event_notification_configs
|
393
|
+
|
394
|
+
# The configuration of the HTTP bridge for a device registry.
|
395
|
+
# Corresponds to the JSON property `httpConfig`
|
396
|
+
# @return [Google::Apis::CloudiotV1::HttpConfig]
|
397
|
+
attr_accessor :http_config
|
398
|
+
|
399
|
+
# The identifier of this device registry. For example, `myRegistry`.
|
400
|
+
# Corresponds to the JSON property `id`
|
401
|
+
# @return [String]
|
402
|
+
attr_accessor :id
|
403
|
+
|
404
|
+
# **Beta Feature** The default logging verbosity for activity from devices in
|
405
|
+
# this registry. The verbosity level can be overridden by Device.log_level.
|
406
|
+
# Corresponds to the JSON property `logLevel`
|
407
|
+
# @return [String]
|
408
|
+
attr_accessor :log_level
|
409
|
+
|
410
|
+
# The configuration of MQTT for a device registry.
|
411
|
+
# Corresponds to the JSON property `mqttConfig`
|
412
|
+
# @return [Google::Apis::CloudiotV1::MqttConfig]
|
413
|
+
attr_accessor :mqtt_config
|
414
|
+
|
415
|
+
# The resource path name. For example, `projects/example-project/locations/us-
|
416
|
+
# central1/registries/my-registry`.
|
417
|
+
# Corresponds to the JSON property `name`
|
418
|
+
# @return [String]
|
419
|
+
attr_accessor :name
|
420
|
+
|
421
|
+
# The configuration for notification of new states received from the device.
|
422
|
+
# Corresponds to the JSON property `stateNotificationConfig`
|
423
|
+
# @return [Google::Apis::CloudiotV1::StateNotificationConfig]
|
424
|
+
attr_accessor :state_notification_config
|
425
|
+
|
426
|
+
def initialize(**args)
|
427
|
+
update!(**args)
|
428
|
+
end
|
429
|
+
|
430
|
+
# Update properties of this object
|
431
|
+
def update!(**args)
|
432
|
+
@credentials = args[:credentials] if args.key?(:credentials)
|
433
|
+
@event_notification_configs = args[:event_notification_configs] if args.key?(:event_notification_configs)
|
434
|
+
@http_config = args[:http_config] if args.key?(:http_config)
|
435
|
+
@id = args[:id] if args.key?(:id)
|
436
|
+
@log_level = args[:log_level] if args.key?(:log_level)
|
437
|
+
@mqtt_config = args[:mqtt_config] if args.key?(:mqtt_config)
|
438
|
+
@name = args[:name] if args.key?(:name)
|
439
|
+
@state_notification_config = args[:state_notification_config] if args.key?(:state_notification_config)
|
440
|
+
end
|
441
|
+
end
|
442
|
+
|
443
|
+
# The device state, as reported by the device.
|
444
|
+
class DeviceState
|
445
|
+
include Google::Apis::Core::Hashable
|
446
|
+
|
447
|
+
# The device state data.
|
448
|
+
# Corresponds to the JSON property `binaryData`
|
449
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
450
|
+
# @return [String]
|
451
|
+
attr_accessor :binary_data
|
452
|
+
|
453
|
+
# [Output only] The time at which this state version was updated in Cloud IoT
|
454
|
+
# Core.
|
455
|
+
# Corresponds to the JSON property `updateTime`
|
456
|
+
# @return [String]
|
457
|
+
attr_accessor :update_time
|
458
|
+
|
459
|
+
def initialize(**args)
|
460
|
+
update!(**args)
|
461
|
+
end
|
462
|
+
|
463
|
+
# Update properties of this object
|
464
|
+
def update!(**args)
|
465
|
+
@binary_data = args[:binary_data] if args.key?(:binary_data)
|
466
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
467
|
+
end
|
468
|
+
end
|
469
|
+
|
470
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
471
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
472
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
473
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
474
|
+
# `Empty` is empty JSON object ````.
|
475
|
+
class Empty
|
476
|
+
include Google::Apis::Core::Hashable
|
477
|
+
|
478
|
+
def initialize(**args)
|
479
|
+
update!(**args)
|
480
|
+
end
|
481
|
+
|
482
|
+
# Update properties of this object
|
483
|
+
def update!(**args)
|
484
|
+
end
|
485
|
+
end
|
486
|
+
|
487
|
+
# The configuration for forwarding telemetry events.
|
488
|
+
class EventNotificationConfig
|
489
|
+
include Google::Apis::Core::Hashable
|
490
|
+
|
491
|
+
# A Cloud Pub/Sub topic name. For example, `projects/myProject/topics/
|
492
|
+
# deviceEvents`.
|
493
|
+
# Corresponds to the JSON property `pubsubTopicName`
|
494
|
+
# @return [String]
|
495
|
+
attr_accessor :pubsub_topic_name
|
496
|
+
|
497
|
+
# If the subfolder name matches this string exactly, this configuration will be
|
498
|
+
# used. The string must not include the leading '/' character. If empty, all
|
499
|
+
# strings are matched. This field is used only for telemetry events; subfolders
|
500
|
+
# are not supported for state changes.
|
501
|
+
# Corresponds to the JSON property `subfolderMatches`
|
502
|
+
# @return [String]
|
503
|
+
attr_accessor :subfolder_matches
|
504
|
+
|
505
|
+
def initialize(**args)
|
506
|
+
update!(**args)
|
507
|
+
end
|
508
|
+
|
509
|
+
# Update properties of this object
|
510
|
+
def update!(**args)
|
511
|
+
@pubsub_topic_name = args[:pubsub_topic_name] if args.key?(:pubsub_topic_name)
|
512
|
+
@subfolder_matches = args[:subfolder_matches] if args.key?(:subfolder_matches)
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
517
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
518
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
519
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
520
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
521
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
522
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
523
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
524
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
525
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
526
|
+
# string" description: "Create a notification string with a timestamp."
|
527
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
528
|
+
# exact variables and functions that may be referenced within an expression are
|
529
|
+
# determined by the service that evaluates it. See the service documentation for
|
530
|
+
# additional information.
|
531
|
+
class Expr
|
532
|
+
include Google::Apis::Core::Hashable
|
533
|
+
|
534
|
+
# Optional. Description of the expression. This is a longer text which describes
|
535
|
+
# the expression, e.g. when hovered over it in a UI.
|
536
|
+
# Corresponds to the JSON property `description`
|
537
|
+
# @return [String]
|
538
|
+
attr_accessor :description
|
539
|
+
|
540
|
+
# Textual representation of an expression in Common Expression Language syntax.
|
541
|
+
# Corresponds to the JSON property `expression`
|
542
|
+
# @return [String]
|
543
|
+
attr_accessor :expression
|
544
|
+
|
545
|
+
# Optional. String indicating the location of the expression for error reporting,
|
546
|
+
# e.g. a file name and a position in the file.
|
547
|
+
# Corresponds to the JSON property `location`
|
548
|
+
# @return [String]
|
549
|
+
attr_accessor :location
|
550
|
+
|
551
|
+
# Optional. Title for the expression, i.e. a short string describing its purpose.
|
552
|
+
# This can be used e.g. in UIs which allow to enter the expression.
|
553
|
+
# Corresponds to the JSON property `title`
|
554
|
+
# @return [String]
|
555
|
+
attr_accessor :title
|
556
|
+
|
557
|
+
def initialize(**args)
|
558
|
+
update!(**args)
|
559
|
+
end
|
560
|
+
|
561
|
+
# Update properties of this object
|
562
|
+
def update!(**args)
|
563
|
+
@description = args[:description] if args.key?(:description)
|
564
|
+
@expression = args[:expression] if args.key?(:expression)
|
565
|
+
@location = args[:location] if args.key?(:location)
|
566
|
+
@title = args[:title] if args.key?(:title)
|
567
|
+
end
|
568
|
+
end
|
569
|
+
|
570
|
+
# Gateway-related configuration and state.
|
571
|
+
class GatewayConfig
|
572
|
+
include Google::Apis::Core::Hashable
|
573
|
+
|
574
|
+
# Indicates how to authorize and/or authenticate devices to access the gateway.
|
575
|
+
# Corresponds to the JSON property `gatewayAuthMethod`
|
576
|
+
# @return [String]
|
577
|
+
attr_accessor :gateway_auth_method
|
578
|
+
|
579
|
+
# Indicates whether the device is a gateway.
|
580
|
+
# Corresponds to the JSON property `gatewayType`
|
581
|
+
# @return [String]
|
582
|
+
attr_accessor :gateway_type
|
583
|
+
|
584
|
+
# [Output only] The ID of the gateway the device accessed most recently.
|
585
|
+
# Corresponds to the JSON property `lastAccessedGatewayId`
|
586
|
+
# @return [String]
|
587
|
+
attr_accessor :last_accessed_gateway_id
|
588
|
+
|
589
|
+
# [Output only] The most recent time at which the device accessed the gateway
|
590
|
+
# specified in `last_accessed_gateway`.
|
591
|
+
# Corresponds to the JSON property `lastAccessedGatewayTime`
|
592
|
+
# @return [String]
|
593
|
+
attr_accessor :last_accessed_gateway_time
|
594
|
+
|
595
|
+
def initialize(**args)
|
596
|
+
update!(**args)
|
597
|
+
end
|
598
|
+
|
599
|
+
# Update properties of this object
|
600
|
+
def update!(**args)
|
601
|
+
@gateway_auth_method = args[:gateway_auth_method] if args.key?(:gateway_auth_method)
|
602
|
+
@gateway_type = args[:gateway_type] if args.key?(:gateway_type)
|
603
|
+
@last_accessed_gateway_id = args[:last_accessed_gateway_id] if args.key?(:last_accessed_gateway_id)
|
604
|
+
@last_accessed_gateway_time = args[:last_accessed_gateway_time] if args.key?(:last_accessed_gateway_time)
|
605
|
+
end
|
606
|
+
end
|
607
|
+
|
608
|
+
# Request message for `GetIamPolicy` method.
|
609
|
+
class GetIamPolicyRequest
|
610
|
+
include Google::Apis::Core::Hashable
|
611
|
+
|
612
|
+
# Encapsulates settings provided to GetIamPolicy.
|
613
|
+
# Corresponds to the JSON property `options`
|
614
|
+
# @return [Google::Apis::CloudiotV1::GetPolicyOptions]
|
615
|
+
attr_accessor :options
|
616
|
+
|
617
|
+
def initialize(**args)
|
618
|
+
update!(**args)
|
619
|
+
end
|
620
|
+
|
621
|
+
# Update properties of this object
|
622
|
+
def update!(**args)
|
623
|
+
@options = args[:options] if args.key?(:options)
|
624
|
+
end
|
625
|
+
end
|
626
|
+
|
627
|
+
# Encapsulates settings provided to GetIamPolicy.
|
628
|
+
class GetPolicyOptions
|
629
|
+
include Google::Apis::Core::Hashable
|
630
|
+
|
631
|
+
# Optional. The policy format version to be returned. Valid values are 0, 1, and
|
632
|
+
# 3. Requests specifying an invalid value will be rejected. Requests for
|
633
|
+
# policies with any conditional bindings must specify version 3. Policies
|
634
|
+
# without any conditional bindings may specify any valid value or leave the
|
635
|
+
# field unset. To learn which resources support conditions in their IAM policies,
|
636
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
637
|
+
# resource-policies).
|
638
|
+
# Corresponds to the JSON property `requestedPolicyVersion`
|
639
|
+
# @return [Fixnum]
|
640
|
+
attr_accessor :requested_policy_version
|
641
|
+
|
642
|
+
def initialize(**args)
|
643
|
+
update!(**args)
|
644
|
+
end
|
645
|
+
|
646
|
+
# Update properties of this object
|
647
|
+
def update!(**args)
|
648
|
+
@requested_policy_version = args[:requested_policy_version] if args.key?(:requested_policy_version)
|
649
|
+
end
|
650
|
+
end
|
651
|
+
|
652
|
+
# The configuration of the HTTP bridge for a device registry.
|
653
|
+
class HttpConfig
|
654
|
+
include Google::Apis::Core::Hashable
|
655
|
+
|
656
|
+
# If enabled, allows devices to use DeviceService via the HTTP protocol.
|
657
|
+
# Otherwise, any requests to DeviceService will fail for this registry.
|
658
|
+
# Corresponds to the JSON property `httpEnabledState`
|
659
|
+
# @return [String]
|
660
|
+
attr_accessor :http_enabled_state
|
661
|
+
|
662
|
+
def initialize(**args)
|
663
|
+
update!(**args)
|
664
|
+
end
|
665
|
+
|
666
|
+
# Update properties of this object
|
667
|
+
def update!(**args)
|
668
|
+
@http_enabled_state = args[:http_enabled_state] if args.key?(:http_enabled_state)
|
669
|
+
end
|
670
|
+
end
|
671
|
+
|
672
|
+
# Response for `ListDeviceConfigVersions`.
|
673
|
+
class ListDeviceConfigVersionsResponse
|
674
|
+
include Google::Apis::Core::Hashable
|
675
|
+
|
676
|
+
# The device configuration for the last few versions. Versions are listed in
|
677
|
+
# decreasing order, starting from the most recent one.
|
678
|
+
# Corresponds to the JSON property `deviceConfigs`
|
679
|
+
# @return [Array<Google::Apis::CloudiotV1::DeviceConfig>]
|
680
|
+
attr_accessor :device_configs
|
681
|
+
|
682
|
+
def initialize(**args)
|
683
|
+
update!(**args)
|
684
|
+
end
|
685
|
+
|
686
|
+
# Update properties of this object
|
687
|
+
def update!(**args)
|
688
|
+
@device_configs = args[:device_configs] if args.key?(:device_configs)
|
689
|
+
end
|
690
|
+
end
|
691
|
+
|
692
|
+
# Response for `ListDeviceRegistries`.
|
693
|
+
class ListDeviceRegistriesResponse
|
694
|
+
include Google::Apis::Core::Hashable
|
695
|
+
|
696
|
+
# The registries that matched the query.
|
697
|
+
# Corresponds to the JSON property `deviceRegistries`
|
698
|
+
# @return [Array<Google::Apis::CloudiotV1::DeviceRegistry>]
|
699
|
+
attr_accessor :device_registries
|
700
|
+
|
701
|
+
# If not empty, indicates that there may be more registries that match the
|
702
|
+
# request; this value should be passed in a new `ListDeviceRegistriesRequest`.
|
703
|
+
# Corresponds to the JSON property `nextPageToken`
|
704
|
+
# @return [String]
|
705
|
+
attr_accessor :next_page_token
|
706
|
+
|
707
|
+
def initialize(**args)
|
708
|
+
update!(**args)
|
709
|
+
end
|
710
|
+
|
711
|
+
# Update properties of this object
|
712
|
+
def update!(**args)
|
713
|
+
@device_registries = args[:device_registries] if args.key?(:device_registries)
|
714
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
715
|
+
end
|
716
|
+
end
|
717
|
+
|
718
|
+
# Response for `ListDeviceStates`.
|
719
|
+
class ListDeviceStatesResponse
|
720
|
+
include Google::Apis::Core::Hashable
|
721
|
+
|
722
|
+
# The last few device states. States are listed in descending order of server
|
723
|
+
# update time, starting from the most recent one.
|
724
|
+
# Corresponds to the JSON property `deviceStates`
|
725
|
+
# @return [Array<Google::Apis::CloudiotV1::DeviceState>]
|
726
|
+
attr_accessor :device_states
|
727
|
+
|
728
|
+
def initialize(**args)
|
729
|
+
update!(**args)
|
730
|
+
end
|
731
|
+
|
732
|
+
# Update properties of this object
|
733
|
+
def update!(**args)
|
734
|
+
@device_states = args[:device_states] if args.key?(:device_states)
|
735
|
+
end
|
736
|
+
end
|
737
|
+
|
738
|
+
# Response for `ListDevices`.
|
739
|
+
class ListDevicesResponse
|
740
|
+
include Google::Apis::Core::Hashable
|
741
|
+
|
742
|
+
# The devices that match the request.
|
743
|
+
# Corresponds to the JSON property `devices`
|
744
|
+
# @return [Array<Google::Apis::CloudiotV1::Device>]
|
745
|
+
attr_accessor :devices
|
746
|
+
|
747
|
+
# If not empty, indicates that there may be more devices that match the request;
|
748
|
+
# this value should be passed in a new `ListDevicesRequest`.
|
749
|
+
# Corresponds to the JSON property `nextPageToken`
|
750
|
+
# @return [String]
|
751
|
+
attr_accessor :next_page_token
|
752
|
+
|
753
|
+
def initialize(**args)
|
754
|
+
update!(**args)
|
755
|
+
end
|
756
|
+
|
757
|
+
# Update properties of this object
|
758
|
+
def update!(**args)
|
759
|
+
@devices = args[:devices] if args.key?(:devices)
|
760
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
761
|
+
end
|
762
|
+
end
|
763
|
+
|
764
|
+
# Request for `ModifyCloudToDeviceConfig`.
|
765
|
+
class ModifyCloudToDeviceConfigRequest
|
766
|
+
include Google::Apis::Core::Hashable
|
767
|
+
|
768
|
+
# Required. The configuration data for the device.
|
769
|
+
# Corresponds to the JSON property `binaryData`
|
770
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
771
|
+
# @return [String]
|
772
|
+
attr_accessor :binary_data
|
773
|
+
|
774
|
+
# The version number to update. If this value is zero, it will not check the
|
775
|
+
# version number of the server and will always update the current version;
|
776
|
+
# otherwise, this update will fail if the version number found on the server
|
777
|
+
# does not match this version number. This is used to support multiple
|
778
|
+
# simultaneous updates without losing data.
|
779
|
+
# Corresponds to the JSON property `versionToUpdate`
|
780
|
+
# @return [Fixnum]
|
781
|
+
attr_accessor :version_to_update
|
782
|
+
|
783
|
+
def initialize(**args)
|
784
|
+
update!(**args)
|
785
|
+
end
|
786
|
+
|
787
|
+
# Update properties of this object
|
788
|
+
def update!(**args)
|
789
|
+
@binary_data = args[:binary_data] if args.key?(:binary_data)
|
790
|
+
@version_to_update = args[:version_to_update] if args.key?(:version_to_update)
|
791
|
+
end
|
792
|
+
end
|
793
|
+
|
794
|
+
# The configuration of MQTT for a device registry.
|
795
|
+
class MqttConfig
|
796
|
+
include Google::Apis::Core::Hashable
|
797
|
+
|
798
|
+
# If enabled, allows connections using the MQTT protocol. Otherwise, MQTT
|
799
|
+
# connections to this registry will fail.
|
800
|
+
# Corresponds to the JSON property `mqttEnabledState`
|
801
|
+
# @return [String]
|
802
|
+
attr_accessor :mqtt_enabled_state
|
803
|
+
|
804
|
+
def initialize(**args)
|
805
|
+
update!(**args)
|
806
|
+
end
|
807
|
+
|
808
|
+
# Update properties of this object
|
809
|
+
def update!(**args)
|
810
|
+
@mqtt_enabled_state = args[:mqtt_enabled_state] if args.key?(:mqtt_enabled_state)
|
811
|
+
end
|
812
|
+
end
|
813
|
+
|
814
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
815
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
816
|
+
# A `binding` binds one or more `members` to a single `role`. Members can be
|
817
|
+
# user accounts, service accounts, Google groups, and domains (such as G Suite).
|
818
|
+
# A `role` is a named list of permissions; each `role` can be an IAM predefined
|
819
|
+
# role or a user-created custom role. For some types of Google Cloud resources,
|
820
|
+
# a `binding` can also specify a `condition`, which is a logical expression that
|
821
|
+
# allows access to a resource only if the expression evaluates to `true`. A
|
822
|
+
# condition can add constraints based on attributes of the request, the resource,
|
823
|
+
# or both. To learn which resources support conditions in their IAM policies,
|
824
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
825
|
+
# resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
|
826
|
+
# resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
|
827
|
+
# group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
|
828
|
+
# appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
|
829
|
+
# organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
|
830
|
+
# title": "expirable access", "description": "Does not grant access after Sep
|
831
|
+
# 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
|
832
|
+
# ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
|
833
|
+
# members: - user:mike@example.com - group:admins@example.com - domain:google.
|
834
|
+
# com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
|
835
|
+
# resourcemanager.organizationAdmin - members: - user:eve@example.com role:
|
836
|
+
# roles/resourcemanager.organizationViewer condition: title: expirable access
|
837
|
+
# description: Does not grant access after Sep 2020 expression: request.time <
|
838
|
+
# timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
|
839
|
+
# description of IAM and its features, see the [IAM documentation](https://cloud.
|
840
|
+
# google.com/iam/docs/).
|
841
|
+
class Policy
|
842
|
+
include Google::Apis::Core::Hashable
|
843
|
+
|
844
|
+
# Associates a list of `members` to a `role`. Optionally, may specify a `
|
845
|
+
# condition` that determines how and when the `bindings` are applied. Each of
|
846
|
+
# the `bindings` must contain at least one member.
|
847
|
+
# Corresponds to the JSON property `bindings`
|
848
|
+
# @return [Array<Google::Apis::CloudiotV1::Binding>]
|
849
|
+
attr_accessor :bindings
|
850
|
+
|
851
|
+
# `etag` is used for optimistic concurrency control as a way to help prevent
|
852
|
+
# simultaneous updates of a policy from overwriting each other. It is strongly
|
853
|
+
# suggested that systems make use of the `etag` in the read-modify-write cycle
|
854
|
+
# to perform policy updates in order to avoid race conditions: An `etag` is
|
855
|
+
# returned in the response to `getIamPolicy`, and systems are expected to put
|
856
|
+
# that etag in the request to `setIamPolicy` to ensure that their change will be
|
857
|
+
# applied to the same version of the policy. **Important:** If you use IAM
|
858
|
+
# Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
|
859
|
+
# If you omit this field, then IAM allows you to overwrite a version `3` policy
|
860
|
+
# with a version `1` policy, and all of the conditions in the version `3` policy
|
861
|
+
# are lost.
|
862
|
+
# Corresponds to the JSON property `etag`
|
863
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
864
|
+
# @return [String]
|
865
|
+
attr_accessor :etag
|
866
|
+
|
867
|
+
# Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
|
868
|
+
# Requests that specify an invalid value are rejected. Any operation that
|
869
|
+
# affects conditional role bindings must specify version `3`. This requirement
|
870
|
+
# applies to the following operations: * Getting a policy that includes a
|
871
|
+
# conditional role binding * Adding a conditional role binding to a policy *
|
872
|
+
# Changing a conditional role binding in a policy * Removing any role binding,
|
873
|
+
# with or without a condition, from a policy that includes conditions **
|
874
|
+
# Important:** If you use IAM Conditions, you must include the `etag` field
|
875
|
+
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
|
876
|
+
# to overwrite a version `3` policy with a version `1` policy, and all of the
|
877
|
+
# conditions in the version `3` policy are lost. If a policy does not include
|
878
|
+
# any conditions, operations on that policy may specify any valid version or
|
879
|
+
# leave the field unset. To learn which resources support conditions in their
|
880
|
+
# IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
|
881
|
+
# conditions/resource-policies).
|
882
|
+
# Corresponds to the JSON property `version`
|
883
|
+
# @return [Fixnum]
|
884
|
+
attr_accessor :version
|
885
|
+
|
886
|
+
def initialize(**args)
|
887
|
+
update!(**args)
|
888
|
+
end
|
889
|
+
|
890
|
+
# Update properties of this object
|
891
|
+
def update!(**args)
|
892
|
+
@bindings = args[:bindings] if args.key?(:bindings)
|
893
|
+
@etag = args[:etag] if args.key?(:etag)
|
894
|
+
@version = args[:version] if args.key?(:version)
|
895
|
+
end
|
896
|
+
end
|
897
|
+
|
898
|
+
# A public key certificate format and data.
|
899
|
+
class PublicKeyCertificate
|
900
|
+
include Google::Apis::Core::Hashable
|
901
|
+
|
902
|
+
# The certificate data.
|
903
|
+
# Corresponds to the JSON property `certificate`
|
904
|
+
# @return [String]
|
905
|
+
attr_accessor :certificate
|
906
|
+
|
907
|
+
# The certificate format.
|
908
|
+
# Corresponds to the JSON property `format`
|
909
|
+
# @return [String]
|
910
|
+
attr_accessor :format
|
911
|
+
|
912
|
+
# Details of an X.509 certificate. For informational purposes only.
|
913
|
+
# Corresponds to the JSON property `x509Details`
|
914
|
+
# @return [Google::Apis::CloudiotV1::X509CertificateDetails]
|
915
|
+
attr_accessor :x509_details
|
916
|
+
|
917
|
+
def initialize(**args)
|
918
|
+
update!(**args)
|
919
|
+
end
|
920
|
+
|
921
|
+
# Update properties of this object
|
922
|
+
def update!(**args)
|
923
|
+
@certificate = args[:certificate] if args.key?(:certificate)
|
924
|
+
@format = args[:format] if args.key?(:format)
|
925
|
+
@x509_details = args[:x509_details] if args.key?(:x509_details)
|
926
|
+
end
|
927
|
+
end
|
928
|
+
|
929
|
+
# A public key format and data.
|
930
|
+
class PublicKeyCredential
|
931
|
+
include Google::Apis::Core::Hashable
|
932
|
+
|
933
|
+
# The format of the key.
|
934
|
+
# Corresponds to the JSON property `format`
|
935
|
+
# @return [String]
|
936
|
+
attr_accessor :format
|
937
|
+
|
938
|
+
# The key data.
|
939
|
+
# Corresponds to the JSON property `key`
|
940
|
+
# @return [String]
|
941
|
+
attr_accessor :key
|
942
|
+
|
943
|
+
def initialize(**args)
|
944
|
+
update!(**args)
|
945
|
+
end
|
946
|
+
|
947
|
+
# Update properties of this object
|
948
|
+
def update!(**args)
|
949
|
+
@format = args[:format] if args.key?(:format)
|
950
|
+
@key = args[:key] if args.key?(:key)
|
951
|
+
end
|
952
|
+
end
|
953
|
+
|
954
|
+
# A server-stored registry credential used to validate device credentials.
|
955
|
+
class RegistryCredential
|
956
|
+
include Google::Apis::Core::Hashable
|
957
|
+
|
958
|
+
# A public key certificate format and data.
|
959
|
+
# Corresponds to the JSON property `publicKeyCertificate`
|
960
|
+
# @return [Google::Apis::CloudiotV1::PublicKeyCertificate]
|
961
|
+
attr_accessor :public_key_certificate
|
962
|
+
|
963
|
+
def initialize(**args)
|
964
|
+
update!(**args)
|
965
|
+
end
|
966
|
+
|
967
|
+
# Update properties of this object
|
968
|
+
def update!(**args)
|
969
|
+
@public_key_certificate = args[:public_key_certificate] if args.key?(:public_key_certificate)
|
970
|
+
end
|
971
|
+
end
|
972
|
+
|
973
|
+
# Request for `SendCommandToDevice`.
|
974
|
+
class SendCommandToDeviceRequest
|
975
|
+
include Google::Apis::Core::Hashable
|
976
|
+
|
977
|
+
# Required. The command data to send to the device.
|
978
|
+
# Corresponds to the JSON property `binaryData`
|
979
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
980
|
+
# @return [String]
|
981
|
+
attr_accessor :binary_data
|
982
|
+
|
983
|
+
# Optional subfolder for the command. If empty, the command will be delivered to
|
984
|
+
# the /devices/`device-id`/commands topic, otherwise it will be delivered to the
|
985
|
+
# /devices/`device-id`/commands/`subfolder` topic. Multi-level subfolders are
|
986
|
+
# allowed. This field must not have more than 256 characters, and must not
|
987
|
+
# contain any MQTT wildcards ("+" or "#") or null characters.
|
988
|
+
# Corresponds to the JSON property `subfolder`
|
989
|
+
# @return [String]
|
990
|
+
attr_accessor :subfolder
|
991
|
+
|
992
|
+
def initialize(**args)
|
993
|
+
update!(**args)
|
994
|
+
end
|
995
|
+
|
996
|
+
# Update properties of this object
|
997
|
+
def update!(**args)
|
998
|
+
@binary_data = args[:binary_data] if args.key?(:binary_data)
|
999
|
+
@subfolder = args[:subfolder] if args.key?(:subfolder)
|
1000
|
+
end
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
# Response for `SendCommandToDevice`.
|
1004
|
+
class SendCommandToDeviceResponse
|
1005
|
+
include Google::Apis::Core::Hashable
|
1006
|
+
|
1007
|
+
def initialize(**args)
|
1008
|
+
update!(**args)
|
1009
|
+
end
|
1010
|
+
|
1011
|
+
# Update properties of this object
|
1012
|
+
def update!(**args)
|
1013
|
+
end
|
1014
|
+
end
|
1015
|
+
|
1016
|
+
# Request message for `SetIamPolicy` method.
|
1017
|
+
class SetIamPolicyRequest
|
1018
|
+
include Google::Apis::Core::Hashable
|
1019
|
+
|
1020
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
1021
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
1022
|
+
# A `binding` binds one or more `members` to a single `role`. Members can be
|
1023
|
+
# user accounts, service accounts, Google groups, and domains (such as G Suite).
|
1024
|
+
# A `role` is a named list of permissions; each `role` can be an IAM predefined
|
1025
|
+
# role or a user-created custom role. For some types of Google Cloud resources,
|
1026
|
+
# a `binding` can also specify a `condition`, which is a logical expression that
|
1027
|
+
# allows access to a resource only if the expression evaluates to `true`. A
|
1028
|
+
# condition can add constraints based on attributes of the request, the resource,
|
1029
|
+
# or both. To learn which resources support conditions in their IAM policies,
|
1030
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
1031
|
+
# resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
|
1032
|
+
# resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
|
1033
|
+
# group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
|
1034
|
+
# appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
|
1035
|
+
# organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
|
1036
|
+
# title": "expirable access", "description": "Does not grant access after Sep
|
1037
|
+
# 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
|
1038
|
+
# ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
|
1039
|
+
# members: - user:mike@example.com - group:admins@example.com - domain:google.
|
1040
|
+
# com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
|
1041
|
+
# resourcemanager.organizationAdmin - members: - user:eve@example.com role:
|
1042
|
+
# roles/resourcemanager.organizationViewer condition: title: expirable access
|
1043
|
+
# description: Does not grant access after Sep 2020 expression: request.time <
|
1044
|
+
# timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
|
1045
|
+
# description of IAM and its features, see the [IAM documentation](https://cloud.
|
1046
|
+
# google.com/iam/docs/).
|
1047
|
+
# Corresponds to the JSON property `policy`
|
1048
|
+
# @return [Google::Apis::CloudiotV1::Policy]
|
1049
|
+
attr_accessor :policy
|
1050
|
+
|
1051
|
+
def initialize(**args)
|
1052
|
+
update!(**args)
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
# Update properties of this object
|
1056
|
+
def update!(**args)
|
1057
|
+
@policy = args[:policy] if args.key?(:policy)
|
1058
|
+
end
|
1059
|
+
end
|
1060
|
+
|
1061
|
+
# The configuration for notification of new states received from the device.
|
1062
|
+
class StateNotificationConfig
|
1063
|
+
include Google::Apis::Core::Hashable
|
1064
|
+
|
1065
|
+
# A Cloud Pub/Sub topic name. For example, `projects/myProject/topics/
|
1066
|
+
# deviceEvents`.
|
1067
|
+
# Corresponds to the JSON property `pubsubTopicName`
|
1068
|
+
# @return [String]
|
1069
|
+
attr_accessor :pubsub_topic_name
|
1070
|
+
|
1071
|
+
def initialize(**args)
|
1072
|
+
update!(**args)
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
# Update properties of this object
|
1076
|
+
def update!(**args)
|
1077
|
+
@pubsub_topic_name = args[:pubsub_topic_name] if args.key?(:pubsub_topic_name)
|
1078
|
+
end
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1082
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1083
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1084
|
+
# data: error code, error message, and error details. You can find out more
|
1085
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1086
|
+
# //cloud.google.com/apis/design/errors).
|
1087
|
+
class Status
|
1088
|
+
include Google::Apis::Core::Hashable
|
1089
|
+
|
1090
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
1091
|
+
# Corresponds to the JSON property `code`
|
1092
|
+
# @return [Fixnum]
|
1093
|
+
attr_accessor :code
|
1094
|
+
|
1095
|
+
# A list of messages that carry the error details. There is a common set of
|
1096
|
+
# message types for APIs to use.
|
1097
|
+
# Corresponds to the JSON property `details`
|
1098
|
+
# @return [Array<Hash<String,Object>>]
|
1099
|
+
attr_accessor :details
|
1100
|
+
|
1101
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
1102
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
1103
|
+
# field, or localized by the client.
|
1104
|
+
# Corresponds to the JSON property `message`
|
1105
|
+
# @return [String]
|
1106
|
+
attr_accessor :message
|
1107
|
+
|
1108
|
+
def initialize(**args)
|
1109
|
+
update!(**args)
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
# Update properties of this object
|
1113
|
+
def update!(**args)
|
1114
|
+
@code = args[:code] if args.key?(:code)
|
1115
|
+
@details = args[:details] if args.key?(:details)
|
1116
|
+
@message = args[:message] if args.key?(:message)
|
1117
|
+
end
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
# Request message for `TestIamPermissions` method.
|
1121
|
+
class TestIamPermissionsRequest
|
1122
|
+
include Google::Apis::Core::Hashable
|
1123
|
+
|
1124
|
+
# The set of permissions to check for the `resource`. Permissions with wildcards
|
1125
|
+
# (such as '*' or 'storage.*') are not allowed. For more information see [IAM
|
1126
|
+
# Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
1127
|
+
# Corresponds to the JSON property `permissions`
|
1128
|
+
# @return [Array<String>]
|
1129
|
+
attr_accessor :permissions
|
1130
|
+
|
1131
|
+
def initialize(**args)
|
1132
|
+
update!(**args)
|
1133
|
+
end
|
1134
|
+
|
1135
|
+
# Update properties of this object
|
1136
|
+
def update!(**args)
|
1137
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
1138
|
+
end
|
1139
|
+
end
|
1140
|
+
|
1141
|
+
# Response message for `TestIamPermissions` method.
|
1142
|
+
class TestIamPermissionsResponse
|
1143
|
+
include Google::Apis::Core::Hashable
|
1144
|
+
|
1145
|
+
# A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
|
1146
|
+
# Corresponds to the JSON property `permissions`
|
1147
|
+
# @return [Array<String>]
|
1148
|
+
attr_accessor :permissions
|
1149
|
+
|
1150
|
+
def initialize(**args)
|
1151
|
+
update!(**args)
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
# Update properties of this object
|
1155
|
+
def update!(**args)
|
1156
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
1157
|
+
end
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
# Request for `UnbindDeviceFromGateway`.
|
1161
|
+
class UnbindDeviceFromGatewayRequest
|
1162
|
+
include Google::Apis::Core::Hashable
|
1163
|
+
|
1164
|
+
# Required. The device to disassociate from the specified gateway. The value of `
|
1165
|
+
# device_id` can be either the device numeric ID or the user-defined device
|
1166
|
+
# identifier.
|
1167
|
+
# Corresponds to the JSON property `deviceId`
|
1168
|
+
# @return [String]
|
1169
|
+
attr_accessor :device_id
|
1170
|
+
|
1171
|
+
# Required. The value of `gateway_id` can be either the device numeric ID or the
|
1172
|
+
# user-defined device identifier.
|
1173
|
+
# Corresponds to the JSON property `gatewayId`
|
1174
|
+
# @return [String]
|
1175
|
+
attr_accessor :gateway_id
|
1176
|
+
|
1177
|
+
def initialize(**args)
|
1178
|
+
update!(**args)
|
1179
|
+
end
|
1180
|
+
|
1181
|
+
# Update properties of this object
|
1182
|
+
def update!(**args)
|
1183
|
+
@device_id = args[:device_id] if args.key?(:device_id)
|
1184
|
+
@gateway_id = args[:gateway_id] if args.key?(:gateway_id)
|
1185
|
+
end
|
1186
|
+
end
|
1187
|
+
|
1188
|
+
# Response for `UnbindDeviceFromGateway`.
|
1189
|
+
class UnbindDeviceFromGatewayResponse
|
1190
|
+
include Google::Apis::Core::Hashable
|
1191
|
+
|
1192
|
+
def initialize(**args)
|
1193
|
+
update!(**args)
|
1194
|
+
end
|
1195
|
+
|
1196
|
+
# Update properties of this object
|
1197
|
+
def update!(**args)
|
1198
|
+
end
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
# Details of an X.509 certificate. For informational purposes only.
|
1202
|
+
class X509CertificateDetails
|
1203
|
+
include Google::Apis::Core::Hashable
|
1204
|
+
|
1205
|
+
# The time the certificate becomes invalid.
|
1206
|
+
# Corresponds to the JSON property `expiryTime`
|
1207
|
+
# @return [String]
|
1208
|
+
attr_accessor :expiry_time
|
1209
|
+
|
1210
|
+
# The entity that signed the certificate.
|
1211
|
+
# Corresponds to the JSON property `issuer`
|
1212
|
+
# @return [String]
|
1213
|
+
attr_accessor :issuer
|
1214
|
+
|
1215
|
+
# The type of public key in the certificate.
|
1216
|
+
# Corresponds to the JSON property `publicKeyType`
|
1217
|
+
# @return [String]
|
1218
|
+
attr_accessor :public_key_type
|
1219
|
+
|
1220
|
+
# The algorithm used to sign the certificate.
|
1221
|
+
# Corresponds to the JSON property `signatureAlgorithm`
|
1222
|
+
# @return [String]
|
1223
|
+
attr_accessor :signature_algorithm
|
1224
|
+
|
1225
|
+
# The time the certificate becomes valid.
|
1226
|
+
# Corresponds to the JSON property `startTime`
|
1227
|
+
# @return [String]
|
1228
|
+
attr_accessor :start_time
|
1229
|
+
|
1230
|
+
# The entity the certificate and public key belong to.
|
1231
|
+
# Corresponds to the JSON property `subject`
|
1232
|
+
# @return [String]
|
1233
|
+
attr_accessor :subject
|
1234
|
+
|
1235
|
+
def initialize(**args)
|
1236
|
+
update!(**args)
|
1237
|
+
end
|
1238
|
+
|
1239
|
+
# Update properties of this object
|
1240
|
+
def update!(**args)
|
1241
|
+
@expiry_time = args[:expiry_time] if args.key?(:expiry_time)
|
1242
|
+
@issuer = args[:issuer] if args.key?(:issuer)
|
1243
|
+
@public_key_type = args[:public_key_type] if args.key?(:public_key_type)
|
1244
|
+
@signature_algorithm = args[:signature_algorithm] if args.key?(:signature_algorithm)
|
1245
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
1246
|
+
@subject = args[:subject] if args.key?(:subject)
|
1247
|
+
end
|
1248
|
+
end
|
1249
|
+
end
|
1250
|
+
end
|
1251
|
+
end
|