google-apis-cloudtasks_v2beta2 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-cloudtasks_v2beta2.rb +15 -0
- data/lib/google/apis/cloudtasks_v2beta2.rb +36 -0
- data/lib/google/apis/cloudtasks_v2beta2/classes.rb +1588 -0
- data/lib/google/apis/cloudtasks_v2beta2/gem_version.rb +28 -0
- data/lib/google/apis/cloudtasks_v2beta2/representations.rb +572 -0
- data/lib/google/apis/cloudtasks_v2beta2/service.rb +943 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 38b3bf0b3db0c5043dbb77452e4d0f599aa907292108e6020a78e92cc343a4ac
|
4
|
+
data.tar.gz: 5a06b44a978e7c8c6bfefa890c9782a563e729b42192e9b1c76034141f579015
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a406d90dc91a3c2c77a4e7812f80e3a90e775daebec8189f860dc76b3bbcbba95be87984b8825c27097766e73d186c7dac8ee1d070b1f11de515587d742126da
|
7
|
+
data.tar.gz: a13aad7fc34e5865bdad175527a0a06c52cb5df1f4875126392468dd4ed1f5be8f93d5ec4d3edee408d2744ee5a7f12eb55c3559c56f3a8eb837cac282973aa3
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-cloudtasks_v2beta2
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/cloudtasks_v2beta2/*.rb
|
9
|
+
lib/google/apis/cloudtasks_v2beta2.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 V2beta2 of the Cloud Tasks API
|
2
|
+
|
3
|
+
This is a simple client library for version V2beta2 of the Cloud Tasks 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/cloudtasks.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-cloudtasks_v2beta2', '~> 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-cloudtasks_v2beta2
|
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/cloudtasks_v2beta2"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::CloudtasksV2beta2::CloudTasksService.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 Cloudtasks service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Cloud Tasks API, see the {Google::Apis::CloudtasksV2beta2::CloudTasksService 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-cloudtasks_v2beta2`, 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/tasks/) 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/cloudtasks_v2beta2"
|
@@ -0,0 +1,36 @@
|
|
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/cloudtasks_v2beta2/service.rb'
|
16
|
+
require 'google/apis/cloudtasks_v2beta2/classes.rb'
|
17
|
+
require 'google/apis/cloudtasks_v2beta2/representations.rb'
|
18
|
+
require 'google/apis/cloudtasks_v2beta2/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Cloud Tasks API
|
23
|
+
#
|
24
|
+
# Manages the execution of large numbers of distributed requests.
|
25
|
+
#
|
26
|
+
# @see https://cloud.google.com/tasks/
|
27
|
+
module CloudtasksV2beta2
|
28
|
+
# Version of the Cloud Tasks API this client connects to.
|
29
|
+
# This is NOT the gem version.
|
30
|
+
VERSION = 'V2beta2'
|
31
|
+
|
32
|
+
# View and manage your data across Google Cloud Platform services
|
33
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,1588 @@
|
|
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 CloudtasksV2beta2
|
24
|
+
|
25
|
+
# Request message for acknowledging a task using AcknowledgeTask.
|
26
|
+
class AcknowledgeTaskRequest
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Required. The task's current schedule time, available in the schedule_time
|
30
|
+
# returned by LeaseTasks response or RenewLease response. This restriction is to
|
31
|
+
# ensure that your worker currently holds the lease.
|
32
|
+
# Corresponds to the JSON property `scheduleTime`
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :schedule_time
|
35
|
+
|
36
|
+
def initialize(**args)
|
37
|
+
update!(**args)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Update properties of this object
|
41
|
+
def update!(**args)
|
42
|
+
@schedule_time = args[:schedule_time] if args.key?(:schedule_time)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# App Engine HTTP request. The message defines the HTTP request that is sent to
|
47
|
+
# an App Engine app when the task is dispatched. This proto can only be used for
|
48
|
+
# tasks in a queue which has app_engine_http_target set. Using
|
49
|
+
# AppEngineHttpRequest requires [`appengine.applications.get`](https://cloud.
|
50
|
+
# google.com/appengine/docs/admin-api/access-control) Google IAM permission for
|
51
|
+
# the project and the following scope: `https://www.googleapis.com/auth/cloud-
|
52
|
+
# platform` The task will be delivered to the App Engine app which belongs to
|
53
|
+
# the same project as the queue. For more information, see [How Requests are
|
54
|
+
# Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-
|
55
|
+
# are-routed) and how routing is affected by [dispatch files](https://cloud.
|
56
|
+
# google.com/appengine/docs/python/config/dispatchref). Traffic is encrypted
|
57
|
+
# during transport and never leaves Google datacenters. Because this traffic is
|
58
|
+
# carried over a communication mechanism internal to Google, you cannot
|
59
|
+
# explicitly set the protocol (for example, HTTP or HTTPS). The request to the
|
60
|
+
# handler, however, will appear to have used the HTTP protocol. The
|
61
|
+
# AppEngineRouting used to construct the URL that the task is delivered to can
|
62
|
+
# be set at the queue-level or task-level: * If set, app_engine_routing_override
|
63
|
+
# is used for all tasks in the queue, no matter what the setting is for the task-
|
64
|
+
# level app_engine_routing. The `url` that the task will be sent to is: * `url =`
|
65
|
+
# host `+` relative_url Tasks can be dispatched to secure app handlers,
|
66
|
+
# unsecure app handlers, and URIs restricted with [`login: admin`](https://cloud.
|
67
|
+
# google.com/appengine/docs/standard/python/config/appref). Because tasks are
|
68
|
+
# not run as any user, they cannot be dispatched to URIs restricted with [`login:
|
69
|
+
# required`](https://cloud.google.com/appengine/docs/standard/python/config/
|
70
|
+
# appref) Task dispatches also do not follow redirects. The task attempt has
|
71
|
+
# succeeded if the app's request handler returns an HTTP response code in the
|
72
|
+
# range [`200` - `299`]. The task attempt has failed if the app's handler
|
73
|
+
# returns a non-2xx response code or Cloud Tasks does not receive response
|
74
|
+
# before the deadline. Failed tasks will be retried according to the retry
|
75
|
+
# configuration. `503` (Service Unavailable) is considered an App Engine system
|
76
|
+
# error instead of an application error and will cause Cloud Tasks' traffic
|
77
|
+
# congestion control to temporarily throttle the queue's dispatches. Unlike
|
78
|
+
# other types of task targets, a `429` (Too Many Requests) response from an app
|
79
|
+
# handler does not cause traffic congestion control to throttle the queue.
|
80
|
+
class AppEngineHttpRequest
|
81
|
+
include Google::Apis::Core::Hashable
|
82
|
+
|
83
|
+
# App Engine Routing. Defines routing characteristics specific to App Engine -
|
84
|
+
# service, version, and instance. For more information about services, versions,
|
85
|
+
# and instances see [An Overview of App Engine](https://cloud.google.com/
|
86
|
+
# appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture
|
87
|
+
# on Google App Engine](https://cloud.google.com/appengine/docs/python/
|
88
|
+
# microservices-on-app-engine), [App Engine Standard request routing](https://
|
89
|
+
# cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and [
|
90
|
+
# App Engine Flex request routing](https://cloud.google.com/appengine/docs/
|
91
|
+
# flexible/python/how-requests-are-routed).
|
92
|
+
# Corresponds to the JSON property `appEngineRouting`
|
93
|
+
# @return [Google::Apis::CloudtasksV2beta2::AppEngineRouting]
|
94
|
+
attr_accessor :app_engine_routing
|
95
|
+
|
96
|
+
# HTTP request headers. This map contains the header field names and values.
|
97
|
+
# Headers can be set when the task is created. Repeated headers are not
|
98
|
+
# supported but a header value can contain commas. Cloud Tasks sets some headers
|
99
|
+
# to default values: * `User-Agent`: By default, this header is `"AppEngine-
|
100
|
+
# Google; (+http://code.google.com/appengine)"`. This header can be modified,
|
101
|
+
# but Cloud Tasks will append `"AppEngine-Google; (+http://code.google.com/
|
102
|
+
# appengine)"` to the modified `User-Agent`. If the task has a payload, Cloud
|
103
|
+
# Tasks sets the following headers: * `Content-Type`: By default, the `Content-
|
104
|
+
# Type` header is set to `"application/octet-stream"`. The default can be
|
105
|
+
# overridden by explicitly setting `Content-Type` to a particular media type
|
106
|
+
# when the task is created. For example, `Content-Type` can be set to `"
|
107
|
+
# application/json"`. * `Content-Length`: This is computed by Cloud Tasks. This
|
108
|
+
# value is output only. It cannot be changed. The headers below cannot be set or
|
109
|
+
# overridden: * `Host` * `X-Google-*` * `X-AppEngine-*` In addition, Cloud Tasks
|
110
|
+
# sets some headers when the task is dispatched, such as headers containing
|
111
|
+
# information about the task; see [request headers](https://cloud.google.com/
|
112
|
+
# appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers)
|
113
|
+
# . These headers are set only when the task is dispatched, so they are not
|
114
|
+
# visible when the task is returned in a Cloud Tasks response. Although there is
|
115
|
+
# no specific limit for the maximum number of headers or the size, there is a
|
116
|
+
# limit on the maximum size of the Task. For more information, see the
|
117
|
+
# CreateTask documentation.
|
118
|
+
# Corresponds to the JSON property `headers`
|
119
|
+
# @return [Hash<String,String>]
|
120
|
+
attr_accessor :headers
|
121
|
+
|
122
|
+
# The HTTP method to use for the request. The default is POST. The app's request
|
123
|
+
# handler for the task's target URL must be able to handle HTTP requests with
|
124
|
+
# this http_method, otherwise the task attempt fails with error code 405 (Method
|
125
|
+
# Not Allowed). See [Writing a push task request handler](https://cloud.google.
|
126
|
+
# com/appengine/docs/java/taskqueue/push/creating-handlers#
|
127
|
+
# writing_a_push_task_request_handler) and the App Engine documentation for your
|
128
|
+
# runtime on [How Requests are Handled](https://cloud.google.com/appengine/docs/
|
129
|
+
# standard/python3/how-requests-are-handled).
|
130
|
+
# Corresponds to the JSON property `httpMethod`
|
131
|
+
# @return [String]
|
132
|
+
attr_accessor :http_method
|
133
|
+
|
134
|
+
# Payload. The payload will be sent as the HTTP message body. A message body,
|
135
|
+
# and thus a payload, is allowed only if the HTTP method is POST or PUT. It is
|
136
|
+
# an error to set a data payload on a task with an incompatible HttpMethod.
|
137
|
+
# Corresponds to the JSON property `payload`
|
138
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
139
|
+
# @return [String]
|
140
|
+
attr_accessor :payload
|
141
|
+
|
142
|
+
# The relative URL. The relative URL must begin with "/" and must be a valid
|
143
|
+
# HTTP relative URL. It can contain a path and query string arguments. If the
|
144
|
+
# relative URL is empty, then the root path "/" will be used. No spaces are
|
145
|
+
# allowed, and the maximum length allowed is 2083 characters.
|
146
|
+
# Corresponds to the JSON property `relativeUrl`
|
147
|
+
# @return [String]
|
148
|
+
attr_accessor :relative_url
|
149
|
+
|
150
|
+
def initialize(**args)
|
151
|
+
update!(**args)
|
152
|
+
end
|
153
|
+
|
154
|
+
# Update properties of this object
|
155
|
+
def update!(**args)
|
156
|
+
@app_engine_routing = args[:app_engine_routing] if args.key?(:app_engine_routing)
|
157
|
+
@headers = args[:headers] if args.key?(:headers)
|
158
|
+
@http_method = args[:http_method] if args.key?(:http_method)
|
159
|
+
@payload = args[:payload] if args.key?(:payload)
|
160
|
+
@relative_url = args[:relative_url] if args.key?(:relative_url)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
# App Engine HTTP target. The task will be delivered to the App Engine
|
165
|
+
# application hostname specified by its AppEngineHttpTarget and
|
166
|
+
# AppEngineHttpRequest. The documentation for AppEngineHttpRequest explains how
|
167
|
+
# the task's host URL is constructed. Using AppEngineHttpTarget requires [`
|
168
|
+
# appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/
|
169
|
+
# access-control) Google IAM permission for the project and the following scope:
|
170
|
+
# `https://www.googleapis.com/auth/cloud-platform`
|
171
|
+
class AppEngineHttpTarget
|
172
|
+
include Google::Apis::Core::Hashable
|
173
|
+
|
174
|
+
# App Engine Routing. Defines routing characteristics specific to App Engine -
|
175
|
+
# service, version, and instance. For more information about services, versions,
|
176
|
+
# and instances see [An Overview of App Engine](https://cloud.google.com/
|
177
|
+
# appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture
|
178
|
+
# on Google App Engine](https://cloud.google.com/appengine/docs/python/
|
179
|
+
# microservices-on-app-engine), [App Engine Standard request routing](https://
|
180
|
+
# cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and [
|
181
|
+
# App Engine Flex request routing](https://cloud.google.com/appengine/docs/
|
182
|
+
# flexible/python/how-requests-are-routed).
|
183
|
+
# Corresponds to the JSON property `appEngineRoutingOverride`
|
184
|
+
# @return [Google::Apis::CloudtasksV2beta2::AppEngineRouting]
|
185
|
+
attr_accessor :app_engine_routing_override
|
186
|
+
|
187
|
+
def initialize(**args)
|
188
|
+
update!(**args)
|
189
|
+
end
|
190
|
+
|
191
|
+
# Update properties of this object
|
192
|
+
def update!(**args)
|
193
|
+
@app_engine_routing_override = args[:app_engine_routing_override] if args.key?(:app_engine_routing_override)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
# App Engine Routing. Defines routing characteristics specific to App Engine -
|
198
|
+
# service, version, and instance. For more information about services, versions,
|
199
|
+
# and instances see [An Overview of App Engine](https://cloud.google.com/
|
200
|
+
# appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture
|
201
|
+
# on Google App Engine](https://cloud.google.com/appengine/docs/python/
|
202
|
+
# microservices-on-app-engine), [App Engine Standard request routing](https://
|
203
|
+
# cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and [
|
204
|
+
# App Engine Flex request routing](https://cloud.google.com/appengine/docs/
|
205
|
+
# flexible/python/how-requests-are-routed).
|
206
|
+
class AppEngineRouting
|
207
|
+
include Google::Apis::Core::Hashable
|
208
|
+
|
209
|
+
# Output only. The host that the task is sent to. For more information, see [How
|
210
|
+
# Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/
|
211
|
+
# how-requests-are-routed). The host is constructed as: * `host = [
|
212
|
+
# application_domain_name]` `| [service] + '.' + [application_domain_name]` `| [
|
213
|
+
# version] + '.' + [application_domain_name]` `| [version_dot_service]+ '.' + [
|
214
|
+
# application_domain_name]` `| [instance] + '.' + [application_domain_name]` `| [
|
215
|
+
# instance_dot_service] + '.' + [application_domain_name]` `| [
|
216
|
+
# instance_dot_version] + '.' + [application_domain_name]` `| [
|
217
|
+
# instance_dot_version_dot_service] + '.' + [application_domain_name]` * `
|
218
|
+
# application_domain_name` = The domain name of the app, for example .appspot.
|
219
|
+
# com, which is associated with the queue's project ID. Some tasks which were
|
220
|
+
# created using the App Engine SDK use a custom domain name. * `service =`
|
221
|
+
# service * `version =` version * `version_dot_service =` version `+ '.' +`
|
222
|
+
# service * `instance =` instance * `instance_dot_service =` instance `+ '.' +`
|
223
|
+
# service * `instance_dot_version =` instance `+ '.' +` version * `
|
224
|
+
# instance_dot_version_dot_service =` instance `+ '.' +` version `+ '.' +`
|
225
|
+
# service If service is empty, then the task will be sent to the service which
|
226
|
+
# is the default service when the task is attempted. If version is empty, then
|
227
|
+
# the task will be sent to the version which is the default version when the
|
228
|
+
# task is attempted. If instance is empty, then the task will be sent to an
|
229
|
+
# instance which is available when the task is attempted. If service, version,
|
230
|
+
# or instance is invalid, then the task will be sent to the default version of
|
231
|
+
# the default service when the task is attempted.
|
232
|
+
# Corresponds to the JSON property `host`
|
233
|
+
# @return [String]
|
234
|
+
attr_accessor :host
|
235
|
+
|
236
|
+
# App instance. By default, the task is sent to an instance which is available
|
237
|
+
# when the task is attempted. Requests can only be sent to a specific instance
|
238
|
+
# if [manual scaling is used in App Engine Standard](https://cloud.google.com/
|
239
|
+
# appengine/docs/python/an-overview-of-app-engine?hl=en_US#
|
240
|
+
# scaling_types_and_instance_classes). App Engine Flex does not support
|
241
|
+
# instances. For more information, see [App Engine Standard request routing](
|
242
|
+
# https://cloud.google.com/appengine/docs/standard/python/how-requests-are-
|
243
|
+
# routed) and [App Engine Flex request routing](https://cloud.google.com/
|
244
|
+
# appengine/docs/flexible/python/how-requests-are-routed).
|
245
|
+
# Corresponds to the JSON property `instance`
|
246
|
+
# @return [String]
|
247
|
+
attr_accessor :instance
|
248
|
+
|
249
|
+
# App service. By default, the task is sent to the service which is the default
|
250
|
+
# service when the task is attempted. For some queues or tasks which were
|
251
|
+
# created using the App Engine Task Queue API, host is not parsable into service,
|
252
|
+
# version, and instance. For example, some tasks which were created using the
|
253
|
+
# App Engine SDK use a custom domain name; custom domains are not parsed by
|
254
|
+
# Cloud Tasks. If host is not parsable, then service, version, and instance are
|
255
|
+
# the empty string.
|
256
|
+
# Corresponds to the JSON property `service`
|
257
|
+
# @return [String]
|
258
|
+
attr_accessor :service
|
259
|
+
|
260
|
+
# App version. By default, the task is sent to the version which is the default
|
261
|
+
# version when the task is attempted. For some queues or tasks which were
|
262
|
+
# created using the App Engine Task Queue API, host is not parsable into service,
|
263
|
+
# version, and instance. For example, some tasks which were created using the
|
264
|
+
# App Engine SDK use a custom domain name; custom domains are not parsed by
|
265
|
+
# Cloud Tasks. If host is not parsable, then service, version, and instance are
|
266
|
+
# the empty string.
|
267
|
+
# Corresponds to the JSON property `version`
|
268
|
+
# @return [String]
|
269
|
+
attr_accessor :version
|
270
|
+
|
271
|
+
def initialize(**args)
|
272
|
+
update!(**args)
|
273
|
+
end
|
274
|
+
|
275
|
+
# Update properties of this object
|
276
|
+
def update!(**args)
|
277
|
+
@host = args[:host] if args.key?(:host)
|
278
|
+
@instance = args[:instance] if args.key?(:instance)
|
279
|
+
@service = args[:service] if args.key?(:service)
|
280
|
+
@version = args[:version] if args.key?(:version)
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
# The status of a task attempt.
|
285
|
+
class AttemptStatus
|
286
|
+
include Google::Apis::Core::Hashable
|
287
|
+
|
288
|
+
# Output only. The time that this attempt was dispatched. `dispatch_time` will
|
289
|
+
# be truncated to the nearest microsecond.
|
290
|
+
# Corresponds to the JSON property `dispatchTime`
|
291
|
+
# @return [String]
|
292
|
+
attr_accessor :dispatch_time
|
293
|
+
|
294
|
+
# The `Status` type defines a logical error model that is suitable for different
|
295
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
296
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
297
|
+
# data: error code, error message, and error details. You can find out more
|
298
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
299
|
+
# //cloud.google.com/apis/design/errors).
|
300
|
+
# Corresponds to the JSON property `responseStatus`
|
301
|
+
# @return [Google::Apis::CloudtasksV2beta2::Status]
|
302
|
+
attr_accessor :response_status
|
303
|
+
|
304
|
+
# Output only. The time that this attempt response was received. `response_time`
|
305
|
+
# will be truncated to the nearest microsecond.
|
306
|
+
# Corresponds to the JSON property `responseTime`
|
307
|
+
# @return [String]
|
308
|
+
attr_accessor :response_time
|
309
|
+
|
310
|
+
# Output only. The time that this attempt was scheduled. `schedule_time` will be
|
311
|
+
# truncated to the nearest microsecond.
|
312
|
+
# Corresponds to the JSON property `scheduleTime`
|
313
|
+
# @return [String]
|
314
|
+
attr_accessor :schedule_time
|
315
|
+
|
316
|
+
def initialize(**args)
|
317
|
+
update!(**args)
|
318
|
+
end
|
319
|
+
|
320
|
+
# Update properties of this object
|
321
|
+
def update!(**args)
|
322
|
+
@dispatch_time = args[:dispatch_time] if args.key?(:dispatch_time)
|
323
|
+
@response_status = args[:response_status] if args.key?(:response_status)
|
324
|
+
@response_time = args[:response_time] if args.key?(:response_time)
|
325
|
+
@schedule_time = args[:schedule_time] if args.key?(:schedule_time)
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
# Associates `members` with a `role`.
|
330
|
+
class Binding
|
331
|
+
include Google::Apis::Core::Hashable
|
332
|
+
|
333
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
334
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
335
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
336
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
337
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
338
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
339
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
340
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
341
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
342
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
343
|
+
# string" description: "Create a notification string with a timestamp."
|
344
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
345
|
+
# exact variables and functions that may be referenced within an expression are
|
346
|
+
# determined by the service that evaluates it. See the service documentation for
|
347
|
+
# additional information.
|
348
|
+
# Corresponds to the JSON property `condition`
|
349
|
+
# @return [Google::Apis::CloudtasksV2beta2::Expr]
|
350
|
+
attr_accessor :condition
|
351
|
+
|
352
|
+
# Specifies the identities requesting access for a Cloud Platform resource. `
|
353
|
+
# members` can have the following values: * `allUsers`: A special identifier
|
354
|
+
# that represents anyone who is on the internet; with or without a Google
|
355
|
+
# account. * `allAuthenticatedUsers`: A special identifier that represents
|
356
|
+
# anyone who is authenticated with a Google account or a service account. * `
|
357
|
+
# user:`emailid``: An email address that represents a specific Google account.
|
358
|
+
# For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
|
359
|
+
# address that represents a service account. For example, `my-other-app@appspot.
|
360
|
+
# gserviceaccount.com`. * `group:`emailid``: An email address that represents a
|
361
|
+
# Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
|
362
|
+
# `uniqueid``: An email address (plus unique identifier) representing a user
|
363
|
+
# that has been recently deleted. For example, `alice@example.com?uid=
|
364
|
+
# 123456789012345678901`. If the user is recovered, this value reverts to `user:`
|
365
|
+
# emailid`` and the recovered user retains the role in the binding. * `deleted:
|
366
|
+
# serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
|
367
|
+
# identifier) representing a service account that has been recently deleted. For
|
368
|
+
# example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
|
369
|
+
# If the service account is undeleted, this value reverts to `serviceAccount:`
|
370
|
+
# emailid`` and the undeleted service account retains the role in the binding. *
|
371
|
+
# `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
|
372
|
+
# identifier) representing a Google group that has been recently deleted. For
|
373
|
+
# example, `admins@example.com?uid=123456789012345678901`. If the group is
|
374
|
+
# recovered, this value reverts to `group:`emailid`` and the recovered group
|
375
|
+
# retains the role in the binding. * `domain:`domain``: The G Suite domain (
|
376
|
+
# primary) that represents all the users of that domain. For example, `google.
|
377
|
+
# com` or `example.com`.
|
378
|
+
# Corresponds to the JSON property `members`
|
379
|
+
# @return [Array<String>]
|
380
|
+
attr_accessor :members
|
381
|
+
|
382
|
+
# Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
|
383
|
+
# , or `roles/owner`.
|
384
|
+
# Corresponds to the JSON property `role`
|
385
|
+
# @return [String]
|
386
|
+
attr_accessor :role
|
387
|
+
|
388
|
+
def initialize(**args)
|
389
|
+
update!(**args)
|
390
|
+
end
|
391
|
+
|
392
|
+
# Update properties of this object
|
393
|
+
def update!(**args)
|
394
|
+
@condition = args[:condition] if args.key?(:condition)
|
395
|
+
@members = args[:members] if args.key?(:members)
|
396
|
+
@role = args[:role] if args.key?(:role)
|
397
|
+
end
|
398
|
+
end
|
399
|
+
|
400
|
+
# Request message for canceling a lease using CancelLease.
|
401
|
+
class CancelLeaseRequest
|
402
|
+
include Google::Apis::Core::Hashable
|
403
|
+
|
404
|
+
# The response_view specifies which subset of the Task will be returned. By
|
405
|
+
# default response_view is BASIC; not all information is retrieved by default
|
406
|
+
# because some data, such as payloads, might be desirable to return only when
|
407
|
+
# needed because of its large size or because of the sensitivity of data that it
|
408
|
+
# contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google
|
409
|
+
# IAM](https://cloud.google.com/iam/) permission on the Task resource.
|
410
|
+
# Corresponds to the JSON property `responseView`
|
411
|
+
# @return [String]
|
412
|
+
attr_accessor :response_view
|
413
|
+
|
414
|
+
# Required. The task's current schedule time, available in the schedule_time
|
415
|
+
# returned by LeaseTasks response or RenewLease response. This restriction is to
|
416
|
+
# ensure that your worker currently holds the lease.
|
417
|
+
# Corresponds to the JSON property `scheduleTime`
|
418
|
+
# @return [String]
|
419
|
+
attr_accessor :schedule_time
|
420
|
+
|
421
|
+
def initialize(**args)
|
422
|
+
update!(**args)
|
423
|
+
end
|
424
|
+
|
425
|
+
# Update properties of this object
|
426
|
+
def update!(**args)
|
427
|
+
@response_view = args[:response_view] if args.key?(:response_view)
|
428
|
+
@schedule_time = args[:schedule_time] if args.key?(:schedule_time)
|
429
|
+
end
|
430
|
+
end
|
431
|
+
|
432
|
+
# Request message for CreateTask.
|
433
|
+
class CreateTaskRequest
|
434
|
+
include Google::Apis::Core::Hashable
|
435
|
+
|
436
|
+
# The response_view specifies which subset of the Task will be returned. By
|
437
|
+
# default response_view is BASIC; not all information is retrieved by default
|
438
|
+
# because some data, such as payloads, might be desirable to return only when
|
439
|
+
# needed because of its large size or because of the sensitivity of data that it
|
440
|
+
# contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google
|
441
|
+
# IAM](https://cloud.google.com/iam/) permission on the Task resource.
|
442
|
+
# Corresponds to the JSON property `responseView`
|
443
|
+
# @return [String]
|
444
|
+
attr_accessor :response_view
|
445
|
+
|
446
|
+
# A unit of scheduled work.
|
447
|
+
# Corresponds to the JSON property `task`
|
448
|
+
# @return [Google::Apis::CloudtasksV2beta2::Task]
|
449
|
+
attr_accessor :task
|
450
|
+
|
451
|
+
def initialize(**args)
|
452
|
+
update!(**args)
|
453
|
+
end
|
454
|
+
|
455
|
+
# Update properties of this object
|
456
|
+
def update!(**args)
|
457
|
+
@response_view = args[:response_view] if args.key?(:response_view)
|
458
|
+
@task = args[:task] if args.key?(:task)
|
459
|
+
end
|
460
|
+
end
|
461
|
+
|
462
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
463
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
464
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
465
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
466
|
+
# `Empty` is empty JSON object ````.
|
467
|
+
class Empty
|
468
|
+
include Google::Apis::Core::Hashable
|
469
|
+
|
470
|
+
def initialize(**args)
|
471
|
+
update!(**args)
|
472
|
+
end
|
473
|
+
|
474
|
+
# Update properties of this object
|
475
|
+
def update!(**args)
|
476
|
+
end
|
477
|
+
end
|
478
|
+
|
479
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
480
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
481
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
482
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
483
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
484
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
485
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
486
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
487
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
488
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
489
|
+
# string" description: "Create a notification string with a timestamp."
|
490
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
491
|
+
# exact variables and functions that may be referenced within an expression are
|
492
|
+
# determined by the service that evaluates it. See the service documentation for
|
493
|
+
# additional information.
|
494
|
+
class Expr
|
495
|
+
include Google::Apis::Core::Hashable
|
496
|
+
|
497
|
+
# Optional. Description of the expression. This is a longer text which describes
|
498
|
+
# the expression, e.g. when hovered over it in a UI.
|
499
|
+
# Corresponds to the JSON property `description`
|
500
|
+
# @return [String]
|
501
|
+
attr_accessor :description
|
502
|
+
|
503
|
+
# Textual representation of an expression in Common Expression Language syntax.
|
504
|
+
# Corresponds to the JSON property `expression`
|
505
|
+
# @return [String]
|
506
|
+
attr_accessor :expression
|
507
|
+
|
508
|
+
# Optional. String indicating the location of the expression for error reporting,
|
509
|
+
# e.g. a file name and a position in the file.
|
510
|
+
# Corresponds to the JSON property `location`
|
511
|
+
# @return [String]
|
512
|
+
attr_accessor :location
|
513
|
+
|
514
|
+
# Optional. Title for the expression, i.e. a short string describing its purpose.
|
515
|
+
# This can be used e.g. in UIs which allow to enter the expression.
|
516
|
+
# Corresponds to the JSON property `title`
|
517
|
+
# @return [String]
|
518
|
+
attr_accessor :title
|
519
|
+
|
520
|
+
def initialize(**args)
|
521
|
+
update!(**args)
|
522
|
+
end
|
523
|
+
|
524
|
+
# Update properties of this object
|
525
|
+
def update!(**args)
|
526
|
+
@description = args[:description] if args.key?(:description)
|
527
|
+
@expression = args[:expression] if args.key?(:expression)
|
528
|
+
@location = args[:location] if args.key?(:location)
|
529
|
+
@title = args[:title] if args.key?(:title)
|
530
|
+
end
|
531
|
+
end
|
532
|
+
|
533
|
+
# Request message for `GetIamPolicy` method.
|
534
|
+
class GetIamPolicyRequest
|
535
|
+
include Google::Apis::Core::Hashable
|
536
|
+
|
537
|
+
# Encapsulates settings provided to GetIamPolicy.
|
538
|
+
# Corresponds to the JSON property `options`
|
539
|
+
# @return [Google::Apis::CloudtasksV2beta2::GetPolicyOptions]
|
540
|
+
attr_accessor :options
|
541
|
+
|
542
|
+
def initialize(**args)
|
543
|
+
update!(**args)
|
544
|
+
end
|
545
|
+
|
546
|
+
# Update properties of this object
|
547
|
+
def update!(**args)
|
548
|
+
@options = args[:options] if args.key?(:options)
|
549
|
+
end
|
550
|
+
end
|
551
|
+
|
552
|
+
# Encapsulates settings provided to GetIamPolicy.
|
553
|
+
class GetPolicyOptions
|
554
|
+
include Google::Apis::Core::Hashable
|
555
|
+
|
556
|
+
# Optional. The policy format version to be returned. Valid values are 0, 1, and
|
557
|
+
# 3. Requests specifying an invalid value will be rejected. Requests for
|
558
|
+
# policies with any conditional bindings must specify version 3. Policies
|
559
|
+
# without any conditional bindings may specify any valid value or leave the
|
560
|
+
# field unset. To learn which resources support conditions in their IAM policies,
|
561
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
562
|
+
# resource-policies).
|
563
|
+
# Corresponds to the JSON property `requestedPolicyVersion`
|
564
|
+
# @return [Fixnum]
|
565
|
+
attr_accessor :requested_policy_version
|
566
|
+
|
567
|
+
def initialize(**args)
|
568
|
+
update!(**args)
|
569
|
+
end
|
570
|
+
|
571
|
+
# Update properties of this object
|
572
|
+
def update!(**args)
|
573
|
+
@requested_policy_version = args[:requested_policy_version] if args.key?(:requested_policy_version)
|
574
|
+
end
|
575
|
+
end
|
576
|
+
|
577
|
+
# Request message for leasing tasks using LeaseTasks.
|
578
|
+
class LeaseTasksRequest
|
579
|
+
include Google::Apis::Core::Hashable
|
580
|
+
|
581
|
+
# `filter` can be used to specify a subset of tasks to lease. When `filter` is
|
582
|
+
# set to `tag=` then the response will contain only tasks whose tag is equal to `
|
583
|
+
# `. `` must be less than 500 characters. When `filter` is set to `tag_function=
|
584
|
+
# oldest_tag()`, only tasks which have the same tag as the task with the oldest
|
585
|
+
# schedule_time will be returned. Grammar Syntax: * `filter = "tag=" tag | "
|
586
|
+
# tag_function=" function` * `tag = string` * `function = "oldest_tag()"` The `
|
587
|
+
# oldest_tag()` function returns tasks which have the same tag as the oldest
|
588
|
+
# task (ordered by schedule time). SDK compatibility: Although the SDK allows
|
589
|
+
# tags to be either string or [bytes](https://cloud.google.com/appengine/docs/
|
590
|
+
# standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-
|
591
|
+
# byte:A-), only UTF-8 encoded tags can be used in Cloud Tasks. Tag which aren't
|
592
|
+
# UTF-8 encoded can't be used in the filter and the task's tag will be displayed
|
593
|
+
# as empty in Cloud Tasks.
|
594
|
+
# Corresponds to the JSON property `filter`
|
595
|
+
# @return [String]
|
596
|
+
attr_accessor :filter
|
597
|
+
|
598
|
+
# Required. The duration of the lease. Each task returned in the response will
|
599
|
+
# have its schedule_time set to the current time plus the `lease_duration`. The
|
600
|
+
# task is leased until its schedule_time; thus, the task will not be returned to
|
601
|
+
# another LeaseTasks call before its schedule_time. After the worker has
|
602
|
+
# successfully finished the work associated with the task, the worker must call
|
603
|
+
# via AcknowledgeTask before the schedule_time. Otherwise the task will be
|
604
|
+
# returned to a later LeaseTasks call so that another worker can retry it. The
|
605
|
+
# maximum lease duration is 1 week. `lease_duration` will be truncated to the
|
606
|
+
# nearest second.
|
607
|
+
# Corresponds to the JSON property `leaseDuration`
|
608
|
+
# @return [String]
|
609
|
+
attr_accessor :lease_duration
|
610
|
+
|
611
|
+
# The maximum number of tasks to lease. The system will make a best effort to
|
612
|
+
# return as close to as `max_tasks` as possible. The largest that `max_tasks`
|
613
|
+
# can be is 1000. The maximum total size of a lease tasks response is 32 MB. If
|
614
|
+
# the sum of all task sizes requested reaches this limit, fewer tasks than
|
615
|
+
# requested are returned.
|
616
|
+
# Corresponds to the JSON property `maxTasks`
|
617
|
+
# @return [Fixnum]
|
618
|
+
attr_accessor :max_tasks
|
619
|
+
|
620
|
+
# The response_view specifies which subset of the Task will be returned. By
|
621
|
+
# default response_view is BASIC; not all information is retrieved by default
|
622
|
+
# because some data, such as payloads, might be desirable to return only when
|
623
|
+
# needed because of its large size or because of the sensitivity of data that it
|
624
|
+
# contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google
|
625
|
+
# IAM](https://cloud.google.com/iam/) permission on the Task resource.
|
626
|
+
# Corresponds to the JSON property `responseView`
|
627
|
+
# @return [String]
|
628
|
+
attr_accessor :response_view
|
629
|
+
|
630
|
+
def initialize(**args)
|
631
|
+
update!(**args)
|
632
|
+
end
|
633
|
+
|
634
|
+
# Update properties of this object
|
635
|
+
def update!(**args)
|
636
|
+
@filter = args[:filter] if args.key?(:filter)
|
637
|
+
@lease_duration = args[:lease_duration] if args.key?(:lease_duration)
|
638
|
+
@max_tasks = args[:max_tasks] if args.key?(:max_tasks)
|
639
|
+
@response_view = args[:response_view] if args.key?(:response_view)
|
640
|
+
end
|
641
|
+
end
|
642
|
+
|
643
|
+
# Response message for leasing tasks using LeaseTasks.
|
644
|
+
class LeaseTasksResponse
|
645
|
+
include Google::Apis::Core::Hashable
|
646
|
+
|
647
|
+
# The leased tasks.
|
648
|
+
# Corresponds to the JSON property `tasks`
|
649
|
+
# @return [Array<Google::Apis::CloudtasksV2beta2::Task>]
|
650
|
+
attr_accessor :tasks
|
651
|
+
|
652
|
+
def initialize(**args)
|
653
|
+
update!(**args)
|
654
|
+
end
|
655
|
+
|
656
|
+
# Update properties of this object
|
657
|
+
def update!(**args)
|
658
|
+
@tasks = args[:tasks] if args.key?(:tasks)
|
659
|
+
end
|
660
|
+
end
|
661
|
+
|
662
|
+
# The response message for Locations.ListLocations.
|
663
|
+
class ListLocationsResponse
|
664
|
+
include Google::Apis::Core::Hashable
|
665
|
+
|
666
|
+
# A list of locations that matches the specified filter in the request.
|
667
|
+
# Corresponds to the JSON property `locations`
|
668
|
+
# @return [Array<Google::Apis::CloudtasksV2beta2::Location>]
|
669
|
+
attr_accessor :locations
|
670
|
+
|
671
|
+
# The standard List next-page token.
|
672
|
+
# Corresponds to the JSON property `nextPageToken`
|
673
|
+
# @return [String]
|
674
|
+
attr_accessor :next_page_token
|
675
|
+
|
676
|
+
def initialize(**args)
|
677
|
+
update!(**args)
|
678
|
+
end
|
679
|
+
|
680
|
+
# Update properties of this object
|
681
|
+
def update!(**args)
|
682
|
+
@locations = args[:locations] if args.key?(:locations)
|
683
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
684
|
+
end
|
685
|
+
end
|
686
|
+
|
687
|
+
# Response message for ListQueues.
|
688
|
+
class ListQueuesResponse
|
689
|
+
include Google::Apis::Core::Hashable
|
690
|
+
|
691
|
+
# A token to retrieve next page of results. To return the next page of results,
|
692
|
+
# call ListQueues with this value as the page_token. If the next_page_token is
|
693
|
+
# empty, there are no more results. The page token is valid for only 2 hours.
|
694
|
+
# Corresponds to the JSON property `nextPageToken`
|
695
|
+
# @return [String]
|
696
|
+
attr_accessor :next_page_token
|
697
|
+
|
698
|
+
# The list of queues.
|
699
|
+
# Corresponds to the JSON property `queues`
|
700
|
+
# @return [Array<Google::Apis::CloudtasksV2beta2::Queue>]
|
701
|
+
attr_accessor :queues
|
702
|
+
|
703
|
+
def initialize(**args)
|
704
|
+
update!(**args)
|
705
|
+
end
|
706
|
+
|
707
|
+
# Update properties of this object
|
708
|
+
def update!(**args)
|
709
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
710
|
+
@queues = args[:queues] if args.key?(:queues)
|
711
|
+
end
|
712
|
+
end
|
713
|
+
|
714
|
+
# Response message for listing tasks using ListTasks.
|
715
|
+
class ListTasksResponse
|
716
|
+
include Google::Apis::Core::Hashable
|
717
|
+
|
718
|
+
# A token to retrieve next page of results. To return the next page of results,
|
719
|
+
# call ListTasks with this value as the page_token. If the next_page_token is
|
720
|
+
# empty, there are no more results.
|
721
|
+
# Corresponds to the JSON property `nextPageToken`
|
722
|
+
# @return [String]
|
723
|
+
attr_accessor :next_page_token
|
724
|
+
|
725
|
+
# The list of tasks.
|
726
|
+
# Corresponds to the JSON property `tasks`
|
727
|
+
# @return [Array<Google::Apis::CloudtasksV2beta2::Task>]
|
728
|
+
attr_accessor :tasks
|
729
|
+
|
730
|
+
def initialize(**args)
|
731
|
+
update!(**args)
|
732
|
+
end
|
733
|
+
|
734
|
+
# Update properties of this object
|
735
|
+
def update!(**args)
|
736
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
737
|
+
@tasks = args[:tasks] if args.key?(:tasks)
|
738
|
+
end
|
739
|
+
end
|
740
|
+
|
741
|
+
# A resource that represents Google Cloud Platform location.
|
742
|
+
class Location
|
743
|
+
include Google::Apis::Core::Hashable
|
744
|
+
|
745
|
+
# The friendly name for this location, typically a nearby city name. For example,
|
746
|
+
# "Tokyo".
|
747
|
+
# Corresponds to the JSON property `displayName`
|
748
|
+
# @return [String]
|
749
|
+
attr_accessor :display_name
|
750
|
+
|
751
|
+
# Cross-service attributes for the location. For example `"cloud.googleapis.com/
|
752
|
+
# region": "us-east1"`
|
753
|
+
# Corresponds to the JSON property `labels`
|
754
|
+
# @return [Hash<String,String>]
|
755
|
+
attr_accessor :labels
|
756
|
+
|
757
|
+
# The canonical id for this location. For example: `"us-east1"`.
|
758
|
+
# Corresponds to the JSON property `locationId`
|
759
|
+
# @return [String]
|
760
|
+
attr_accessor :location_id
|
761
|
+
|
762
|
+
# Service-specific metadata. For example the available capacity at the given
|
763
|
+
# location.
|
764
|
+
# Corresponds to the JSON property `metadata`
|
765
|
+
# @return [Hash<String,Object>]
|
766
|
+
attr_accessor :metadata
|
767
|
+
|
768
|
+
# Resource name for the location, which may vary between implementations. For
|
769
|
+
# example: `"projects/example-project/locations/us-east1"`
|
770
|
+
# Corresponds to the JSON property `name`
|
771
|
+
# @return [String]
|
772
|
+
attr_accessor :name
|
773
|
+
|
774
|
+
def initialize(**args)
|
775
|
+
update!(**args)
|
776
|
+
end
|
777
|
+
|
778
|
+
# Update properties of this object
|
779
|
+
def update!(**args)
|
780
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
781
|
+
@labels = args[:labels] if args.key?(:labels)
|
782
|
+
@location_id = args[:location_id] if args.key?(:location_id)
|
783
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
784
|
+
@name = args[:name] if args.key?(:name)
|
785
|
+
end
|
786
|
+
end
|
787
|
+
|
788
|
+
# Request message for PauseQueue.
|
789
|
+
class PauseQueueRequest
|
790
|
+
include Google::Apis::Core::Hashable
|
791
|
+
|
792
|
+
def initialize(**args)
|
793
|
+
update!(**args)
|
794
|
+
end
|
795
|
+
|
796
|
+
# Update properties of this object
|
797
|
+
def update!(**args)
|
798
|
+
end
|
799
|
+
end
|
800
|
+
|
801
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
802
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
803
|
+
# A `binding` binds one or more `members` to a single `role`. Members can be
|
804
|
+
# user accounts, service accounts, Google groups, and domains (such as G Suite).
|
805
|
+
# A `role` is a named list of permissions; each `role` can be an IAM predefined
|
806
|
+
# role or a user-created custom role. For some types of Google Cloud resources,
|
807
|
+
# a `binding` can also specify a `condition`, which is a logical expression that
|
808
|
+
# allows access to a resource only if the expression evaluates to `true`. A
|
809
|
+
# condition can add constraints based on attributes of the request, the resource,
|
810
|
+
# or both. To learn which resources support conditions in their IAM policies,
|
811
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
812
|
+
# resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
|
813
|
+
# resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
|
814
|
+
# group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
|
815
|
+
# appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
|
816
|
+
# organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
|
817
|
+
# title": "expirable access", "description": "Does not grant access after Sep
|
818
|
+
# 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
|
819
|
+
# ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
|
820
|
+
# members: - user:mike@example.com - group:admins@example.com - domain:google.
|
821
|
+
# com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
|
822
|
+
# resourcemanager.organizationAdmin - members: - user:eve@example.com role:
|
823
|
+
# roles/resourcemanager.organizationViewer condition: title: expirable access
|
824
|
+
# description: Does not grant access after Sep 2020 expression: request.time <
|
825
|
+
# timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
|
826
|
+
# description of IAM and its features, see the [IAM documentation](https://cloud.
|
827
|
+
# google.com/iam/docs/).
|
828
|
+
class Policy
|
829
|
+
include Google::Apis::Core::Hashable
|
830
|
+
|
831
|
+
# Associates a list of `members` to a `role`. Optionally, may specify a `
|
832
|
+
# condition` that determines how and when the `bindings` are applied. Each of
|
833
|
+
# the `bindings` must contain at least one member.
|
834
|
+
# Corresponds to the JSON property `bindings`
|
835
|
+
# @return [Array<Google::Apis::CloudtasksV2beta2::Binding>]
|
836
|
+
attr_accessor :bindings
|
837
|
+
|
838
|
+
# `etag` is used for optimistic concurrency control as a way to help prevent
|
839
|
+
# simultaneous updates of a policy from overwriting each other. It is strongly
|
840
|
+
# suggested that systems make use of the `etag` in the read-modify-write cycle
|
841
|
+
# to perform policy updates in order to avoid race conditions: An `etag` is
|
842
|
+
# returned in the response to `getIamPolicy`, and systems are expected to put
|
843
|
+
# that etag in the request to `setIamPolicy` to ensure that their change will be
|
844
|
+
# applied to the same version of the policy. **Important:** If you use IAM
|
845
|
+
# Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
|
846
|
+
# If you omit this field, then IAM allows you to overwrite a version `3` policy
|
847
|
+
# with a version `1` policy, and all of the conditions in the version `3` policy
|
848
|
+
# are lost.
|
849
|
+
# Corresponds to the JSON property `etag`
|
850
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
851
|
+
# @return [String]
|
852
|
+
attr_accessor :etag
|
853
|
+
|
854
|
+
# Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
|
855
|
+
# Requests that specify an invalid value are rejected. Any operation that
|
856
|
+
# affects conditional role bindings must specify version `3`. This requirement
|
857
|
+
# applies to the following operations: * Getting a policy that includes a
|
858
|
+
# conditional role binding * Adding a conditional role binding to a policy *
|
859
|
+
# Changing a conditional role binding in a policy * Removing any role binding,
|
860
|
+
# with or without a condition, from a policy that includes conditions **
|
861
|
+
# Important:** If you use IAM Conditions, you must include the `etag` field
|
862
|
+
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
|
863
|
+
# to overwrite a version `3` policy with a version `1` policy, and all of the
|
864
|
+
# conditions in the version `3` policy are lost. If a policy does not include
|
865
|
+
# any conditions, operations on that policy may specify any valid version or
|
866
|
+
# leave the field unset. To learn which resources support conditions in their
|
867
|
+
# IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
|
868
|
+
# conditions/resource-policies).
|
869
|
+
# Corresponds to the JSON property `version`
|
870
|
+
# @return [Fixnum]
|
871
|
+
attr_accessor :version
|
872
|
+
|
873
|
+
def initialize(**args)
|
874
|
+
update!(**args)
|
875
|
+
end
|
876
|
+
|
877
|
+
# Update properties of this object
|
878
|
+
def update!(**args)
|
879
|
+
@bindings = args[:bindings] if args.key?(:bindings)
|
880
|
+
@etag = args[:etag] if args.key?(:etag)
|
881
|
+
@version = args[:version] if args.key?(:version)
|
882
|
+
end
|
883
|
+
end
|
884
|
+
|
885
|
+
# The pull message contains data that can be used by the caller of LeaseTasks to
|
886
|
+
# process the task. This proto can only be used for tasks in a queue which has
|
887
|
+
# pull_target set.
|
888
|
+
class PullMessage
|
889
|
+
include Google::Apis::Core::Hashable
|
890
|
+
|
891
|
+
# A data payload consumed by the worker to execute the task.
|
892
|
+
# Corresponds to the JSON property `payload`
|
893
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
894
|
+
# @return [String]
|
895
|
+
attr_accessor :payload
|
896
|
+
|
897
|
+
# The task's tag. Tags allow similar tasks to be processed in a batch. If you
|
898
|
+
# label tasks with a tag, your worker can lease tasks with the same tag using
|
899
|
+
# filter. For example, if you want to aggregate the events associated with a
|
900
|
+
# specific user once a day, you could tag tasks with the user ID. The task's tag
|
901
|
+
# can only be set when the task is created. The tag must be less than 500
|
902
|
+
# characters. SDK compatibility: Although the SDK allows tags to be either
|
903
|
+
# string or [bytes](https://cloud.google.com/appengine/docs/standard/java/
|
904
|
+
# javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), only
|
905
|
+
# UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 encoded,
|
906
|
+
# the tag will be empty when the task is returned by Cloud Tasks.
|
907
|
+
# Corresponds to the JSON property `tag`
|
908
|
+
# @return [String]
|
909
|
+
attr_accessor :tag
|
910
|
+
|
911
|
+
def initialize(**args)
|
912
|
+
update!(**args)
|
913
|
+
end
|
914
|
+
|
915
|
+
# Update properties of this object
|
916
|
+
def update!(**args)
|
917
|
+
@payload = args[:payload] if args.key?(:payload)
|
918
|
+
@tag = args[:tag] if args.key?(:tag)
|
919
|
+
end
|
920
|
+
end
|
921
|
+
|
922
|
+
# Pull target.
|
923
|
+
class PullTarget
|
924
|
+
include Google::Apis::Core::Hashable
|
925
|
+
|
926
|
+
def initialize(**args)
|
927
|
+
update!(**args)
|
928
|
+
end
|
929
|
+
|
930
|
+
# Update properties of this object
|
931
|
+
def update!(**args)
|
932
|
+
end
|
933
|
+
end
|
934
|
+
|
935
|
+
# Request message for PurgeQueue.
|
936
|
+
class PurgeQueueRequest
|
937
|
+
include Google::Apis::Core::Hashable
|
938
|
+
|
939
|
+
def initialize(**args)
|
940
|
+
update!(**args)
|
941
|
+
end
|
942
|
+
|
943
|
+
# Update properties of this object
|
944
|
+
def update!(**args)
|
945
|
+
end
|
946
|
+
end
|
947
|
+
|
948
|
+
# A queue is a container of related tasks. Queues are configured to manage how
|
949
|
+
# those tasks are dispatched. Configurable properties include rate limits, retry
|
950
|
+
# options, target types, and others.
|
951
|
+
class Queue
|
952
|
+
include Google::Apis::Core::Hashable
|
953
|
+
|
954
|
+
# App Engine HTTP target. The task will be delivered to the App Engine
|
955
|
+
# application hostname specified by its AppEngineHttpTarget and
|
956
|
+
# AppEngineHttpRequest. The documentation for AppEngineHttpRequest explains how
|
957
|
+
# the task's host URL is constructed. Using AppEngineHttpTarget requires [`
|
958
|
+
# appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/
|
959
|
+
# access-control) Google IAM permission for the project and the following scope:
|
960
|
+
# `https://www.googleapis.com/auth/cloud-platform`
|
961
|
+
# Corresponds to the JSON property `appEngineHttpTarget`
|
962
|
+
# @return [Google::Apis::CloudtasksV2beta2::AppEngineHttpTarget]
|
963
|
+
attr_accessor :app_engine_http_target
|
964
|
+
|
965
|
+
# Caller-specified and required in CreateQueue, after which it becomes output
|
966
|
+
# only. The queue name. The queue name must have the following format: `projects/
|
967
|
+
# PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * `PROJECT_ID` can contain
|
968
|
+
# letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.).
|
969
|
+
# For more information, see [Identifying projects](https://cloud.google.com/
|
970
|
+
# resource-manager/docs/creating-managing-projects#identifying_projects) * `
|
971
|
+
# LOCATION_ID` is the canonical ID for the queue's location. The list of
|
972
|
+
# available locations can be obtained by calling ListLocations. For more
|
973
|
+
# information, see https://cloud.google.com/about/locations/. * `QUEUE_ID` can
|
974
|
+
# contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum
|
975
|
+
# length is 100 characters.
|
976
|
+
# Corresponds to the JSON property `name`
|
977
|
+
# @return [String]
|
978
|
+
attr_accessor :name
|
979
|
+
|
980
|
+
# Pull target.
|
981
|
+
# Corresponds to the JSON property `pullTarget`
|
982
|
+
# @return [Google::Apis::CloudtasksV2beta2::PullTarget]
|
983
|
+
attr_accessor :pull_target
|
984
|
+
|
985
|
+
# Output only. The last time this queue was purged. All tasks that were created
|
986
|
+
# before this time were purged. A queue can be purged using PurgeQueue, the [App
|
987
|
+
# Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/
|
988
|
+
# appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#
|
989
|
+
# purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest
|
990
|
+
# microsecond. Purge time will be unset if the queue has never been purged.
|
991
|
+
# Corresponds to the JSON property `purgeTime`
|
992
|
+
# @return [String]
|
993
|
+
attr_accessor :purge_time
|
994
|
+
|
995
|
+
# Rate limits. This message determines the maximum rate that tasks can be
|
996
|
+
# dispatched by a queue, regardless of whether the dispatch is a first task
|
997
|
+
# attempt or a retry. Note: The debugging command, RunTask, will run a task even
|
998
|
+
# if the queue has reached its RateLimits.
|
999
|
+
# Corresponds to the JSON property `rateLimits`
|
1000
|
+
# @return [Google::Apis::CloudtasksV2beta2::RateLimits]
|
1001
|
+
attr_accessor :rate_limits
|
1002
|
+
|
1003
|
+
# Retry config. These settings determine how a failed task attempt is retried.
|
1004
|
+
# Corresponds to the JSON property `retryConfig`
|
1005
|
+
# @return [Google::Apis::CloudtasksV2beta2::RetryConfig]
|
1006
|
+
attr_accessor :retry_config
|
1007
|
+
|
1008
|
+
# Output only. The state of the queue. `state` can only be changed by called
|
1009
|
+
# PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.
|
1010
|
+
# com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to
|
1011
|
+
# change `state`.
|
1012
|
+
# Corresponds to the JSON property `state`
|
1013
|
+
# @return [String]
|
1014
|
+
attr_accessor :state
|
1015
|
+
|
1016
|
+
# Statistics for a queue.
|
1017
|
+
# Corresponds to the JSON property `stats`
|
1018
|
+
# @return [Google::Apis::CloudtasksV2beta2::QueueStats]
|
1019
|
+
attr_accessor :stats
|
1020
|
+
|
1021
|
+
def initialize(**args)
|
1022
|
+
update!(**args)
|
1023
|
+
end
|
1024
|
+
|
1025
|
+
# Update properties of this object
|
1026
|
+
def update!(**args)
|
1027
|
+
@app_engine_http_target = args[:app_engine_http_target] if args.key?(:app_engine_http_target)
|
1028
|
+
@name = args[:name] if args.key?(:name)
|
1029
|
+
@pull_target = args[:pull_target] if args.key?(:pull_target)
|
1030
|
+
@purge_time = args[:purge_time] if args.key?(:purge_time)
|
1031
|
+
@rate_limits = args[:rate_limits] if args.key?(:rate_limits)
|
1032
|
+
@retry_config = args[:retry_config] if args.key?(:retry_config)
|
1033
|
+
@state = args[:state] if args.key?(:state)
|
1034
|
+
@stats = args[:stats] if args.key?(:stats)
|
1035
|
+
end
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
# Statistics for a queue.
|
1039
|
+
class QueueStats
|
1040
|
+
include Google::Apis::Core::Hashable
|
1041
|
+
|
1042
|
+
# Output only. The number of requests that the queue has dispatched but has not
|
1043
|
+
# received a reply for yet.
|
1044
|
+
# Corresponds to the JSON property `concurrentDispatchesCount`
|
1045
|
+
# @return [Fixnum]
|
1046
|
+
attr_accessor :concurrent_dispatches_count
|
1047
|
+
|
1048
|
+
# Output only. The current maximum number of tasks per second executed by the
|
1049
|
+
# queue. The maximum value of this variable is controlled by the RateLimits of
|
1050
|
+
# the Queue. However, this value could be less to avoid overloading the
|
1051
|
+
# endpoints tasks in the queue are targeting.
|
1052
|
+
# Corresponds to the JSON property `effectiveExecutionRate`
|
1053
|
+
# @return [Float]
|
1054
|
+
attr_accessor :effective_execution_rate
|
1055
|
+
|
1056
|
+
# Output only. The number of tasks that the queue has dispatched and received a
|
1057
|
+
# reply for during the last minute. This variable counts both successful and non-
|
1058
|
+
# successful executions.
|
1059
|
+
# Corresponds to the JSON property `executedLastMinuteCount`
|
1060
|
+
# @return [Fixnum]
|
1061
|
+
attr_accessor :executed_last_minute_count
|
1062
|
+
|
1063
|
+
# Output only. An estimation of the nearest time in the future where a task in
|
1064
|
+
# the queue is scheduled to be executed.
|
1065
|
+
# Corresponds to the JSON property `oldestEstimatedArrivalTime`
|
1066
|
+
# @return [String]
|
1067
|
+
attr_accessor :oldest_estimated_arrival_time
|
1068
|
+
|
1069
|
+
# Output only. An estimation of the number of tasks in the queue, that is, the
|
1070
|
+
# tasks in the queue that haven't been executed, the tasks in the queue which
|
1071
|
+
# the queue has dispatched but has not yet received a reply for, and the failed
|
1072
|
+
# tasks that the queue is retrying.
|
1073
|
+
# Corresponds to the JSON property `tasksCount`
|
1074
|
+
# @return [Fixnum]
|
1075
|
+
attr_accessor :tasks_count
|
1076
|
+
|
1077
|
+
def initialize(**args)
|
1078
|
+
update!(**args)
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# Update properties of this object
|
1082
|
+
def update!(**args)
|
1083
|
+
@concurrent_dispatches_count = args[:concurrent_dispatches_count] if args.key?(:concurrent_dispatches_count)
|
1084
|
+
@effective_execution_rate = args[:effective_execution_rate] if args.key?(:effective_execution_rate)
|
1085
|
+
@executed_last_minute_count = args[:executed_last_minute_count] if args.key?(:executed_last_minute_count)
|
1086
|
+
@oldest_estimated_arrival_time = args[:oldest_estimated_arrival_time] if args.key?(:oldest_estimated_arrival_time)
|
1087
|
+
@tasks_count = args[:tasks_count] if args.key?(:tasks_count)
|
1088
|
+
end
|
1089
|
+
end
|
1090
|
+
|
1091
|
+
# Rate limits. This message determines the maximum rate that tasks can be
|
1092
|
+
# dispatched by a queue, regardless of whether the dispatch is a first task
|
1093
|
+
# attempt or a retry. Note: The debugging command, RunTask, will run a task even
|
1094
|
+
# if the queue has reached its RateLimits.
|
1095
|
+
class RateLimits
|
1096
|
+
include Google::Apis::Core::Hashable
|
1097
|
+
|
1098
|
+
# The max burst size. Max burst size limits how fast tasks in queue are
|
1099
|
+
# processed when many tasks are in the queue and the rate is high. This field
|
1100
|
+
# allows the queue to have a high rate so processing starts shortly after a task
|
1101
|
+
# is enqueued, but still limits resource usage when many tasks are enqueued in a
|
1102
|
+
# short period of time. The [token bucket](https://wikipedia.org/wiki/
|
1103
|
+
# Token_Bucket) algorithm is used to control the rate of task dispatches. Each
|
1104
|
+
# queue has a token bucket that holds tokens, up to the maximum specified by `
|
1105
|
+
# max_burst_size`. Each time a task is dispatched, a token is removed from the
|
1106
|
+
# bucket. Tasks will be dispatched until the queue's bucket runs out of tokens.
|
1107
|
+
# The bucket will be continuously refilled with new tokens based on
|
1108
|
+
# max_dispatches_per_second. The default value of `max_burst_size` is picked by
|
1109
|
+
# Cloud Tasks based on the value of max_dispatches_per_second. The maximum value
|
1110
|
+
# of `max_burst_size` is 500. For App Engine queues that were created or updated
|
1111
|
+
# using `queue.yaml/xml`, `max_burst_size` is equal to [bucket_size](https://
|
1112
|
+
# cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
|
1113
|
+
# If UpdateQueue is called on a queue without explicitly setting a value for `
|
1114
|
+
# max_burst_size`, `max_burst_size` value will get updated if UpdateQueue is
|
1115
|
+
# updating max_dispatches_per_second.
|
1116
|
+
# Corresponds to the JSON property `maxBurstSize`
|
1117
|
+
# @return [Fixnum]
|
1118
|
+
attr_accessor :max_burst_size
|
1119
|
+
|
1120
|
+
# The maximum number of concurrent tasks that Cloud Tasks allows to be
|
1121
|
+
# dispatched for this queue. After this threshold has been reached, Cloud Tasks
|
1122
|
+
# stops dispatching tasks until the number of concurrent requests decreases. If
|
1123
|
+
# unspecified when the queue is created, Cloud Tasks will pick the default. The
|
1124
|
+
# maximum allowed value is 5,000. This field is output only for pull queues and
|
1125
|
+
# always -1, which indicates no limit. No other queue types can have `
|
1126
|
+
# max_concurrent_tasks` set to -1. This field has the same meaning as [
|
1127
|
+
# max_concurrent_requests in queue.yaml/xml](https://cloud.google.com/appengine/
|
1128
|
+
# docs/standard/python/config/queueref#max_concurrent_requests).
|
1129
|
+
# Corresponds to the JSON property `maxConcurrentTasks`
|
1130
|
+
# @return [Fixnum]
|
1131
|
+
attr_accessor :max_concurrent_tasks
|
1132
|
+
|
1133
|
+
# The maximum rate at which tasks are dispatched from this queue. If unspecified
|
1134
|
+
# when the queue is created, Cloud Tasks will pick the default. * For App Engine
|
1135
|
+
# queues, the maximum allowed value is 500. * This field is output only for pull
|
1136
|
+
# queues. In addition to the `max_tasks_dispatched_per_second` limit, a maximum
|
1137
|
+
# of 10 QPS of LeaseTasks requests are allowed per pull queue. This field has
|
1138
|
+
# the same meaning as [rate in queue.yaml/xml](https://cloud.google.com/
|
1139
|
+
# appengine/docs/standard/python/config/queueref#rate).
|
1140
|
+
# Corresponds to the JSON property `maxTasksDispatchedPerSecond`
|
1141
|
+
# @return [Float]
|
1142
|
+
attr_accessor :max_tasks_dispatched_per_second
|
1143
|
+
|
1144
|
+
def initialize(**args)
|
1145
|
+
update!(**args)
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
# Update properties of this object
|
1149
|
+
def update!(**args)
|
1150
|
+
@max_burst_size = args[:max_burst_size] if args.key?(:max_burst_size)
|
1151
|
+
@max_concurrent_tasks = args[:max_concurrent_tasks] if args.key?(:max_concurrent_tasks)
|
1152
|
+
@max_tasks_dispatched_per_second = args[:max_tasks_dispatched_per_second] if args.key?(:max_tasks_dispatched_per_second)
|
1153
|
+
end
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
# Request message for renewing a lease using RenewLease.
|
1157
|
+
class RenewLeaseRequest
|
1158
|
+
include Google::Apis::Core::Hashable
|
1159
|
+
|
1160
|
+
# Required. The desired new lease duration, starting from now. The maximum lease
|
1161
|
+
# duration is 1 week. `lease_duration` will be truncated to the nearest second.
|
1162
|
+
# Corresponds to the JSON property `leaseDuration`
|
1163
|
+
# @return [String]
|
1164
|
+
attr_accessor :lease_duration
|
1165
|
+
|
1166
|
+
# The response_view specifies which subset of the Task will be returned. By
|
1167
|
+
# default response_view is BASIC; not all information is retrieved by default
|
1168
|
+
# because some data, such as payloads, might be desirable to return only when
|
1169
|
+
# needed because of its large size or because of the sensitivity of data that it
|
1170
|
+
# contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google
|
1171
|
+
# IAM](https://cloud.google.com/iam/) permission on the Task resource.
|
1172
|
+
# Corresponds to the JSON property `responseView`
|
1173
|
+
# @return [String]
|
1174
|
+
attr_accessor :response_view
|
1175
|
+
|
1176
|
+
# Required. The task's current schedule time, available in the schedule_time
|
1177
|
+
# returned by LeaseTasks response or RenewLease response. This restriction is to
|
1178
|
+
# ensure that your worker currently holds the lease.
|
1179
|
+
# Corresponds to the JSON property `scheduleTime`
|
1180
|
+
# @return [String]
|
1181
|
+
attr_accessor :schedule_time
|
1182
|
+
|
1183
|
+
def initialize(**args)
|
1184
|
+
update!(**args)
|
1185
|
+
end
|
1186
|
+
|
1187
|
+
# Update properties of this object
|
1188
|
+
def update!(**args)
|
1189
|
+
@lease_duration = args[:lease_duration] if args.key?(:lease_duration)
|
1190
|
+
@response_view = args[:response_view] if args.key?(:response_view)
|
1191
|
+
@schedule_time = args[:schedule_time] if args.key?(:schedule_time)
|
1192
|
+
end
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
# Request message for ResumeQueue.
|
1196
|
+
class ResumeQueueRequest
|
1197
|
+
include Google::Apis::Core::Hashable
|
1198
|
+
|
1199
|
+
def initialize(**args)
|
1200
|
+
update!(**args)
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
# Update properties of this object
|
1204
|
+
def update!(**args)
|
1205
|
+
end
|
1206
|
+
end
|
1207
|
+
|
1208
|
+
# Retry config. These settings determine how a failed task attempt is retried.
|
1209
|
+
class RetryConfig
|
1210
|
+
include Google::Apis::Core::Hashable
|
1211
|
+
|
1212
|
+
# The maximum number of attempts for a task. Cloud Tasks will attempt the task `
|
1213
|
+
# max_attempts` times (that is, if the first attempt fails, then there will be `
|
1214
|
+
# max_attempts - 1` retries). Must be > 0.
|
1215
|
+
# Corresponds to the JSON property `maxAttempts`
|
1216
|
+
# @return [Fixnum]
|
1217
|
+
attr_accessor :max_attempts
|
1218
|
+
|
1219
|
+
# A task will be scheduled for retry between min_backoff and max_backoff
|
1220
|
+
# duration after it fails, if the queue's RetryConfig specifies that the task
|
1221
|
+
# should be retried. If unspecified when the queue is created, Cloud Tasks will
|
1222
|
+
# pick the default. This field is output only for pull queues. `max_backoff`
|
1223
|
+
# will be truncated to the nearest second. This field has the same meaning as [
|
1224
|
+
# max_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/
|
1225
|
+
# standard/python/config/queueref#retry_parameters).
|
1226
|
+
# Corresponds to the JSON property `maxBackoff`
|
1227
|
+
# @return [String]
|
1228
|
+
attr_accessor :max_backoff
|
1229
|
+
|
1230
|
+
# The time between retries will double `max_doublings` times. A task's retry
|
1231
|
+
# interval starts at min_backoff, then doubles `max_doublings` times, then
|
1232
|
+
# increases linearly, and finally retries at intervals of max_backoff up to
|
1233
|
+
# max_attempts times. For example, if min_backoff is 10s, max_backoff is 300s,
|
1234
|
+
# and `max_doublings` is 3, then the a task will first be retried in 10s. The
|
1235
|
+
# retry interval will double three times, and then increase linearly by 2^3 *
|
1236
|
+
# 10s. Finally, the task will retry at intervals of max_backoff until the task
|
1237
|
+
# has been attempted max_attempts times. Thus, the requests will retry at 10s,
|
1238
|
+
# 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... If unspecified when the queue is
|
1239
|
+
# created, Cloud Tasks will pick the default. This field is output only for pull
|
1240
|
+
# queues. This field has the same meaning as [max_doublings in queue.yaml/xml](
|
1241
|
+
# https://cloud.google.com/appengine/docs/standard/python/config/queueref#
|
1242
|
+
# retry_parameters).
|
1243
|
+
# Corresponds to the JSON property `maxDoublings`
|
1244
|
+
# @return [Fixnum]
|
1245
|
+
attr_accessor :max_doublings
|
1246
|
+
|
1247
|
+
# If positive, `max_retry_duration` specifies the time limit for retrying a
|
1248
|
+
# failed task, measured from when the task was first attempted. Once `
|
1249
|
+
# max_retry_duration` time has passed *and* the task has been attempted
|
1250
|
+
# max_attempts times, no further attempts will be made and the task will be
|
1251
|
+
# deleted. If zero, then the task age is unlimited. If unspecified when the
|
1252
|
+
# queue is created, Cloud Tasks will pick the default. This field is output only
|
1253
|
+
# for pull queues. `max_retry_duration` will be truncated to the nearest second.
|
1254
|
+
# This field has the same meaning as [task_age_limit in queue.yaml/xml](https://
|
1255
|
+
# cloud.google.com/appengine/docs/standard/python/config/queueref#
|
1256
|
+
# retry_parameters).
|
1257
|
+
# Corresponds to the JSON property `maxRetryDuration`
|
1258
|
+
# @return [String]
|
1259
|
+
attr_accessor :max_retry_duration
|
1260
|
+
|
1261
|
+
# A task will be scheduled for retry between min_backoff and max_backoff
|
1262
|
+
# duration after it fails, if the queue's RetryConfig specifies that the task
|
1263
|
+
# should be retried. If unspecified when the queue is created, Cloud Tasks will
|
1264
|
+
# pick the default. This field is output only for pull queues. `min_backoff`
|
1265
|
+
# will be truncated to the nearest second. This field has the same meaning as [
|
1266
|
+
# min_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/
|
1267
|
+
# standard/python/config/queueref#retry_parameters).
|
1268
|
+
# Corresponds to the JSON property `minBackoff`
|
1269
|
+
# @return [String]
|
1270
|
+
attr_accessor :min_backoff
|
1271
|
+
|
1272
|
+
# If true, then the number of attempts is unlimited.
|
1273
|
+
# Corresponds to the JSON property `unlimitedAttempts`
|
1274
|
+
# @return [Boolean]
|
1275
|
+
attr_accessor :unlimited_attempts
|
1276
|
+
alias_method :unlimited_attempts?, :unlimited_attempts
|
1277
|
+
|
1278
|
+
def initialize(**args)
|
1279
|
+
update!(**args)
|
1280
|
+
end
|
1281
|
+
|
1282
|
+
# Update properties of this object
|
1283
|
+
def update!(**args)
|
1284
|
+
@max_attempts = args[:max_attempts] if args.key?(:max_attempts)
|
1285
|
+
@max_backoff = args[:max_backoff] if args.key?(:max_backoff)
|
1286
|
+
@max_doublings = args[:max_doublings] if args.key?(:max_doublings)
|
1287
|
+
@max_retry_duration = args[:max_retry_duration] if args.key?(:max_retry_duration)
|
1288
|
+
@min_backoff = args[:min_backoff] if args.key?(:min_backoff)
|
1289
|
+
@unlimited_attempts = args[:unlimited_attempts] if args.key?(:unlimited_attempts)
|
1290
|
+
end
|
1291
|
+
end
|
1292
|
+
|
1293
|
+
# Request message for forcing a task to run now using RunTask.
|
1294
|
+
class RunTaskRequest
|
1295
|
+
include Google::Apis::Core::Hashable
|
1296
|
+
|
1297
|
+
# The response_view specifies which subset of the Task will be returned. By
|
1298
|
+
# default response_view is BASIC; not all information is retrieved by default
|
1299
|
+
# because some data, such as payloads, might be desirable to return only when
|
1300
|
+
# needed because of its large size or because of the sensitivity of data that it
|
1301
|
+
# contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google
|
1302
|
+
# IAM](https://cloud.google.com/iam/) permission on the Task resource.
|
1303
|
+
# Corresponds to the JSON property `responseView`
|
1304
|
+
# @return [String]
|
1305
|
+
attr_accessor :response_view
|
1306
|
+
|
1307
|
+
def initialize(**args)
|
1308
|
+
update!(**args)
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
# Update properties of this object
|
1312
|
+
def update!(**args)
|
1313
|
+
@response_view = args[:response_view] if args.key?(:response_view)
|
1314
|
+
end
|
1315
|
+
end
|
1316
|
+
|
1317
|
+
# Request message for `SetIamPolicy` method.
|
1318
|
+
class SetIamPolicyRequest
|
1319
|
+
include Google::Apis::Core::Hashable
|
1320
|
+
|
1321
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
1322
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
1323
|
+
# A `binding` binds one or more `members` to a single `role`. Members can be
|
1324
|
+
# user accounts, service accounts, Google groups, and domains (such as G Suite).
|
1325
|
+
# A `role` is a named list of permissions; each `role` can be an IAM predefined
|
1326
|
+
# role or a user-created custom role. For some types of Google Cloud resources,
|
1327
|
+
# a `binding` can also specify a `condition`, which is a logical expression that
|
1328
|
+
# allows access to a resource only if the expression evaluates to `true`. A
|
1329
|
+
# condition can add constraints based on attributes of the request, the resource,
|
1330
|
+
# or both. To learn which resources support conditions in their IAM policies,
|
1331
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
1332
|
+
# resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
|
1333
|
+
# resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
|
1334
|
+
# group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
|
1335
|
+
# appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
|
1336
|
+
# organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
|
1337
|
+
# title": "expirable access", "description": "Does not grant access after Sep
|
1338
|
+
# 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
|
1339
|
+
# ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
|
1340
|
+
# members: - user:mike@example.com - group:admins@example.com - domain:google.
|
1341
|
+
# com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
|
1342
|
+
# resourcemanager.organizationAdmin - members: - user:eve@example.com role:
|
1343
|
+
# roles/resourcemanager.organizationViewer condition: title: expirable access
|
1344
|
+
# description: Does not grant access after Sep 2020 expression: request.time <
|
1345
|
+
# timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
|
1346
|
+
# description of IAM and its features, see the [IAM documentation](https://cloud.
|
1347
|
+
# google.com/iam/docs/).
|
1348
|
+
# Corresponds to the JSON property `policy`
|
1349
|
+
# @return [Google::Apis::CloudtasksV2beta2::Policy]
|
1350
|
+
attr_accessor :policy
|
1351
|
+
|
1352
|
+
def initialize(**args)
|
1353
|
+
update!(**args)
|
1354
|
+
end
|
1355
|
+
|
1356
|
+
# Update properties of this object
|
1357
|
+
def update!(**args)
|
1358
|
+
@policy = args[:policy] if args.key?(:policy)
|
1359
|
+
end
|
1360
|
+
end
|
1361
|
+
|
1362
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1363
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1364
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1365
|
+
# data: error code, error message, and error details. You can find out more
|
1366
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1367
|
+
# //cloud.google.com/apis/design/errors).
|
1368
|
+
class Status
|
1369
|
+
include Google::Apis::Core::Hashable
|
1370
|
+
|
1371
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
1372
|
+
# Corresponds to the JSON property `code`
|
1373
|
+
# @return [Fixnum]
|
1374
|
+
attr_accessor :code
|
1375
|
+
|
1376
|
+
# A list of messages that carry the error details. There is a common set of
|
1377
|
+
# message types for APIs to use.
|
1378
|
+
# Corresponds to the JSON property `details`
|
1379
|
+
# @return [Array<Hash<String,Object>>]
|
1380
|
+
attr_accessor :details
|
1381
|
+
|
1382
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
1383
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
1384
|
+
# field, or localized by the client.
|
1385
|
+
# Corresponds to the JSON property `message`
|
1386
|
+
# @return [String]
|
1387
|
+
attr_accessor :message
|
1388
|
+
|
1389
|
+
def initialize(**args)
|
1390
|
+
update!(**args)
|
1391
|
+
end
|
1392
|
+
|
1393
|
+
# Update properties of this object
|
1394
|
+
def update!(**args)
|
1395
|
+
@code = args[:code] if args.key?(:code)
|
1396
|
+
@details = args[:details] if args.key?(:details)
|
1397
|
+
@message = args[:message] if args.key?(:message)
|
1398
|
+
end
|
1399
|
+
end
|
1400
|
+
|
1401
|
+
# A unit of scheduled work.
|
1402
|
+
class Task
|
1403
|
+
include Google::Apis::Core::Hashable
|
1404
|
+
|
1405
|
+
# App Engine HTTP request. The message defines the HTTP request that is sent to
|
1406
|
+
# an App Engine app when the task is dispatched. This proto can only be used for
|
1407
|
+
# tasks in a queue which has app_engine_http_target set. Using
|
1408
|
+
# AppEngineHttpRequest requires [`appengine.applications.get`](https://cloud.
|
1409
|
+
# google.com/appengine/docs/admin-api/access-control) Google IAM permission for
|
1410
|
+
# the project and the following scope: `https://www.googleapis.com/auth/cloud-
|
1411
|
+
# platform` The task will be delivered to the App Engine app which belongs to
|
1412
|
+
# the same project as the queue. For more information, see [How Requests are
|
1413
|
+
# Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-
|
1414
|
+
# are-routed) and how routing is affected by [dispatch files](https://cloud.
|
1415
|
+
# google.com/appengine/docs/python/config/dispatchref). Traffic is encrypted
|
1416
|
+
# during transport and never leaves Google datacenters. Because this traffic is
|
1417
|
+
# carried over a communication mechanism internal to Google, you cannot
|
1418
|
+
# explicitly set the protocol (for example, HTTP or HTTPS). The request to the
|
1419
|
+
# handler, however, will appear to have used the HTTP protocol. The
|
1420
|
+
# AppEngineRouting used to construct the URL that the task is delivered to can
|
1421
|
+
# be set at the queue-level or task-level: * If set, app_engine_routing_override
|
1422
|
+
# is used for all tasks in the queue, no matter what the setting is for the task-
|
1423
|
+
# level app_engine_routing. The `url` that the task will be sent to is: * `url =`
|
1424
|
+
# host `+` relative_url Tasks can be dispatched to secure app handlers,
|
1425
|
+
# unsecure app handlers, and URIs restricted with [`login: admin`](https://cloud.
|
1426
|
+
# google.com/appengine/docs/standard/python/config/appref). Because tasks are
|
1427
|
+
# not run as any user, they cannot be dispatched to URIs restricted with [`login:
|
1428
|
+
# required`](https://cloud.google.com/appengine/docs/standard/python/config/
|
1429
|
+
# appref) Task dispatches also do not follow redirects. The task attempt has
|
1430
|
+
# succeeded if the app's request handler returns an HTTP response code in the
|
1431
|
+
# range [`200` - `299`]. The task attempt has failed if the app's handler
|
1432
|
+
# returns a non-2xx response code or Cloud Tasks does not receive response
|
1433
|
+
# before the deadline. Failed tasks will be retried according to the retry
|
1434
|
+
# configuration. `503` (Service Unavailable) is considered an App Engine system
|
1435
|
+
# error instead of an application error and will cause Cloud Tasks' traffic
|
1436
|
+
# congestion control to temporarily throttle the queue's dispatches. Unlike
|
1437
|
+
# other types of task targets, a `429` (Too Many Requests) response from an app
|
1438
|
+
# handler does not cause traffic congestion control to throttle the queue.
|
1439
|
+
# Corresponds to the JSON property `appEngineHttpRequest`
|
1440
|
+
# @return [Google::Apis::CloudtasksV2beta2::AppEngineHttpRequest]
|
1441
|
+
attr_accessor :app_engine_http_request
|
1442
|
+
|
1443
|
+
# Output only. The time that the task was created. `create_time` will be
|
1444
|
+
# truncated to the nearest second.
|
1445
|
+
# Corresponds to the JSON property `createTime`
|
1446
|
+
# @return [String]
|
1447
|
+
attr_accessor :create_time
|
1448
|
+
|
1449
|
+
# Optionally caller-specified in CreateTask. The task name. The task name must
|
1450
|
+
# have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/
|
1451
|
+
# QUEUE_ID/tasks/TASK_ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers
|
1452
|
+
# ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see [
|
1453
|
+
# Identifying projects](https://cloud.google.com/resource-manager/docs/creating-
|
1454
|
+
# managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID
|
1455
|
+
# for the task's location. The list of available locations can be obtained by
|
1456
|
+
# calling ListLocations. For more information, see https://cloud.google.com/
|
1457
|
+
# about/locations/. * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
|
1458
|
+
# or hyphens (-). The maximum length is 100 characters. * `TASK_ID` can contain
|
1459
|
+
# only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The
|
1460
|
+
# maximum length is 500 characters.
|
1461
|
+
# Corresponds to the JSON property `name`
|
1462
|
+
# @return [String]
|
1463
|
+
attr_accessor :name
|
1464
|
+
|
1465
|
+
# The pull message contains data that can be used by the caller of LeaseTasks to
|
1466
|
+
# process the task. This proto can only be used for tasks in a queue which has
|
1467
|
+
# pull_target set.
|
1468
|
+
# Corresponds to the JSON property `pullMessage`
|
1469
|
+
# @return [Google::Apis::CloudtasksV2beta2::PullMessage]
|
1470
|
+
attr_accessor :pull_message
|
1471
|
+
|
1472
|
+
# The time when the task is scheduled to be attempted. For App Engine queues,
|
1473
|
+
# this is when the task will be attempted or retried. For pull queues, this is
|
1474
|
+
# the time when the task is available to be leased; if a task is currently
|
1475
|
+
# leased, this is the time when the current lease expires, that is, the time
|
1476
|
+
# that the task was leased plus the lease_duration. `schedule_time` will be
|
1477
|
+
# truncated to the nearest microsecond.
|
1478
|
+
# Corresponds to the JSON property `scheduleTime`
|
1479
|
+
# @return [String]
|
1480
|
+
attr_accessor :schedule_time
|
1481
|
+
|
1482
|
+
# Status of the task.
|
1483
|
+
# Corresponds to the JSON property `status`
|
1484
|
+
# @return [Google::Apis::CloudtasksV2beta2::TaskStatus]
|
1485
|
+
attr_accessor :status
|
1486
|
+
|
1487
|
+
# Output only. The view specifies which subset of the Task has been returned.
|
1488
|
+
# Corresponds to the JSON property `view`
|
1489
|
+
# @return [String]
|
1490
|
+
attr_accessor :view
|
1491
|
+
|
1492
|
+
def initialize(**args)
|
1493
|
+
update!(**args)
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
# Update properties of this object
|
1497
|
+
def update!(**args)
|
1498
|
+
@app_engine_http_request = args[:app_engine_http_request] if args.key?(:app_engine_http_request)
|
1499
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
1500
|
+
@name = args[:name] if args.key?(:name)
|
1501
|
+
@pull_message = args[:pull_message] if args.key?(:pull_message)
|
1502
|
+
@schedule_time = args[:schedule_time] if args.key?(:schedule_time)
|
1503
|
+
@status = args[:status] if args.key?(:status)
|
1504
|
+
@view = args[:view] if args.key?(:view)
|
1505
|
+
end
|
1506
|
+
end
|
1507
|
+
|
1508
|
+
# Status of the task.
|
1509
|
+
class TaskStatus
|
1510
|
+
include Google::Apis::Core::Hashable
|
1511
|
+
|
1512
|
+
# Output only. The number of attempts dispatched. This count includes attempts
|
1513
|
+
# which have been dispatched but haven't received a response.
|
1514
|
+
# Corresponds to the JSON property `attemptDispatchCount`
|
1515
|
+
# @return [Fixnum]
|
1516
|
+
attr_accessor :attempt_dispatch_count
|
1517
|
+
|
1518
|
+
# Output only. The number of attempts which have received a response. This field
|
1519
|
+
# is not calculated for pull tasks.
|
1520
|
+
# Corresponds to the JSON property `attemptResponseCount`
|
1521
|
+
# @return [Fixnum]
|
1522
|
+
attr_accessor :attempt_response_count
|
1523
|
+
|
1524
|
+
# The status of a task attempt.
|
1525
|
+
# Corresponds to the JSON property `firstAttemptStatus`
|
1526
|
+
# @return [Google::Apis::CloudtasksV2beta2::AttemptStatus]
|
1527
|
+
attr_accessor :first_attempt_status
|
1528
|
+
|
1529
|
+
# The status of a task attempt.
|
1530
|
+
# Corresponds to the JSON property `lastAttemptStatus`
|
1531
|
+
# @return [Google::Apis::CloudtasksV2beta2::AttemptStatus]
|
1532
|
+
attr_accessor :last_attempt_status
|
1533
|
+
|
1534
|
+
def initialize(**args)
|
1535
|
+
update!(**args)
|
1536
|
+
end
|
1537
|
+
|
1538
|
+
# Update properties of this object
|
1539
|
+
def update!(**args)
|
1540
|
+
@attempt_dispatch_count = args[:attempt_dispatch_count] if args.key?(:attempt_dispatch_count)
|
1541
|
+
@attempt_response_count = args[:attempt_response_count] if args.key?(:attempt_response_count)
|
1542
|
+
@first_attempt_status = args[:first_attempt_status] if args.key?(:first_attempt_status)
|
1543
|
+
@last_attempt_status = args[:last_attempt_status] if args.key?(:last_attempt_status)
|
1544
|
+
end
|
1545
|
+
end
|
1546
|
+
|
1547
|
+
# Request message for `TestIamPermissions` method.
|
1548
|
+
class TestIamPermissionsRequest
|
1549
|
+
include Google::Apis::Core::Hashable
|
1550
|
+
|
1551
|
+
# The set of permissions to check for the `resource`. Permissions with wildcards
|
1552
|
+
# (such as '*' or 'storage.*') are not allowed. For more information see [IAM
|
1553
|
+
# Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
1554
|
+
# Corresponds to the JSON property `permissions`
|
1555
|
+
# @return [Array<String>]
|
1556
|
+
attr_accessor :permissions
|
1557
|
+
|
1558
|
+
def initialize(**args)
|
1559
|
+
update!(**args)
|
1560
|
+
end
|
1561
|
+
|
1562
|
+
# Update properties of this object
|
1563
|
+
def update!(**args)
|
1564
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
1565
|
+
end
|
1566
|
+
end
|
1567
|
+
|
1568
|
+
# Response message for `TestIamPermissions` method.
|
1569
|
+
class TestIamPermissionsResponse
|
1570
|
+
include Google::Apis::Core::Hashable
|
1571
|
+
|
1572
|
+
# A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
|
1573
|
+
# Corresponds to the JSON property `permissions`
|
1574
|
+
# @return [Array<String>]
|
1575
|
+
attr_accessor :permissions
|
1576
|
+
|
1577
|
+
def initialize(**args)
|
1578
|
+
update!(**args)
|
1579
|
+
end
|
1580
|
+
|
1581
|
+
# Update properties of this object
|
1582
|
+
def update!(**args)
|
1583
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
1584
|
+
end
|
1585
|
+
end
|
1586
|
+
end
|
1587
|
+
end
|
1588
|
+
end
|