google-apis-cloudtasks_v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1dbf738b07847a9ba0e5f37e7884e291a33a90a81ca9969fcf60352562a37794
4
+ data.tar.gz: 348b9add86b5a8c3c43d0d0d3ec4d8a9aeb86acca43259d893c7767e6f109249
5
+ SHA512:
6
+ metadata.gz: e108583a93c7cc6b3d4d58d45fad44eeab385f29efa57cab6e8fbf4640c65797a703878d4e4c070ee87fdf551e3fe6b3290217f4d9838c1c73d997fb2abd4558
7
+ data.tar.gz: f2ff3811e67081eaf91b183aaed765750684623a4c526dfb54db3a41041a7d46e2ec8703abe28141a2ee4b5ede5c59ba06f476cda428c49690ce7260ea149ee2
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-cloudtasks_v2
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/cloudtasks_v2/*.rb
9
+ lib/google/apis/cloudtasks_v2.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-cloudtasks_v2
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201111
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V2 of the Cloud Tasks API
2
+
3
+ This is a simple client library for version V2 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_v2', '~> 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_v2
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_v2"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::CloudtasksV2::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::CloudtasksV2::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_v2`, 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_v2"
@@ -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_v2/service.rb'
16
+ require 'google/apis/cloudtasks_v2/classes.rb'
17
+ require 'google/apis/cloudtasks_v2/representations.rb'
18
+ require 'google/apis/cloudtasks_v2/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 CloudtasksV2
28
+ # Version of the Cloud Tasks API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V2'
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,1444 @@
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 CloudtasksV2
24
+
25
+ # App Engine HTTP request. The message defines the HTTP request that is sent to
26
+ # an App Engine app when the task is dispatched. Using AppEngineHttpRequest
27
+ # requires [`appengine.applications.get`](https://cloud.google.com/appengine/
28
+ # docs/admin-api/access-control) Google IAM permission for the project and the
29
+ # following scope: `https://www.googleapis.com/auth/cloud-platform` The task
30
+ # will be delivered to the App Engine app which belongs to the same project as
31
+ # the queue. For more information, see [How Requests are Routed](https://cloud.
32
+ # google.com/appengine/docs/standard/python/how-requests-are-routed) and how
33
+ # routing is affected by [dispatch files](https://cloud.google.com/appengine/
34
+ # docs/python/config/dispatchref). Traffic is encrypted during transport and
35
+ # never leaves Google datacenters. Because this traffic is carried over a
36
+ # communication mechanism internal to Google, you cannot explicitly set the
37
+ # protocol (for example, HTTP or HTTPS). The request to the handler, however,
38
+ # will appear to have used the HTTP protocol. The AppEngineRouting used to
39
+ # construct the URL that the task is delivered to can be set at the queue-level
40
+ # or task-level: * If app_engine_routing_override is set on the queue, this
41
+ # value is used for all tasks in the queue, no matter what the setting is for
42
+ # the task-level app_engine_routing. The `url` that the task will be sent to is:
43
+ # * `url =` host `+` relative_uri Tasks can be dispatched to secure app handlers,
44
+ # unsecure app handlers, and URIs restricted with [`login: admin`](https://
45
+ # cloud.google.com/appengine/docs/standard/python/config/appref). Because tasks
46
+ # are not run as any user, they cannot be dispatched to URIs restricted with [`
47
+ # login: required`](https://cloud.google.com/appengine/docs/standard/python/
48
+ # config/appref) Task dispatches also do not follow redirects. The task attempt
49
+ # has succeeded if the app's request handler returns an HTTP response code in
50
+ # the range [`200` - `299`]. The task attempt has failed if the app's handler
51
+ # returns a non-2xx response code or Cloud Tasks does not receive response
52
+ # before the deadline. Failed tasks will be retried according to the retry
53
+ # configuration. `503` (Service Unavailable) is considered an App Engine system
54
+ # error instead of an application error and will cause Cloud Tasks' traffic
55
+ # congestion control to temporarily throttle the queue's dispatches. Unlike
56
+ # other types of task targets, a `429` (Too Many Requests) response from an app
57
+ # handler does not cause traffic congestion control to throttle the queue.
58
+ class AppEngineHttpRequest
59
+ include Google::Apis::Core::Hashable
60
+
61
+ # App Engine Routing. Defines routing characteristics specific to App Engine -
62
+ # service, version, and instance. For more information about services, versions,
63
+ # and instances see [An Overview of App Engine](https://cloud.google.com/
64
+ # appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture
65
+ # on Google App Engine](https://cloud.google.com/appengine/docs/python/
66
+ # microservices-on-app-engine), [App Engine Standard request routing](https://
67
+ # cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and [
68
+ # App Engine Flex request routing](https://cloud.google.com/appengine/docs/
69
+ # flexible/python/how-requests-are-routed). Using AppEngineRouting requires [`
70
+ # appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/
71
+ # access-control) Google IAM permission for the project and the following scope:
72
+ # `https://www.googleapis.com/auth/cloud-platform`
73
+ # Corresponds to the JSON property `appEngineRouting`
74
+ # @return [Google::Apis::CloudtasksV2::AppEngineRouting]
75
+ attr_accessor :app_engine_routing
76
+
77
+ # HTTP request body. A request body is allowed only if the HTTP method is POST
78
+ # or PUT. It is an error to set a body on a task with an incompatible HttpMethod.
79
+ # Corresponds to the JSON property `body`
80
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
81
+ # @return [String]
82
+ attr_accessor :body
83
+
84
+ # HTTP request headers. This map contains the header field names and values.
85
+ # Headers can be set when the task is created. Repeated headers are not
86
+ # supported but a header value can contain commas. Cloud Tasks sets some headers
87
+ # to default values: * `User-Agent`: By default, this header is `"AppEngine-
88
+ # Google; (+http://code.google.com/appengine)"`. This header can be modified,
89
+ # but Cloud Tasks will append `"AppEngine-Google; (+http://code.google.com/
90
+ # appengine)"` to the modified `User-Agent`. If the task has a body, Cloud Tasks
91
+ # sets the following headers: * `Content-Type`: By default, the `Content-Type`
92
+ # header is set to `"application/octet-stream"`. The default can be overridden
93
+ # by explicitly setting `Content-Type` to a particular media type when the task
94
+ # is created. For example, `Content-Type` can be set to `"application/json"`. * `
95
+ # Content-Length`: This is computed by Cloud Tasks. This value is output only.
96
+ # It cannot be changed. The headers below cannot be set or overridden: * `Host` *
97
+ # `X-Google-*` * `X-AppEngine-*` In addition, Cloud Tasks sets some headers
98
+ # when the task is dispatched, such as headers containing information about the
99
+ # task; see [request headers](https://cloud.google.com/tasks/docs/creating-
100
+ # appengine-handlers#reading_request_headers). These headers are set only when
101
+ # the task is dispatched, so they are not visible when the task is returned in a
102
+ # Cloud Tasks response. Although there is no specific limit for the maximum
103
+ # number of headers or the size, there is a limit on the maximum size of the
104
+ # Task. For more information, see the CreateTask documentation.
105
+ # Corresponds to the JSON property `headers`
106
+ # @return [Hash<String,String>]
107
+ attr_accessor :headers
108
+
109
+ # The HTTP method to use for the request. The default is POST. The app's request
110
+ # handler for the task's target URL must be able to handle HTTP requests with
111
+ # this http_method, otherwise the task attempt fails with error code 405 (Method
112
+ # Not Allowed). See [Writing a push task request handler](https://cloud.google.
113
+ # com/appengine/docs/java/taskqueue/push/creating-handlers#
114
+ # writing_a_push_task_request_handler) and the App Engine documentation for your
115
+ # runtime on [How Requests are Handled](https://cloud.google.com/appengine/docs/
116
+ # standard/python3/how-requests-are-handled).
117
+ # Corresponds to the JSON property `httpMethod`
118
+ # @return [String]
119
+ attr_accessor :http_method
120
+
121
+ # The relative URI. The relative URI must begin with "/" and must be a valid
122
+ # HTTP relative URI. It can contain a path and query string arguments. If the
123
+ # relative URI is empty, then the root path "/" will be used. No spaces are
124
+ # allowed, and the maximum length allowed is 2083 characters.
125
+ # Corresponds to the JSON property `relativeUri`
126
+ # @return [String]
127
+ attr_accessor :relative_uri
128
+
129
+ def initialize(**args)
130
+ update!(**args)
131
+ end
132
+
133
+ # Update properties of this object
134
+ def update!(**args)
135
+ @app_engine_routing = args[:app_engine_routing] if args.key?(:app_engine_routing)
136
+ @body = args[:body] if args.key?(:body)
137
+ @headers = args[:headers] if args.key?(:headers)
138
+ @http_method = args[:http_method] if args.key?(:http_method)
139
+ @relative_uri = args[:relative_uri] if args.key?(:relative_uri)
140
+ end
141
+ end
142
+
143
+ # App Engine Routing. Defines routing characteristics specific to App Engine -
144
+ # service, version, and instance. For more information about services, versions,
145
+ # and instances see [An Overview of App Engine](https://cloud.google.com/
146
+ # appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture
147
+ # on Google App Engine](https://cloud.google.com/appengine/docs/python/
148
+ # microservices-on-app-engine), [App Engine Standard request routing](https://
149
+ # cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and [
150
+ # App Engine Flex request routing](https://cloud.google.com/appengine/docs/
151
+ # flexible/python/how-requests-are-routed). Using AppEngineRouting requires [`
152
+ # appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/
153
+ # access-control) Google IAM permission for the project and the following scope:
154
+ # `https://www.googleapis.com/auth/cloud-platform`
155
+ class AppEngineRouting
156
+ include Google::Apis::Core::Hashable
157
+
158
+ # Output only. The host that the task is sent to. The host is constructed from
159
+ # the domain name of the app associated with the queue's project ID (for example
160
+ # .appspot.com), and the service, version, and instance. Tasks which were
161
+ # created using the App Engine SDK might have a custom domain name. For more
162
+ # information, see [How Requests are Routed](https://cloud.google.com/appengine/
163
+ # docs/standard/python/how-requests-are-routed).
164
+ # Corresponds to the JSON property `host`
165
+ # @return [String]
166
+ attr_accessor :host
167
+
168
+ # App instance. By default, the task is sent to an instance which is available
169
+ # when the task is attempted. Requests can only be sent to a specific instance
170
+ # if [manual scaling is used in App Engine Standard](https://cloud.google.com/
171
+ # appengine/docs/python/an-overview-of-app-engine?hl=en_US#
172
+ # scaling_types_and_instance_classes). App Engine Flex does not support
173
+ # instances. For more information, see [App Engine Standard request routing](
174
+ # https://cloud.google.com/appengine/docs/standard/python/how-requests-are-
175
+ # routed) and [App Engine Flex request routing](https://cloud.google.com/
176
+ # appengine/docs/flexible/python/how-requests-are-routed).
177
+ # Corresponds to the JSON property `instance`
178
+ # @return [String]
179
+ attr_accessor :instance
180
+
181
+ # App service. By default, the task is sent to the service which is the default
182
+ # service when the task is attempted. For some queues or tasks which were
183
+ # created using the App Engine Task Queue API, host is not parsable into service,
184
+ # version, and instance. For example, some tasks which were created using the
185
+ # App Engine SDK use a custom domain name; custom domains are not parsed by
186
+ # Cloud Tasks. If host is not parsable, then service, version, and instance are
187
+ # the empty string.
188
+ # Corresponds to the JSON property `service`
189
+ # @return [String]
190
+ attr_accessor :service
191
+
192
+ # App version. By default, the task is sent to the version which is the default
193
+ # version when the task is attempted. For some queues or tasks which were
194
+ # created using the App Engine Task Queue API, host is not parsable into service,
195
+ # version, and instance. For example, some tasks which were created using the
196
+ # App Engine SDK use a custom domain name; custom domains are not parsed by
197
+ # Cloud Tasks. If host is not parsable, then service, version, and instance are
198
+ # the empty string.
199
+ # Corresponds to the JSON property `version`
200
+ # @return [String]
201
+ attr_accessor :version
202
+
203
+ def initialize(**args)
204
+ update!(**args)
205
+ end
206
+
207
+ # Update properties of this object
208
+ def update!(**args)
209
+ @host = args[:host] if args.key?(:host)
210
+ @instance = args[:instance] if args.key?(:instance)
211
+ @service = args[:service] if args.key?(:service)
212
+ @version = args[:version] if args.key?(:version)
213
+ end
214
+ end
215
+
216
+ # The status of a task attempt.
217
+ class Attempt
218
+ include Google::Apis::Core::Hashable
219
+
220
+ # Output only. The time that this attempt was dispatched. `dispatch_time` will
221
+ # be truncated to the nearest microsecond.
222
+ # Corresponds to the JSON property `dispatchTime`
223
+ # @return [String]
224
+ attr_accessor :dispatch_time
225
+
226
+ # The `Status` type defines a logical error model that is suitable for different
227
+ # programming environments, including REST APIs and RPC APIs. It is used by [
228
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
229
+ # data: error code, error message, and error details. You can find out more
230
+ # about this error model and how to work with it in the [API Design Guide](https:
231
+ # //cloud.google.com/apis/design/errors).
232
+ # Corresponds to the JSON property `responseStatus`
233
+ # @return [Google::Apis::CloudtasksV2::Status]
234
+ attr_accessor :response_status
235
+
236
+ # Output only. The time that this attempt response was received. `response_time`
237
+ # will be truncated to the nearest microsecond.
238
+ # Corresponds to the JSON property `responseTime`
239
+ # @return [String]
240
+ attr_accessor :response_time
241
+
242
+ # Output only. The time that this attempt was scheduled. `schedule_time` will be
243
+ # truncated to the nearest microsecond.
244
+ # Corresponds to the JSON property `scheduleTime`
245
+ # @return [String]
246
+ attr_accessor :schedule_time
247
+
248
+ def initialize(**args)
249
+ update!(**args)
250
+ end
251
+
252
+ # Update properties of this object
253
+ def update!(**args)
254
+ @dispatch_time = args[:dispatch_time] if args.key?(:dispatch_time)
255
+ @response_status = args[:response_status] if args.key?(:response_status)
256
+ @response_time = args[:response_time] if args.key?(:response_time)
257
+ @schedule_time = args[:schedule_time] if args.key?(:schedule_time)
258
+ end
259
+ end
260
+
261
+ # Associates `members` with a `role`.
262
+ class Binding
263
+ include Google::Apis::Core::Hashable
264
+
265
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
266
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
267
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
268
+ # "Summary size limit" description: "Determines if a summary is less than 100
269
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
270
+ # Requestor is owner" description: "Determines if requestor is the document
271
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
272
+ # Logic): title: "Public documents" description: "Determine whether the document
273
+ # should be publicly visible" expression: "document.type != 'private' &&
274
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
275
+ # string" description: "Create a notification string with a timestamp."
276
+ # expression: "'New message received at ' + string(document.create_time)" The
277
+ # exact variables and functions that may be referenced within an expression are
278
+ # determined by the service that evaluates it. See the service documentation for
279
+ # additional information.
280
+ # Corresponds to the JSON property `condition`
281
+ # @return [Google::Apis::CloudtasksV2::Expr]
282
+ attr_accessor :condition
283
+
284
+ # Specifies the identities requesting access for a Cloud Platform resource. `
285
+ # members` can have the following values: * `allUsers`: A special identifier
286
+ # that represents anyone who is on the internet; with or without a Google
287
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
288
+ # anyone who is authenticated with a Google account or a service account. * `
289
+ # user:`emailid``: An email address that represents a specific Google account.
290
+ # For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
291
+ # address that represents a service account. For example, `my-other-app@appspot.
292
+ # gserviceaccount.com`. * `group:`emailid``: An email address that represents a
293
+ # Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
294
+ # `uniqueid``: An email address (plus unique identifier) representing a user
295
+ # that has been recently deleted. For example, `alice@example.com?uid=
296
+ # 123456789012345678901`. If the user is recovered, this value reverts to `user:`
297
+ # emailid`` and the recovered user retains the role in the binding. * `deleted:
298
+ # serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
299
+ # identifier) representing a service account that has been recently deleted. For
300
+ # example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
301
+ # If the service account is undeleted, this value reverts to `serviceAccount:`
302
+ # emailid`` and the undeleted service account retains the role in the binding. *
303
+ # `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
304
+ # identifier) representing a Google group that has been recently deleted. For
305
+ # example, `admins@example.com?uid=123456789012345678901`. If the group is
306
+ # recovered, this value reverts to `group:`emailid`` and the recovered group
307
+ # retains the role in the binding. * `domain:`domain``: The G Suite domain (
308
+ # primary) that represents all the users of that domain. For example, `google.
309
+ # com` or `example.com`.
310
+ # Corresponds to the JSON property `members`
311
+ # @return [Array<String>]
312
+ attr_accessor :members
313
+
314
+ # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
315
+ # , or `roles/owner`.
316
+ # Corresponds to the JSON property `role`
317
+ # @return [String]
318
+ attr_accessor :role
319
+
320
+ def initialize(**args)
321
+ update!(**args)
322
+ end
323
+
324
+ # Update properties of this object
325
+ def update!(**args)
326
+ @condition = args[:condition] if args.key?(:condition)
327
+ @members = args[:members] if args.key?(:members)
328
+ @role = args[:role] if args.key?(:role)
329
+ end
330
+ end
331
+
332
+ # Request message for CreateTask.
333
+ class CreateTaskRequest
334
+ include Google::Apis::Core::Hashable
335
+
336
+ # The response_view specifies which subset of the Task will be returned. By
337
+ # default response_view is BASIC; not all information is retrieved by default
338
+ # because some data, such as payloads, might be desirable to return only when
339
+ # needed because of its large size or because of the sensitivity of data that it
340
+ # contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google
341
+ # IAM](https://cloud.google.com/iam/) permission on the Task resource.
342
+ # Corresponds to the JSON property `responseView`
343
+ # @return [String]
344
+ attr_accessor :response_view
345
+
346
+ # A unit of scheduled work.
347
+ # Corresponds to the JSON property `task`
348
+ # @return [Google::Apis::CloudtasksV2::Task]
349
+ attr_accessor :task
350
+
351
+ def initialize(**args)
352
+ update!(**args)
353
+ end
354
+
355
+ # Update properties of this object
356
+ def update!(**args)
357
+ @response_view = args[:response_view] if args.key?(:response_view)
358
+ @task = args[:task] if args.key?(:task)
359
+ end
360
+ end
361
+
362
+ # A generic empty message that you can re-use to avoid defining duplicated empty
363
+ # messages in your APIs. A typical example is to use it as the request or the
364
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
365
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
366
+ # `Empty` is empty JSON object ````.
367
+ class Empty
368
+ include Google::Apis::Core::Hashable
369
+
370
+ def initialize(**args)
371
+ update!(**args)
372
+ end
373
+
374
+ # Update properties of this object
375
+ def update!(**args)
376
+ end
377
+ end
378
+
379
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
380
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
381
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
382
+ # "Summary size limit" description: "Determines if a summary is less than 100
383
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
384
+ # Requestor is owner" description: "Determines if requestor is the document
385
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
386
+ # Logic): title: "Public documents" description: "Determine whether the document
387
+ # should be publicly visible" expression: "document.type != 'private' &&
388
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
389
+ # string" description: "Create a notification string with a timestamp."
390
+ # expression: "'New message received at ' + string(document.create_time)" The
391
+ # exact variables and functions that may be referenced within an expression are
392
+ # determined by the service that evaluates it. See the service documentation for
393
+ # additional information.
394
+ class Expr
395
+ include Google::Apis::Core::Hashable
396
+
397
+ # Optional. Description of the expression. This is a longer text which describes
398
+ # the expression, e.g. when hovered over it in a UI.
399
+ # Corresponds to the JSON property `description`
400
+ # @return [String]
401
+ attr_accessor :description
402
+
403
+ # Textual representation of an expression in Common Expression Language syntax.
404
+ # Corresponds to the JSON property `expression`
405
+ # @return [String]
406
+ attr_accessor :expression
407
+
408
+ # Optional. String indicating the location of the expression for error reporting,
409
+ # e.g. a file name and a position in the file.
410
+ # Corresponds to the JSON property `location`
411
+ # @return [String]
412
+ attr_accessor :location
413
+
414
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
415
+ # This can be used e.g. in UIs which allow to enter the expression.
416
+ # Corresponds to the JSON property `title`
417
+ # @return [String]
418
+ attr_accessor :title
419
+
420
+ def initialize(**args)
421
+ update!(**args)
422
+ end
423
+
424
+ # Update properties of this object
425
+ def update!(**args)
426
+ @description = args[:description] if args.key?(:description)
427
+ @expression = args[:expression] if args.key?(:expression)
428
+ @location = args[:location] if args.key?(:location)
429
+ @title = args[:title] if args.key?(:title)
430
+ end
431
+ end
432
+
433
+ # Request message for `GetIamPolicy` method.
434
+ class GetIamPolicyRequest
435
+ include Google::Apis::Core::Hashable
436
+
437
+ # Encapsulates settings provided to GetIamPolicy.
438
+ # Corresponds to the JSON property `options`
439
+ # @return [Google::Apis::CloudtasksV2::GetPolicyOptions]
440
+ attr_accessor :options
441
+
442
+ def initialize(**args)
443
+ update!(**args)
444
+ end
445
+
446
+ # Update properties of this object
447
+ def update!(**args)
448
+ @options = args[:options] if args.key?(:options)
449
+ end
450
+ end
451
+
452
+ # Encapsulates settings provided to GetIamPolicy.
453
+ class GetPolicyOptions
454
+ include Google::Apis::Core::Hashable
455
+
456
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
457
+ # 3. Requests specifying an invalid value will be rejected. Requests for
458
+ # policies with any conditional bindings must specify version 3. Policies
459
+ # without any conditional bindings may specify any valid value or leave the
460
+ # field unset. To learn which resources support conditions in their IAM policies,
461
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
462
+ # resource-policies).
463
+ # Corresponds to the JSON property `requestedPolicyVersion`
464
+ # @return [Fixnum]
465
+ attr_accessor :requested_policy_version
466
+
467
+ def initialize(**args)
468
+ update!(**args)
469
+ end
470
+
471
+ # Update properties of this object
472
+ def update!(**args)
473
+ @requested_policy_version = args[:requested_policy_version] if args.key?(:requested_policy_version)
474
+ end
475
+ end
476
+
477
+ # HTTP request. The task will be pushed to the worker as an HTTP request. If the
478
+ # worker or the redirected worker acknowledges the task by returning a
479
+ # successful HTTP response code ([`200` - `299`]), the task will be removed from
480
+ # the queue. If any other HTTP response code is returned or no response is
481
+ # received, the task will be retried according to the following: * User-
482
+ # specified throttling: retry configuration, rate limits, and the queue's state.
483
+ # * System throttling: To prevent the worker from overloading, Cloud Tasks may
484
+ # temporarily reduce the queue's effective rate. User-specified settings will
485
+ # not be changed. System throttling happens because: * Cloud Tasks backs off on
486
+ # all errors. Normally the backoff specified in rate limits will be used. But if
487
+ # the worker returns `429` (Too Many Requests), `503` (Service Unavailable), or
488
+ # the rate of errors is high, Cloud Tasks will use a higher backoff rate. The
489
+ # retry specified in the `Retry-After` HTTP response header is considered. * To
490
+ # prevent traffic spikes and to smooth sudden increases in traffic, dispatches
491
+ # ramp up slowly when the queue is newly created or idle and if large numbers of
492
+ # tasks suddenly become available to dispatch (due to spikes in create task
493
+ # rates, the queue being unpaused, or many tasks that are scheduled at the same
494
+ # time).
495
+ class HttpRequest
496
+ include Google::Apis::Core::Hashable
497
+
498
+ # HTTP request body. A request body is allowed only if the HTTP method is POST,
499
+ # PUT, or PATCH. It is an error to set body on a task with an incompatible
500
+ # HttpMethod.
501
+ # Corresponds to the JSON property `body`
502
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
503
+ # @return [String]
504
+ attr_accessor :body
505
+
506
+ # HTTP request headers. This map contains the header field names and values.
507
+ # Headers can be set when the task is created. These headers represent a subset
508
+ # of the headers that will accompany the task's HTTP request. Some HTTP request
509
+ # headers will be ignored or replaced. A partial list of headers that will be
510
+ # ignored or replaced is: * Host: This will be computed by Cloud Tasks and
511
+ # derived from HttpRequest.url. * Content-Length: This will be computed by Cloud
512
+ # Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * X-Google-*:
513
+ # Google use only. * X-AppEngine-*: Google use only. `Content-Type` won't be set
514
+ # by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the
515
+ # task is created. For example, `Content-Type` can be set to `"application/octet-
516
+ # stream"` or `"application/json"`. Headers which can have multiple values (
517
+ # according to RFC2616) can be specified using comma-separated values. The size
518
+ # of the headers must be less than 80KB.
519
+ # Corresponds to the JSON property `headers`
520
+ # @return [Hash<String,String>]
521
+ attr_accessor :headers
522
+
523
+ # The HTTP method to use for the request. The default is POST.
524
+ # Corresponds to the JSON property `httpMethod`
525
+ # @return [String]
526
+ attr_accessor :http_method
527
+
528
+ # Contains information needed for generating an [OAuth token](https://developers.
529
+ # google.com/identity/protocols/OAuth2). This type of authorization should
530
+ # generally only be used when calling Google APIs hosted on *.googleapis.com.
531
+ # Corresponds to the JSON property `oauthToken`
532
+ # @return [Google::Apis::CloudtasksV2::OAuthToken]
533
+ attr_accessor :oauth_token
534
+
535
+ # Contains information needed for generating an [OpenID Connect token](https://
536
+ # developers.google.com/identity/protocols/OpenIDConnect). This type of
537
+ # authorization can be used for many scenarios, including calling Cloud Run, or
538
+ # endpoints where you intend to validate the token yourself.
539
+ # Corresponds to the JSON property `oidcToken`
540
+ # @return [Google::Apis::CloudtasksV2::OidcToken]
541
+ attr_accessor :oidc_token
542
+
543
+ # Required. The full url path that the request will be sent to. This string must
544
+ # begin with either "http://" or "https://". Some examples are: `http://acme.com`
545
+ # and `https://acme.com/sales:8080`. Cloud Tasks will encode some characters
546
+ # for safety and compatibility. The maximum allowed URL length is 2083
547
+ # characters after encoding. The `Location` header response from a redirect
548
+ # response [`300` - `399`] may be followed. The redirect is not counted as a
549
+ # separate attempt.
550
+ # Corresponds to the JSON property `url`
551
+ # @return [String]
552
+ attr_accessor :url
553
+
554
+ def initialize(**args)
555
+ update!(**args)
556
+ end
557
+
558
+ # Update properties of this object
559
+ def update!(**args)
560
+ @body = args[:body] if args.key?(:body)
561
+ @headers = args[:headers] if args.key?(:headers)
562
+ @http_method = args[:http_method] if args.key?(:http_method)
563
+ @oauth_token = args[:oauth_token] if args.key?(:oauth_token)
564
+ @oidc_token = args[:oidc_token] if args.key?(:oidc_token)
565
+ @url = args[:url] if args.key?(:url)
566
+ end
567
+ end
568
+
569
+ # The response message for Locations.ListLocations.
570
+ class ListLocationsResponse
571
+ include Google::Apis::Core::Hashable
572
+
573
+ # A list of locations that matches the specified filter in the request.
574
+ # Corresponds to the JSON property `locations`
575
+ # @return [Array<Google::Apis::CloudtasksV2::Location>]
576
+ attr_accessor :locations
577
+
578
+ # The standard List next-page token.
579
+ # Corresponds to the JSON property `nextPageToken`
580
+ # @return [String]
581
+ attr_accessor :next_page_token
582
+
583
+ def initialize(**args)
584
+ update!(**args)
585
+ end
586
+
587
+ # Update properties of this object
588
+ def update!(**args)
589
+ @locations = args[:locations] if args.key?(:locations)
590
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
591
+ end
592
+ end
593
+
594
+ # Response message for ListQueues.
595
+ class ListQueuesResponse
596
+ include Google::Apis::Core::Hashable
597
+
598
+ # A token to retrieve next page of results. To return the next page of results,
599
+ # call ListQueues with this value as the page_token. If the next_page_token is
600
+ # empty, there are no more results. The page token is valid for only 2 hours.
601
+ # Corresponds to the JSON property `nextPageToken`
602
+ # @return [String]
603
+ attr_accessor :next_page_token
604
+
605
+ # The list of queues.
606
+ # Corresponds to the JSON property `queues`
607
+ # @return [Array<Google::Apis::CloudtasksV2::Queue>]
608
+ attr_accessor :queues
609
+
610
+ def initialize(**args)
611
+ update!(**args)
612
+ end
613
+
614
+ # Update properties of this object
615
+ def update!(**args)
616
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
617
+ @queues = args[:queues] if args.key?(:queues)
618
+ end
619
+ end
620
+
621
+ # Response message for listing tasks using ListTasks.
622
+ class ListTasksResponse
623
+ include Google::Apis::Core::Hashable
624
+
625
+ # A token to retrieve next page of results. To return the next page of results,
626
+ # call ListTasks with this value as the page_token. If the next_page_token is
627
+ # empty, there are no more results.
628
+ # Corresponds to the JSON property `nextPageToken`
629
+ # @return [String]
630
+ attr_accessor :next_page_token
631
+
632
+ # The list of tasks.
633
+ # Corresponds to the JSON property `tasks`
634
+ # @return [Array<Google::Apis::CloudtasksV2::Task>]
635
+ attr_accessor :tasks
636
+
637
+ def initialize(**args)
638
+ update!(**args)
639
+ end
640
+
641
+ # Update properties of this object
642
+ def update!(**args)
643
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
644
+ @tasks = args[:tasks] if args.key?(:tasks)
645
+ end
646
+ end
647
+
648
+ # A resource that represents Google Cloud Platform location.
649
+ class Location
650
+ include Google::Apis::Core::Hashable
651
+
652
+ # The friendly name for this location, typically a nearby city name. For example,
653
+ # "Tokyo".
654
+ # Corresponds to the JSON property `displayName`
655
+ # @return [String]
656
+ attr_accessor :display_name
657
+
658
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
659
+ # region": "us-east1"`
660
+ # Corresponds to the JSON property `labels`
661
+ # @return [Hash<String,String>]
662
+ attr_accessor :labels
663
+
664
+ # The canonical id for this location. For example: `"us-east1"`.
665
+ # Corresponds to the JSON property `locationId`
666
+ # @return [String]
667
+ attr_accessor :location_id
668
+
669
+ # Service-specific metadata. For example the available capacity at the given
670
+ # location.
671
+ # Corresponds to the JSON property `metadata`
672
+ # @return [Hash<String,Object>]
673
+ attr_accessor :metadata
674
+
675
+ # Resource name for the location, which may vary between implementations. For
676
+ # example: `"projects/example-project/locations/us-east1"`
677
+ # Corresponds to the JSON property `name`
678
+ # @return [String]
679
+ attr_accessor :name
680
+
681
+ def initialize(**args)
682
+ update!(**args)
683
+ end
684
+
685
+ # Update properties of this object
686
+ def update!(**args)
687
+ @display_name = args[:display_name] if args.key?(:display_name)
688
+ @labels = args[:labels] if args.key?(:labels)
689
+ @location_id = args[:location_id] if args.key?(:location_id)
690
+ @metadata = args[:metadata] if args.key?(:metadata)
691
+ @name = args[:name] if args.key?(:name)
692
+ end
693
+ end
694
+
695
+ # Contains information needed for generating an [OAuth token](https://developers.
696
+ # google.com/identity/protocols/OAuth2). This type of authorization should
697
+ # generally only be used when calling Google APIs hosted on *.googleapis.com.
698
+ class OAuthToken
699
+ include Google::Apis::Core::Hashable
700
+
701
+ # OAuth scope to be used for generating OAuth access token. If not specified, "
702
+ # https://www.googleapis.com/auth/cloud-platform" will be used.
703
+ # Corresponds to the JSON property `scope`
704
+ # @return [String]
705
+ attr_accessor :scope
706
+
707
+ # [Service account email](https://cloud.google.com/iam/docs/service-accounts) to
708
+ # be used for generating OAuth token. The service account must be within the
709
+ # same project as the queue. The caller must have iam.serviceAccounts.actAs
710
+ # permission for the service account.
711
+ # Corresponds to the JSON property `serviceAccountEmail`
712
+ # @return [String]
713
+ attr_accessor :service_account_email
714
+
715
+ def initialize(**args)
716
+ update!(**args)
717
+ end
718
+
719
+ # Update properties of this object
720
+ def update!(**args)
721
+ @scope = args[:scope] if args.key?(:scope)
722
+ @service_account_email = args[:service_account_email] if args.key?(:service_account_email)
723
+ end
724
+ end
725
+
726
+ # Contains information needed for generating an [OpenID Connect token](https://
727
+ # developers.google.com/identity/protocols/OpenIDConnect). This type of
728
+ # authorization can be used for many scenarios, including calling Cloud Run, or
729
+ # endpoints where you intend to validate the token yourself.
730
+ class OidcToken
731
+ include Google::Apis::Core::Hashable
732
+
733
+ # Audience to be used when generating OIDC token. If not specified, the URI
734
+ # specified in target will be used.
735
+ # Corresponds to the JSON property `audience`
736
+ # @return [String]
737
+ attr_accessor :audience
738
+
739
+ # [Service account email](https://cloud.google.com/iam/docs/service-accounts) to
740
+ # be used for generating OIDC token. The service account must be within the same
741
+ # project as the queue. The caller must have iam.serviceAccounts.actAs
742
+ # permission for the service account.
743
+ # Corresponds to the JSON property `serviceAccountEmail`
744
+ # @return [String]
745
+ attr_accessor :service_account_email
746
+
747
+ def initialize(**args)
748
+ update!(**args)
749
+ end
750
+
751
+ # Update properties of this object
752
+ def update!(**args)
753
+ @audience = args[:audience] if args.key?(:audience)
754
+ @service_account_email = args[:service_account_email] if args.key?(:service_account_email)
755
+ end
756
+ end
757
+
758
+ # Request message for PauseQueue.
759
+ class PauseQueueRequest
760
+ include Google::Apis::Core::Hashable
761
+
762
+ def initialize(**args)
763
+ update!(**args)
764
+ end
765
+
766
+ # Update properties of this object
767
+ def update!(**args)
768
+ end
769
+ end
770
+
771
+ # An Identity and Access Management (IAM) policy, which specifies access
772
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
773
+ # A `binding` binds one or more `members` to a single `role`. Members can be
774
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
775
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
776
+ # role or a user-created custom role. For some types of Google Cloud resources,
777
+ # a `binding` can also specify a `condition`, which is a logical expression that
778
+ # allows access to a resource only if the expression evaluates to `true`. A
779
+ # condition can add constraints based on attributes of the request, the resource,
780
+ # or both. To learn which resources support conditions in their IAM policies,
781
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
782
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
783
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
784
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
785
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
786
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
787
+ # title": "expirable access", "description": "Does not grant access after Sep
788
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
789
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
790
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
791
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
792
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
793
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
794
+ # description: Does not grant access after Sep 2020 expression: request.time <
795
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
796
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
797
+ # google.com/iam/docs/).
798
+ class Policy
799
+ include Google::Apis::Core::Hashable
800
+
801
+ # Associates a list of `members` to a `role`. Optionally, may specify a `
802
+ # condition` that determines how and when the `bindings` are applied. Each of
803
+ # the `bindings` must contain at least one member.
804
+ # Corresponds to the JSON property `bindings`
805
+ # @return [Array<Google::Apis::CloudtasksV2::Binding>]
806
+ attr_accessor :bindings
807
+
808
+ # `etag` is used for optimistic concurrency control as a way to help prevent
809
+ # simultaneous updates of a policy from overwriting each other. It is strongly
810
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
811
+ # to perform policy updates in order to avoid race conditions: An `etag` is
812
+ # returned in the response to `getIamPolicy`, and systems are expected to put
813
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
814
+ # applied to the same version of the policy. **Important:** If you use IAM
815
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
816
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
817
+ # with a version `1` policy, and all of the conditions in the version `3` policy
818
+ # are lost.
819
+ # Corresponds to the JSON property `etag`
820
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
821
+ # @return [String]
822
+ attr_accessor :etag
823
+
824
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
825
+ # Requests that specify an invalid value are rejected. Any operation that
826
+ # affects conditional role bindings must specify version `3`. This requirement
827
+ # applies to the following operations: * Getting a policy that includes a
828
+ # conditional role binding * Adding a conditional role binding to a policy *
829
+ # Changing a conditional role binding in a policy * Removing any role binding,
830
+ # with or without a condition, from a policy that includes conditions **
831
+ # Important:** If you use IAM Conditions, you must include the `etag` field
832
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
833
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
834
+ # conditions in the version `3` policy are lost. If a policy does not include
835
+ # any conditions, operations on that policy may specify any valid version or
836
+ # leave the field unset. To learn which resources support conditions in their
837
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
838
+ # conditions/resource-policies).
839
+ # Corresponds to the JSON property `version`
840
+ # @return [Fixnum]
841
+ attr_accessor :version
842
+
843
+ def initialize(**args)
844
+ update!(**args)
845
+ end
846
+
847
+ # Update properties of this object
848
+ def update!(**args)
849
+ @bindings = args[:bindings] if args.key?(:bindings)
850
+ @etag = args[:etag] if args.key?(:etag)
851
+ @version = args[:version] if args.key?(:version)
852
+ end
853
+ end
854
+
855
+ # Request message for PurgeQueue.
856
+ class PurgeQueueRequest
857
+ include Google::Apis::Core::Hashable
858
+
859
+ def initialize(**args)
860
+ update!(**args)
861
+ end
862
+
863
+ # Update properties of this object
864
+ def update!(**args)
865
+ end
866
+ end
867
+
868
+ # A queue is a container of related tasks. Queues are configured to manage how
869
+ # those tasks are dispatched. Configurable properties include rate limits, retry
870
+ # options, queue types, and others.
871
+ class Queue
872
+ include Google::Apis::Core::Hashable
873
+
874
+ # App Engine Routing. Defines routing characteristics specific to App Engine -
875
+ # service, version, and instance. For more information about services, versions,
876
+ # and instances see [An Overview of App Engine](https://cloud.google.com/
877
+ # appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture
878
+ # on Google App Engine](https://cloud.google.com/appengine/docs/python/
879
+ # microservices-on-app-engine), [App Engine Standard request routing](https://
880
+ # cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and [
881
+ # App Engine Flex request routing](https://cloud.google.com/appengine/docs/
882
+ # flexible/python/how-requests-are-routed). Using AppEngineRouting requires [`
883
+ # appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/
884
+ # access-control) Google IAM permission for the project and the following scope:
885
+ # `https://www.googleapis.com/auth/cloud-platform`
886
+ # Corresponds to the JSON property `appEngineRoutingOverride`
887
+ # @return [Google::Apis::CloudtasksV2::AppEngineRouting]
888
+ attr_accessor :app_engine_routing_override
889
+
890
+ # Caller-specified and required in CreateQueue, after which it becomes output
891
+ # only. The queue name. The queue name must have the following format: `projects/
892
+ # PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * `PROJECT_ID` can contain
893
+ # letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.).
894
+ # For more information, see [Identifying projects](https://cloud.google.com/
895
+ # resource-manager/docs/creating-managing-projects#identifying_projects) * `
896
+ # LOCATION_ID` is the canonical ID for the queue's location. The list of
897
+ # available locations can be obtained by calling ListLocations. For more
898
+ # information, see https://cloud.google.com/about/locations/. * `QUEUE_ID` can
899
+ # contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum
900
+ # length is 100 characters.
901
+ # Corresponds to the JSON property `name`
902
+ # @return [String]
903
+ attr_accessor :name
904
+
905
+ # Output only. The last time this queue was purged. All tasks that were created
906
+ # before this time were purged. A queue can be purged using PurgeQueue, the [App
907
+ # Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/
908
+ # appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#
909
+ # purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest
910
+ # microsecond. Purge time will be unset if the queue has never been purged.
911
+ # Corresponds to the JSON property `purgeTime`
912
+ # @return [String]
913
+ attr_accessor :purge_time
914
+
915
+ # Rate limits. This message determines the maximum rate that tasks can be
916
+ # dispatched by a queue, regardless of whether the dispatch is a first task
917
+ # attempt or a retry. Note: The debugging command, RunTask, will run a task even
918
+ # if the queue has reached its RateLimits.
919
+ # Corresponds to the JSON property `rateLimits`
920
+ # @return [Google::Apis::CloudtasksV2::RateLimits]
921
+ attr_accessor :rate_limits
922
+
923
+ # Retry config. These settings determine when a failed task attempt is retried.
924
+ # Corresponds to the JSON property `retryConfig`
925
+ # @return [Google::Apis::CloudtasksV2::RetryConfig]
926
+ attr_accessor :retry_config
927
+
928
+ # Configuration options for writing logs to [Stackdriver Logging](https://cloud.
929
+ # google.com/logging/docs/).
930
+ # Corresponds to the JSON property `stackdriverLoggingConfig`
931
+ # @return [Google::Apis::CloudtasksV2::StackdriverLoggingConfig]
932
+ attr_accessor :stackdriver_logging_config
933
+
934
+ # Output only. The state of the queue. `state` can only be changed by called
935
+ # PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.
936
+ # com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to
937
+ # change `state`.
938
+ # Corresponds to the JSON property `state`
939
+ # @return [String]
940
+ attr_accessor :state
941
+
942
+ def initialize(**args)
943
+ update!(**args)
944
+ end
945
+
946
+ # Update properties of this object
947
+ def update!(**args)
948
+ @app_engine_routing_override = args[:app_engine_routing_override] if args.key?(:app_engine_routing_override)
949
+ @name = args[:name] if args.key?(:name)
950
+ @purge_time = args[:purge_time] if args.key?(:purge_time)
951
+ @rate_limits = args[:rate_limits] if args.key?(:rate_limits)
952
+ @retry_config = args[:retry_config] if args.key?(:retry_config)
953
+ @stackdriver_logging_config = args[:stackdriver_logging_config] if args.key?(:stackdriver_logging_config)
954
+ @state = args[:state] if args.key?(:state)
955
+ end
956
+ end
957
+
958
+ # Rate limits. This message determines the maximum rate that tasks can be
959
+ # dispatched by a queue, regardless of whether the dispatch is a first task
960
+ # attempt or a retry. Note: The debugging command, RunTask, will run a task even
961
+ # if the queue has reached its RateLimits.
962
+ class RateLimits
963
+ include Google::Apis::Core::Hashable
964
+
965
+ # Output only. The max burst size. Max burst size limits how fast tasks in queue
966
+ # are processed when many tasks are in the queue and the rate is high. This
967
+ # field allows the queue to have a high rate so processing starts shortly after
968
+ # a task is enqueued, but still limits resource usage when many tasks are
969
+ # enqueued in a short period of time. The [token bucket](https://wikipedia.org/
970
+ # wiki/Token_Bucket) algorithm is used to control the rate of task dispatches.
971
+ # Each queue has a token bucket that holds tokens, up to the maximum specified
972
+ # by `max_burst_size`. Each time a task is dispatched, a token is removed from
973
+ # the bucket. Tasks will be dispatched until the queue's bucket runs out of
974
+ # tokens. The bucket will be continuously refilled with new tokens based on
975
+ # max_dispatches_per_second. Cloud Tasks will pick the value of `max_burst_size`
976
+ # based on the value of max_dispatches_per_second. For queues that were created
977
+ # or updated using `queue.yaml/xml`, `max_burst_size` is equal to [bucket_size](
978
+ # https://cloud.google.com/appengine/docs/standard/python/config/queueref#
979
+ # bucket_size). Since `max_burst_size` is output only, if UpdateQueue is called
980
+ # on a queue created by `queue.yaml/xml`, `max_burst_size` will be reset based
981
+ # on the value of max_dispatches_per_second, regardless of whether
982
+ # max_dispatches_per_second is updated.
983
+ # Corresponds to the JSON property `maxBurstSize`
984
+ # @return [Fixnum]
985
+ attr_accessor :max_burst_size
986
+
987
+ # The maximum number of concurrent tasks that Cloud Tasks allows to be
988
+ # dispatched for this queue. After this threshold has been reached, Cloud Tasks
989
+ # stops dispatching tasks until the number of concurrent requests decreases. If
990
+ # unspecified when the queue is created, Cloud Tasks will pick the default. The
991
+ # maximum allowed value is 5,000. This field has the same meaning as [
992
+ # max_concurrent_requests in queue.yaml/xml](https://cloud.google.com/appengine/
993
+ # docs/standard/python/config/queueref#max_concurrent_requests).
994
+ # Corresponds to the JSON property `maxConcurrentDispatches`
995
+ # @return [Fixnum]
996
+ attr_accessor :max_concurrent_dispatches
997
+
998
+ # The maximum rate at which tasks are dispatched from this queue. If unspecified
999
+ # when the queue is created, Cloud Tasks will pick the default. * The maximum
1000
+ # allowed value is 500. This field has the same meaning as [rate in queue.yaml/
1001
+ # xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#
1002
+ # rate).
1003
+ # Corresponds to the JSON property `maxDispatchesPerSecond`
1004
+ # @return [Float]
1005
+ attr_accessor :max_dispatches_per_second
1006
+
1007
+ def initialize(**args)
1008
+ update!(**args)
1009
+ end
1010
+
1011
+ # Update properties of this object
1012
+ def update!(**args)
1013
+ @max_burst_size = args[:max_burst_size] if args.key?(:max_burst_size)
1014
+ @max_concurrent_dispatches = args[:max_concurrent_dispatches] if args.key?(:max_concurrent_dispatches)
1015
+ @max_dispatches_per_second = args[:max_dispatches_per_second] if args.key?(:max_dispatches_per_second)
1016
+ end
1017
+ end
1018
+
1019
+ # Request message for ResumeQueue.
1020
+ class ResumeQueueRequest
1021
+ include Google::Apis::Core::Hashable
1022
+
1023
+ def initialize(**args)
1024
+ update!(**args)
1025
+ end
1026
+
1027
+ # Update properties of this object
1028
+ def update!(**args)
1029
+ end
1030
+ end
1031
+
1032
+ # Retry config. These settings determine when a failed task attempt is retried.
1033
+ class RetryConfig
1034
+ include Google::Apis::Core::Hashable
1035
+
1036
+ # Number of attempts per task. Cloud Tasks will attempt the task `max_attempts`
1037
+ # times (that is, if the first attempt fails, then there will be `max_attempts -
1038
+ # 1` retries). Must be >= -1. If unspecified when the queue is created, Cloud
1039
+ # Tasks will pick the default. -1 indicates unlimited attempts. This field has
1040
+ # the same meaning as [task_retry_limit in queue.yaml/xml](https://cloud.google.
1041
+ # com/appengine/docs/standard/python/config/queueref#retry_parameters).
1042
+ # Corresponds to the JSON property `maxAttempts`
1043
+ # @return [Fixnum]
1044
+ attr_accessor :max_attempts
1045
+
1046
+ # A task will be scheduled for retry between min_backoff and max_backoff
1047
+ # duration after it fails, if the queue's RetryConfig specifies that the task
1048
+ # should be retried. If unspecified when the queue is created, Cloud Tasks will
1049
+ # pick the default. `max_backoff` will be truncated to the nearest second. This
1050
+ # field has the same meaning as [max_backoff_seconds in queue.yaml/xml](https://
1051
+ # cloud.google.com/appengine/docs/standard/python/config/queueref#
1052
+ # retry_parameters).
1053
+ # Corresponds to the JSON property `maxBackoff`
1054
+ # @return [String]
1055
+ attr_accessor :max_backoff
1056
+
1057
+ # The time between retries will double `max_doublings` times. A task's retry
1058
+ # interval starts at min_backoff, then doubles `max_doublings` times, then
1059
+ # increases linearly, and finally retries at intervals of max_backoff up to
1060
+ # max_attempts times. For example, if min_backoff is 10s, max_backoff is 300s,
1061
+ # and `max_doublings` is 3, then the a task will first be retried in 10s. The
1062
+ # retry interval will double three times, and then increase linearly by 2^3 *
1063
+ # 10s. Finally, the task will retry at intervals of max_backoff until the task
1064
+ # has been attempted max_attempts times. Thus, the requests will retry at 10s,
1065
+ # 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... If unspecified when the queue is
1066
+ # created, Cloud Tasks will pick the default. This field has the same meaning as
1067
+ # [max_doublings in queue.yaml/xml](https://cloud.google.com/appengine/docs/
1068
+ # standard/python/config/queueref#retry_parameters).
1069
+ # Corresponds to the JSON property `maxDoublings`
1070
+ # @return [Fixnum]
1071
+ attr_accessor :max_doublings
1072
+
1073
+ # If positive, `max_retry_duration` specifies the time limit for retrying a
1074
+ # failed task, measured from when the task was first attempted. Once `
1075
+ # max_retry_duration` time has passed *and* the task has been attempted
1076
+ # max_attempts times, no further attempts will be made and the task will be
1077
+ # deleted. If zero, then the task age is unlimited. If unspecified when the
1078
+ # queue is created, Cloud Tasks will pick the default. `max_retry_duration` will
1079
+ # be truncated to the nearest second. This field has the same meaning as [
1080
+ # task_age_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/
1081
+ # standard/python/config/queueref#retry_parameters).
1082
+ # Corresponds to the JSON property `maxRetryDuration`
1083
+ # @return [String]
1084
+ attr_accessor :max_retry_duration
1085
+
1086
+ # A task will be scheduled for retry between min_backoff and max_backoff
1087
+ # duration after it fails, if the queue's RetryConfig specifies that the task
1088
+ # should be retried. If unspecified when the queue is created, Cloud Tasks will
1089
+ # pick the default. `min_backoff` will be truncated to the nearest second. This
1090
+ # field has the same meaning as [min_backoff_seconds in queue.yaml/xml](https://
1091
+ # cloud.google.com/appengine/docs/standard/python/config/queueref#
1092
+ # retry_parameters).
1093
+ # Corresponds to the JSON property `minBackoff`
1094
+ # @return [String]
1095
+ attr_accessor :min_backoff
1096
+
1097
+ def initialize(**args)
1098
+ update!(**args)
1099
+ end
1100
+
1101
+ # Update properties of this object
1102
+ def update!(**args)
1103
+ @max_attempts = args[:max_attempts] if args.key?(:max_attempts)
1104
+ @max_backoff = args[:max_backoff] if args.key?(:max_backoff)
1105
+ @max_doublings = args[:max_doublings] if args.key?(:max_doublings)
1106
+ @max_retry_duration = args[:max_retry_duration] if args.key?(:max_retry_duration)
1107
+ @min_backoff = args[:min_backoff] if args.key?(:min_backoff)
1108
+ end
1109
+ end
1110
+
1111
+ # Request message for forcing a task to run now using RunTask.
1112
+ class RunTaskRequest
1113
+ include Google::Apis::Core::Hashable
1114
+
1115
+ # The response_view specifies which subset of the Task will be returned. By
1116
+ # default response_view is BASIC; not all information is retrieved by default
1117
+ # because some data, such as payloads, might be desirable to return only when
1118
+ # needed because of its large size or because of the sensitivity of data that it
1119
+ # contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google
1120
+ # IAM](https://cloud.google.com/iam/) permission on the Task resource.
1121
+ # Corresponds to the JSON property `responseView`
1122
+ # @return [String]
1123
+ attr_accessor :response_view
1124
+
1125
+ def initialize(**args)
1126
+ update!(**args)
1127
+ end
1128
+
1129
+ # Update properties of this object
1130
+ def update!(**args)
1131
+ @response_view = args[:response_view] if args.key?(:response_view)
1132
+ end
1133
+ end
1134
+
1135
+ # Request message for `SetIamPolicy` method.
1136
+ class SetIamPolicyRequest
1137
+ include Google::Apis::Core::Hashable
1138
+
1139
+ # An Identity and Access Management (IAM) policy, which specifies access
1140
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1141
+ # A `binding` binds one or more `members` to a single `role`. Members can be
1142
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
1143
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
1144
+ # role or a user-created custom role. For some types of Google Cloud resources,
1145
+ # a `binding` can also specify a `condition`, which is a logical expression that
1146
+ # allows access to a resource only if the expression evaluates to `true`. A
1147
+ # condition can add constraints based on attributes of the request, the resource,
1148
+ # or both. To learn which resources support conditions in their IAM policies,
1149
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
1150
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
1151
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
1152
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
1153
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
1154
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
1155
+ # title": "expirable access", "description": "Does not grant access after Sep
1156
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
1157
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
1158
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
1159
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
1160
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
1161
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
1162
+ # description: Does not grant access after Sep 2020 expression: request.time <
1163
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
1164
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
1165
+ # google.com/iam/docs/).
1166
+ # Corresponds to the JSON property `policy`
1167
+ # @return [Google::Apis::CloudtasksV2::Policy]
1168
+ attr_accessor :policy
1169
+
1170
+ def initialize(**args)
1171
+ update!(**args)
1172
+ end
1173
+
1174
+ # Update properties of this object
1175
+ def update!(**args)
1176
+ @policy = args[:policy] if args.key?(:policy)
1177
+ end
1178
+ end
1179
+
1180
+ # Configuration options for writing logs to [Stackdriver Logging](https://cloud.
1181
+ # google.com/logging/docs/).
1182
+ class StackdriverLoggingConfig
1183
+ include Google::Apis::Core::Hashable
1184
+
1185
+ # Specifies the fraction of operations to write to [Stackdriver Logging](https://
1186
+ # cloud.google.com/logging/docs/). This field may contain any value between 0.0
1187
+ # and 1.0, inclusive. 0.0 is the default and means that no operations are logged.
1188
+ # Corresponds to the JSON property `samplingRatio`
1189
+ # @return [Float]
1190
+ attr_accessor :sampling_ratio
1191
+
1192
+ def initialize(**args)
1193
+ update!(**args)
1194
+ end
1195
+
1196
+ # Update properties of this object
1197
+ def update!(**args)
1198
+ @sampling_ratio = args[:sampling_ratio] if args.key?(:sampling_ratio)
1199
+ end
1200
+ end
1201
+
1202
+ # The `Status` type defines a logical error model that is suitable for different
1203
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1204
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1205
+ # data: error code, error message, and error details. You can find out more
1206
+ # about this error model and how to work with it in the [API Design Guide](https:
1207
+ # //cloud.google.com/apis/design/errors).
1208
+ class Status
1209
+ include Google::Apis::Core::Hashable
1210
+
1211
+ # The status code, which should be an enum value of google.rpc.Code.
1212
+ # Corresponds to the JSON property `code`
1213
+ # @return [Fixnum]
1214
+ attr_accessor :code
1215
+
1216
+ # A list of messages that carry the error details. There is a common set of
1217
+ # message types for APIs to use.
1218
+ # Corresponds to the JSON property `details`
1219
+ # @return [Array<Hash<String,Object>>]
1220
+ attr_accessor :details
1221
+
1222
+ # A developer-facing error message, which should be in English. Any user-facing
1223
+ # error message should be localized and sent in the google.rpc.Status.details
1224
+ # field, or localized by the client.
1225
+ # Corresponds to the JSON property `message`
1226
+ # @return [String]
1227
+ attr_accessor :message
1228
+
1229
+ def initialize(**args)
1230
+ update!(**args)
1231
+ end
1232
+
1233
+ # Update properties of this object
1234
+ def update!(**args)
1235
+ @code = args[:code] if args.key?(:code)
1236
+ @details = args[:details] if args.key?(:details)
1237
+ @message = args[:message] if args.key?(:message)
1238
+ end
1239
+ end
1240
+
1241
+ # A unit of scheduled work.
1242
+ class Task
1243
+ include Google::Apis::Core::Hashable
1244
+
1245
+ # App Engine HTTP request. The message defines the HTTP request that is sent to
1246
+ # an App Engine app when the task is dispatched. Using AppEngineHttpRequest
1247
+ # requires [`appengine.applications.get`](https://cloud.google.com/appengine/
1248
+ # docs/admin-api/access-control) Google IAM permission for the project and the
1249
+ # following scope: `https://www.googleapis.com/auth/cloud-platform` The task
1250
+ # will be delivered to the App Engine app which belongs to the same project as
1251
+ # the queue. For more information, see [How Requests are Routed](https://cloud.
1252
+ # google.com/appengine/docs/standard/python/how-requests-are-routed) and how
1253
+ # routing is affected by [dispatch files](https://cloud.google.com/appengine/
1254
+ # docs/python/config/dispatchref). Traffic is encrypted during transport and
1255
+ # never leaves Google datacenters. Because this traffic is carried over a
1256
+ # communication mechanism internal to Google, you cannot explicitly set the
1257
+ # protocol (for example, HTTP or HTTPS). The request to the handler, however,
1258
+ # will appear to have used the HTTP protocol. The AppEngineRouting used to
1259
+ # construct the URL that the task is delivered to can be set at the queue-level
1260
+ # or task-level: * If app_engine_routing_override is set on the queue, this
1261
+ # value is used for all tasks in the queue, no matter what the setting is for
1262
+ # the task-level app_engine_routing. The `url` that the task will be sent to is:
1263
+ # * `url =` host `+` relative_uri Tasks can be dispatched to secure app handlers,
1264
+ # unsecure app handlers, and URIs restricted with [`login: admin`](https://
1265
+ # cloud.google.com/appengine/docs/standard/python/config/appref). Because tasks
1266
+ # are not run as any user, they cannot be dispatched to URIs restricted with [`
1267
+ # login: required`](https://cloud.google.com/appengine/docs/standard/python/
1268
+ # config/appref) Task dispatches also do not follow redirects. The task attempt
1269
+ # has succeeded if the app's request handler returns an HTTP response code in
1270
+ # the range [`200` - `299`]. The task attempt has failed if the app's handler
1271
+ # returns a non-2xx response code or Cloud Tasks does not receive response
1272
+ # before the deadline. Failed tasks will be retried according to the retry
1273
+ # configuration. `503` (Service Unavailable) is considered an App Engine system
1274
+ # error instead of an application error and will cause Cloud Tasks' traffic
1275
+ # congestion control to temporarily throttle the queue's dispatches. Unlike
1276
+ # other types of task targets, a `429` (Too Many Requests) response from an app
1277
+ # handler does not cause traffic congestion control to throttle the queue.
1278
+ # Corresponds to the JSON property `appEngineHttpRequest`
1279
+ # @return [Google::Apis::CloudtasksV2::AppEngineHttpRequest]
1280
+ attr_accessor :app_engine_http_request
1281
+
1282
+ # Output only. The time that the task was created. `create_time` will be
1283
+ # truncated to the nearest second.
1284
+ # Corresponds to the JSON property `createTime`
1285
+ # @return [String]
1286
+ attr_accessor :create_time
1287
+
1288
+ # Output only. The number of attempts dispatched. This count includes attempts
1289
+ # which have been dispatched but haven't received a response.
1290
+ # Corresponds to the JSON property `dispatchCount`
1291
+ # @return [Fixnum]
1292
+ attr_accessor :dispatch_count
1293
+
1294
+ # The deadline for requests sent to the worker. If the worker does not respond
1295
+ # by this deadline then the request is cancelled and the attempt is marked as a `
1296
+ # DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the task according to the
1297
+ # RetryConfig. Note that when the request is cancelled, Cloud Tasks will stop
1298
+ # listening for the response, but whether the worker stops processing depends on
1299
+ # the worker. For example, if the worker is stuck, it may not react to cancelled
1300
+ # requests. The default and maximum values depend on the type of request: * For
1301
+ # HTTP tasks, the default is 10 minutes. The deadline must be in the interval [
1302
+ # 15 seconds, 30 minutes]. * For App Engine tasks, 0 indicates that the request
1303
+ # has the default deadline. The default deadline depends on the [scaling type](
1304
+ # https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#
1305
+ # instance_scaling) of the service: 10 minutes for standard apps with automatic
1306
+ # scaling, 24 hours for standard apps with manual and basic scaling, and 60
1307
+ # minutes for flex apps. If the request deadline is set, it must be in the
1308
+ # interval [15 seconds, 24 hours 15 seconds]. Regardless of the task's `
1309
+ # dispatch_deadline`, the app handler will not run for longer than than the
1310
+ # service's timeout. We recommend setting the `dispatch_deadline` to at most a
1311
+ # few seconds more than the app handler's timeout. For more information see [
1312
+ # Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#
1313
+ # timeouts). `dispatch_deadline` will be truncated to the nearest millisecond.
1314
+ # The deadline is an approximate deadline.
1315
+ # Corresponds to the JSON property `dispatchDeadline`
1316
+ # @return [String]
1317
+ attr_accessor :dispatch_deadline
1318
+
1319
+ # The status of a task attempt.
1320
+ # Corresponds to the JSON property `firstAttempt`
1321
+ # @return [Google::Apis::CloudtasksV2::Attempt]
1322
+ attr_accessor :first_attempt
1323
+
1324
+ # HTTP request. The task will be pushed to the worker as an HTTP request. If the
1325
+ # worker or the redirected worker acknowledges the task by returning a
1326
+ # successful HTTP response code ([`200` - `299`]), the task will be removed from
1327
+ # the queue. If any other HTTP response code is returned or no response is
1328
+ # received, the task will be retried according to the following: * User-
1329
+ # specified throttling: retry configuration, rate limits, and the queue's state.
1330
+ # * System throttling: To prevent the worker from overloading, Cloud Tasks may
1331
+ # temporarily reduce the queue's effective rate. User-specified settings will
1332
+ # not be changed. System throttling happens because: * Cloud Tasks backs off on
1333
+ # all errors. Normally the backoff specified in rate limits will be used. But if
1334
+ # the worker returns `429` (Too Many Requests), `503` (Service Unavailable), or
1335
+ # the rate of errors is high, Cloud Tasks will use a higher backoff rate. The
1336
+ # retry specified in the `Retry-After` HTTP response header is considered. * To
1337
+ # prevent traffic spikes and to smooth sudden increases in traffic, dispatches
1338
+ # ramp up slowly when the queue is newly created or idle and if large numbers of
1339
+ # tasks suddenly become available to dispatch (due to spikes in create task
1340
+ # rates, the queue being unpaused, or many tasks that are scheduled at the same
1341
+ # time).
1342
+ # Corresponds to the JSON property `httpRequest`
1343
+ # @return [Google::Apis::CloudtasksV2::HttpRequest]
1344
+ attr_accessor :http_request
1345
+
1346
+ # The status of a task attempt.
1347
+ # Corresponds to the JSON property `lastAttempt`
1348
+ # @return [Google::Apis::CloudtasksV2::Attempt]
1349
+ attr_accessor :last_attempt
1350
+
1351
+ # Optionally caller-specified in CreateTask. The task name. The task name must
1352
+ # have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/
1353
+ # QUEUE_ID/tasks/TASK_ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers
1354
+ # ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see [
1355
+ # Identifying projects](https://cloud.google.com/resource-manager/docs/creating-
1356
+ # managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID
1357
+ # for the task's location. The list of available locations can be obtained by
1358
+ # calling ListLocations. For more information, see https://cloud.google.com/
1359
+ # about/locations/. * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1360
+ # or hyphens (-). The maximum length is 100 characters. * `TASK_ID` can contain
1361
+ # only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The
1362
+ # maximum length is 500 characters.
1363
+ # Corresponds to the JSON property `name`
1364
+ # @return [String]
1365
+ attr_accessor :name
1366
+
1367
+ # Output only. The number of attempts which have received a response.
1368
+ # Corresponds to the JSON property `responseCount`
1369
+ # @return [Fixnum]
1370
+ attr_accessor :response_count
1371
+
1372
+ # The time when the task is scheduled to be attempted or retried. `schedule_time`
1373
+ # will be truncated to the nearest microsecond.
1374
+ # Corresponds to the JSON property `scheduleTime`
1375
+ # @return [String]
1376
+ attr_accessor :schedule_time
1377
+
1378
+ # Output only. The view specifies which subset of the Task has been returned.
1379
+ # Corresponds to the JSON property `view`
1380
+ # @return [String]
1381
+ attr_accessor :view
1382
+
1383
+ def initialize(**args)
1384
+ update!(**args)
1385
+ end
1386
+
1387
+ # Update properties of this object
1388
+ def update!(**args)
1389
+ @app_engine_http_request = args[:app_engine_http_request] if args.key?(:app_engine_http_request)
1390
+ @create_time = args[:create_time] if args.key?(:create_time)
1391
+ @dispatch_count = args[:dispatch_count] if args.key?(:dispatch_count)
1392
+ @dispatch_deadline = args[:dispatch_deadline] if args.key?(:dispatch_deadline)
1393
+ @first_attempt = args[:first_attempt] if args.key?(:first_attempt)
1394
+ @http_request = args[:http_request] if args.key?(:http_request)
1395
+ @last_attempt = args[:last_attempt] if args.key?(:last_attempt)
1396
+ @name = args[:name] if args.key?(:name)
1397
+ @response_count = args[:response_count] if args.key?(:response_count)
1398
+ @schedule_time = args[:schedule_time] if args.key?(:schedule_time)
1399
+ @view = args[:view] if args.key?(:view)
1400
+ end
1401
+ end
1402
+
1403
+ # Request message for `TestIamPermissions` method.
1404
+ class TestIamPermissionsRequest
1405
+ include Google::Apis::Core::Hashable
1406
+
1407
+ # The set of permissions to check for the `resource`. Permissions with wildcards
1408
+ # (such as '*' or 'storage.*') are not allowed. For more information see [IAM
1409
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
1410
+ # Corresponds to the JSON property `permissions`
1411
+ # @return [Array<String>]
1412
+ attr_accessor :permissions
1413
+
1414
+ def initialize(**args)
1415
+ update!(**args)
1416
+ end
1417
+
1418
+ # Update properties of this object
1419
+ def update!(**args)
1420
+ @permissions = args[:permissions] if args.key?(:permissions)
1421
+ end
1422
+ end
1423
+
1424
+ # Response message for `TestIamPermissions` method.
1425
+ class TestIamPermissionsResponse
1426
+ include Google::Apis::Core::Hashable
1427
+
1428
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1429
+ # Corresponds to the JSON property `permissions`
1430
+ # @return [Array<String>]
1431
+ attr_accessor :permissions
1432
+
1433
+ def initialize(**args)
1434
+ update!(**args)
1435
+ end
1436
+
1437
+ # Update properties of this object
1438
+ def update!(**args)
1439
+ @permissions = args[:permissions] if args.key?(:permissions)
1440
+ end
1441
+ end
1442
+ end
1443
+ end
1444
+ end