google-cloud-tasks 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/tasks/v2/cloud_tasks_client.rb +1254 -0
- data/lib/google/cloud/tasks/v2/cloud_tasks_client_config.json +106 -0
- data/lib/google/cloud/tasks/v2/cloudtasks_pb.rb +99 -0
- data/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb +200 -0
- data/lib/google/cloud/tasks/v2/credentials.rb +41 -0
- data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/cloudtasks.rb +340 -0
- data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/queue.rb +333 -0
- data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/target.rb +270 -0
- data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/task.rb +170 -0
- data/lib/google/cloud/tasks/v2/doc/google/iam/v1/iam_policy.rb +63 -0
- data/lib/google/cloud/tasks/v2/doc/google/iam/v1/policy.rb +104 -0
- data/lib/google/cloud/tasks/v2/doc/google/protobuf/any.rb +130 -0
- data/lib/google/cloud/tasks/v2/doc/google/protobuf/duration.rb +91 -0
- data/lib/google/cloud/tasks/v2/doc/google/protobuf/empty.rb +29 -0
- data/lib/google/cloud/tasks/v2/doc/google/protobuf/field_mask.rb +230 -0
- data/lib/google/cloud/tasks/v2/doc/google/protobuf/timestamp.rb +109 -0
- data/lib/google/cloud/tasks/v2/doc/google/rpc/status.rb +87 -0
- data/lib/google/cloud/tasks/v2/helpers.rb +56 -0
- data/lib/google/cloud/tasks/v2/queue_pb.rb +51 -0
- data/lib/google/cloud/tasks/v2/target_pb.rb +44 -0
- data/lib/google/cloud/tasks/v2/task_pb.rb +50 -0
- data/lib/google/cloud/tasks/v2.rb +139 -0
- data/lib/google/cloud/tasks.rb +2 -2
- metadata +24 -2
@@ -0,0 +1,270 @@
|
|
1
|
+
# Copyright 2019 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
|
+
# https://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
|
+
|
16
|
+
module Google
|
17
|
+
module Cloud
|
18
|
+
module Tasks
|
19
|
+
module V2
|
20
|
+
# App Engine HTTP request.
|
21
|
+
#
|
22
|
+
# The message defines the HTTP request that is sent to an App Engine app when
|
23
|
+
# the task is dispatched.
|
24
|
+
#
|
25
|
+
# This proto can only be used for tasks in a queue which has
|
26
|
+
# {Queue#app_engine_http_queue app_engine_http_queue} set.
|
27
|
+
#
|
28
|
+
# Using {Google::Cloud::Tasks::V2::AppEngineHttpRequest AppEngineHttpRequest} requires
|
29
|
+
# [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
|
30
|
+
# Google IAM permission for the project
|
31
|
+
# and the following scope:
|
32
|
+
#
|
33
|
+
# `https://www.googleapis.com/auth/cloud-platform`
|
34
|
+
#
|
35
|
+
# The task will be delivered to the App Engine app which belongs to the same
|
36
|
+
# project as the queue. For more information, see
|
37
|
+
# [How Requests are
|
38
|
+
# Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
|
39
|
+
# and how routing is affected by
|
40
|
+
# [dispatch
|
41
|
+
# files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
|
42
|
+
# Traffic is encrypted during transport and never leaves Google datacenters.
|
43
|
+
# Because this traffic is carried over a communication mechanism internal to
|
44
|
+
# Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
|
45
|
+
# The request to the handler, however, will appear to have used the HTTP
|
46
|
+
# protocol.
|
47
|
+
#
|
48
|
+
# The {Google::Cloud::Tasks::V2::AppEngineRouting AppEngineRouting} used to construct the URL that the task is
|
49
|
+
# delivered to can be set at the queue-level or task-level:
|
50
|
+
#
|
51
|
+
# * If set,
|
52
|
+
# {Google::Cloud::Tasks::V2::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override}
|
53
|
+
# is used for all tasks in the queue, no matter what the setting
|
54
|
+
# is for the
|
55
|
+
# {Google::Cloud::Tasks::V2::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
|
56
|
+
#
|
57
|
+
#
|
58
|
+
# The `url` that the task will be sent to is:
|
59
|
+
#
|
60
|
+
# * `url =` {Google::Cloud::Tasks::V2::AppEngineRouting#host host} `+`
|
61
|
+
# {Google::Cloud::Tasks::V2::AppEngineHttpRequest#relative_uri relative_uri}
|
62
|
+
#
|
63
|
+
# Tasks can be dispatched to secure app handlers, unsecure app handlers, and
|
64
|
+
# URIs restricted with
|
65
|
+
# [`login:
|
66
|
+
# admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
|
67
|
+
# Because tasks are not run as any user, they cannot be dispatched to URIs
|
68
|
+
# restricted with
|
69
|
+
# [`login:
|
70
|
+
# required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
|
71
|
+
# Task dispatches also do not follow redirects.
|
72
|
+
#
|
73
|
+
# The task attempt has succeeded if the app's request handler returns
|
74
|
+
# an HTTP response code in the range [`200` - `299`]. `503` is
|
75
|
+
# considered an App Engine system error instead of an application
|
76
|
+
# error. Requests returning error `503` will be retried regardless of
|
77
|
+
# retry configuration and not counted against retry counts.
|
78
|
+
# Any other response code or a failure to receive a response before the
|
79
|
+
# deadline is a failed attempt.
|
80
|
+
# @!attribute [rw] http_method
|
81
|
+
# @return [Google::Cloud::Tasks::V2::HttpMethod]
|
82
|
+
# The HTTP method to use for the request. The default is POST.
|
83
|
+
#
|
84
|
+
# The app's request handler for the task's target URL must be able to handle
|
85
|
+
# HTTP requests with this http_method, otherwise the task attempt will fail
|
86
|
+
# with error code 405 (Method Not Allowed). See
|
87
|
+
# [Writing a push task request
|
88
|
+
# handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
|
89
|
+
# and the documentation for the request handlers in the language your app is
|
90
|
+
# written in e.g.
|
91
|
+
# [Python Request
|
92
|
+
# Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
|
93
|
+
# @!attribute [rw] app_engine_routing
|
94
|
+
# @return [Google::Cloud::Tasks::V2::AppEngineRouting]
|
95
|
+
# Task-level setting for App Engine routing.
|
96
|
+
#
|
97
|
+
# If set,
|
98
|
+
# {Google::Cloud::Tasks::V2::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override}
|
99
|
+
# is used for all tasks in the queue, no matter what the setting is for the
|
100
|
+
# {Google::Cloud::Tasks::V2::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
|
101
|
+
# @!attribute [rw] relative_uri
|
102
|
+
# @return [String]
|
103
|
+
# The relative URI.
|
104
|
+
#
|
105
|
+
# The relative URI must begin with "/" and must be a valid HTTP relative URI.
|
106
|
+
# It can contain a path and query string arguments.
|
107
|
+
# If the relative URI is empty, then the root path "/" will be used.
|
108
|
+
# No spaces are allowed, and the maximum length allowed is 2083 characters.
|
109
|
+
# @!attribute [rw] headers
|
110
|
+
# @return [Hash{String => String}]
|
111
|
+
# HTTP request headers.
|
112
|
+
#
|
113
|
+
# This map contains the header field names and values.
|
114
|
+
# Headers can be set when the
|
115
|
+
# {Google::Cloud::Tasks::V2::CloudTasks::CreateTask task is created}.
|
116
|
+
# Repeated headers are not supported but a header value can contain commas.
|
117
|
+
#
|
118
|
+
# Cloud Tasks sets some headers to default values:
|
119
|
+
#
|
120
|
+
# * `User-Agent`: By default, this header is
|
121
|
+
# `"AppEngine-Google; (+http://code.google.com/appengine)"`.
|
122
|
+
# This header can be modified, but Cloud Tasks will append
|
123
|
+
# `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
|
124
|
+
# modified `User-Agent`.
|
125
|
+
#
|
126
|
+
# If the task has a {Google::Cloud::Tasks::V2::AppEngineHttpRequest#body body}, Cloud
|
127
|
+
# Tasks sets the following headers:
|
128
|
+
#
|
129
|
+
# * `Content-Type`: By default, the `Content-Type` header is set to
|
130
|
+
# `"application/octet-stream"`. The default can be overridden by explicitly
|
131
|
+
# setting `Content-Type` to a particular media type when the
|
132
|
+
# {Google::Cloud::Tasks::V2::CloudTasks::CreateTask task is created}.
|
133
|
+
# For example, `Content-Type` can be set to `"application/json"`.
|
134
|
+
# * `Content-Length`: This is computed by Cloud Tasks. This value is
|
135
|
+
# output only. It cannot be changed.
|
136
|
+
#
|
137
|
+
# The headers below cannot be set or overridden:
|
138
|
+
#
|
139
|
+
# * `Host`
|
140
|
+
# * `X-Google-*`
|
141
|
+
# * `X-AppEngine-*`
|
142
|
+
#
|
143
|
+
# In addition, Cloud Tasks sets some headers when the task is dispatched,
|
144
|
+
# such as headers containing information about the task; see
|
145
|
+
# [request
|
146
|
+
# headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
|
147
|
+
# These headers are set only when the task is dispatched, so they are not
|
148
|
+
# visible when the task is returned in a Cloud Tasks response.
|
149
|
+
#
|
150
|
+
# Although there is no specific limit for the maximum number of headers or
|
151
|
+
# the size, there is a limit on the maximum size of the {Google::Cloud::Tasks::V2::Task Task}. For more
|
152
|
+
# information, see the {Google::Cloud::Tasks::V2::CloudTasks::CreateTask CreateTask} documentation.
|
153
|
+
# @!attribute [rw] body
|
154
|
+
# @return [String]
|
155
|
+
# HTTP request body.
|
156
|
+
#
|
157
|
+
# A request body is allowed only if the HTTP method is POST or PUT. It is
|
158
|
+
# an error to set a body on a task with an incompatible {Google::Cloud::Tasks::V2::HttpMethod HttpMethod}.
|
159
|
+
class AppEngineHttpRequest; end
|
160
|
+
|
161
|
+
# App Engine Routing.
|
162
|
+
#
|
163
|
+
# Defines routing characteristics specific to App Engine - service, version,
|
164
|
+
# and instance.
|
165
|
+
#
|
166
|
+
# For more information about services, versions, and instances see
|
167
|
+
# [An Overview of App
|
168
|
+
# Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
|
169
|
+
# [Microservices Architecture on Google App
|
170
|
+
# Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
|
171
|
+
# [App Engine Standard request
|
172
|
+
# routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
|
173
|
+
# and [App Engine Flex request
|
174
|
+
# routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
|
175
|
+
# @!attribute [rw] service
|
176
|
+
# @return [String]
|
177
|
+
# App service.
|
178
|
+
#
|
179
|
+
# By default, the task is sent to the service which is the default
|
180
|
+
# service when the task is attempted.
|
181
|
+
#
|
182
|
+
# For some queues or tasks which were created using the App Engine
|
183
|
+
# Task Queue API, {Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not parsable
|
184
|
+
# into {Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
185
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and
|
186
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. For example, some tasks
|
187
|
+
# which were created using the App Engine SDK use a custom domain
|
188
|
+
# name; custom domains are not parsed by Cloud Tasks. If
|
189
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not parsable, then
|
190
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
191
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and
|
192
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#instance instance} are the empty string.
|
193
|
+
# @!attribute [rw] version
|
194
|
+
# @return [String]
|
195
|
+
# App version.
|
196
|
+
#
|
197
|
+
# By default, the task is sent to the version which is the default
|
198
|
+
# version when the task is attempted.
|
199
|
+
#
|
200
|
+
# For some queues or tasks which were created using the App Engine
|
201
|
+
# Task Queue API, {Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not parsable
|
202
|
+
# into {Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
203
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and
|
204
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. For example, some tasks
|
205
|
+
# which were created using the App Engine SDK use a custom domain
|
206
|
+
# name; custom domains are not parsed by Cloud Tasks. If
|
207
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not parsable, then
|
208
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
209
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and
|
210
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#instance instance} are the empty string.
|
211
|
+
# @!attribute [rw] instance
|
212
|
+
# @return [String]
|
213
|
+
# App instance.
|
214
|
+
#
|
215
|
+
# By default, the task is sent to an instance which is available when
|
216
|
+
# the task is attempted.
|
217
|
+
#
|
218
|
+
# Requests can only be sent to a specific instance if
|
219
|
+
# [manual scaling is used in App Engine
|
220
|
+
# Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
|
221
|
+
# App Engine Flex does not support instances. For more information, see
|
222
|
+
# [App Engine Standard request
|
223
|
+
# routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
|
224
|
+
# and [App Engine Flex request
|
225
|
+
# routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
|
226
|
+
# @!attribute [rw] host
|
227
|
+
# @return [String]
|
228
|
+
# Output only. The host that the task is sent to.
|
229
|
+
#
|
230
|
+
# The host is constructed from the domain name of the app associated with
|
231
|
+
# the queue's project ID (for example <app-id>.appspot.com), and the
|
232
|
+
# {Google::Cloud::Tasks::V2::AppEngineRouting#service service}, {Google::Cloud::Tasks::V2::AppEngineRouting#version version},
|
233
|
+
# and {Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. Tasks which were created using
|
234
|
+
# the App Engine SDK might have a custom domain name.
|
235
|
+
#
|
236
|
+
# For more information, see
|
237
|
+
# [How Requests are
|
238
|
+
# Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
|
239
|
+
class AppEngineRouting; end
|
240
|
+
|
241
|
+
# The HTTP method used to deliver the task.
|
242
|
+
module HttpMethod
|
243
|
+
# HTTP method unspecified
|
244
|
+
HTTP_METHOD_UNSPECIFIED = 0
|
245
|
+
|
246
|
+
# HTTP POST
|
247
|
+
POST = 1
|
248
|
+
|
249
|
+
# HTTP GET
|
250
|
+
GET = 2
|
251
|
+
|
252
|
+
# HTTP HEAD
|
253
|
+
HEAD = 3
|
254
|
+
|
255
|
+
# HTTP PUT
|
256
|
+
PUT = 4
|
257
|
+
|
258
|
+
# HTTP DELETE
|
259
|
+
DELETE = 5
|
260
|
+
|
261
|
+
# HTTP PATCH
|
262
|
+
PATCH = 6
|
263
|
+
|
264
|
+
# HTTP OPTIONS
|
265
|
+
OPTIONS = 7
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
@@ -0,0 +1,170 @@
|
|
1
|
+
# Copyright 2019 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
|
+
# https://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
|
+
|
16
|
+
module Google
|
17
|
+
module Cloud
|
18
|
+
module Tasks
|
19
|
+
module V2
|
20
|
+
# A unit of scheduled work.
|
21
|
+
# @!attribute [rw] name
|
22
|
+
# @return [String]
|
23
|
+
# Optionally caller-specified in {Google::Cloud::Tasks::V2::CloudTasks::CreateTask CreateTask}.
|
24
|
+
#
|
25
|
+
# The task name.
|
26
|
+
#
|
27
|
+
# The task name must have the following format:
|
28
|
+
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
|
29
|
+
#
|
30
|
+
# * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
|
31
|
+
# hyphens (-), colons (:), or periods (.).
|
32
|
+
# For more information, see
|
33
|
+
# [Identifying
|
34
|
+
# projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
|
35
|
+
# * `LOCATION_ID` is the canonical ID for the task's location.
|
36
|
+
# The list of available locations can be obtained by calling
|
37
|
+
# {Google::Cloud::Location::Locations::ListLocations ListLocations}.
|
38
|
+
# For more information, see https://cloud.google.com/about/locations/.
|
39
|
+
# * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
|
40
|
+
# hyphens (-). The maximum length is 100 characters.
|
41
|
+
# * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
|
42
|
+
# hyphens (-), or underscores (_). The maximum length is 500 characters.
|
43
|
+
# @!attribute [rw] app_engine_http_request
|
44
|
+
# @return [Google::Cloud::Tasks::V2::AppEngineHttpRequest]
|
45
|
+
# HTTP request that is sent to the App Engine app handler.
|
46
|
+
#
|
47
|
+
# An App Engine task is a task that has {Google::Cloud::Tasks::V2::AppEngineHttpRequest AppEngineHttpRequest} set.
|
48
|
+
# @!attribute [rw] schedule_time
|
49
|
+
# @return [Google::Protobuf::Timestamp]
|
50
|
+
# The time when the task is scheduled to be attempted.
|
51
|
+
#
|
52
|
+
# For App Engine queues, this is when the task will be attempted or retried.
|
53
|
+
#
|
54
|
+
# `schedule_time` will be truncated to the nearest microsecond.
|
55
|
+
# @!attribute [rw] create_time
|
56
|
+
# @return [Google::Protobuf::Timestamp]
|
57
|
+
# Output only. The time that the task was created.
|
58
|
+
#
|
59
|
+
# `create_time` will be truncated to the nearest second.
|
60
|
+
# @!attribute [rw] dispatch_deadline
|
61
|
+
# @return [Google::Protobuf::Duration]
|
62
|
+
# The deadline for requests sent to the worker. If the worker does not
|
63
|
+
# respond by this deadline then the request is cancelled and the attempt
|
64
|
+
# is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
|
65
|
+
# task according to the {Google::Cloud::Tasks::V2::RetryConfig RetryConfig}.
|
66
|
+
#
|
67
|
+
# Note that when the request is cancelled, Cloud Tasks will stop listing for
|
68
|
+
# the response, but whether the worker stops processing depends on the
|
69
|
+
# worker. For example, if the worker is stuck, it may not react to cancelled
|
70
|
+
# requests.
|
71
|
+
#
|
72
|
+
# The default and maximum values depend on the type of request:
|
73
|
+
#
|
74
|
+
#
|
75
|
+
# * For {Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks}, 0 indicates that the
|
76
|
+
# request has the default deadline. The default deadline depends on the
|
77
|
+
# [scaling
|
78
|
+
# type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
|
79
|
+
# of the service: 10 minutes for standard apps with automatic scaling, 24
|
80
|
+
# hours for standard apps with manual and basic scaling, and 60 minutes for
|
81
|
+
# flex apps. If the request deadline is set, it must be in the interval [15
|
82
|
+
# seconds, 24 hours 15 seconds]. Regardless of the task's
|
83
|
+
# `dispatch_deadline`, the app handler will not run for longer than than
|
84
|
+
# the service's timeout. We recommend setting the `dispatch_deadline` to
|
85
|
+
# at most a few seconds more than the app handler's timeout. For more
|
86
|
+
# information see
|
87
|
+
# [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
|
88
|
+
#
|
89
|
+
# `dispatch_deadline` will be truncated to the nearest millisecond. The
|
90
|
+
# deadline is an approximate deadline.
|
91
|
+
# @!attribute [rw] dispatch_count
|
92
|
+
# @return [Integer]
|
93
|
+
# Output only. The number of attempts dispatched.
|
94
|
+
#
|
95
|
+
# This count includes attempts which have been dispatched but haven't
|
96
|
+
# received a response.
|
97
|
+
# @!attribute [rw] response_count
|
98
|
+
# @return [Integer]
|
99
|
+
# Output only. The number of attempts which have received a response.
|
100
|
+
# @!attribute [rw] first_attempt
|
101
|
+
# @return [Google::Cloud::Tasks::V2::Attempt]
|
102
|
+
# Output only. The status of the task's first attempt.
|
103
|
+
#
|
104
|
+
# Only {Google::Cloud::Tasks::V2::Attempt#dispatch_time dispatch_time} will be set.
|
105
|
+
# The other {Google::Cloud::Tasks::V2::Attempt Attempt} information is not retained by Cloud Tasks.
|
106
|
+
# @!attribute [rw] last_attempt
|
107
|
+
# @return [Google::Cloud::Tasks::V2::Attempt]
|
108
|
+
# Output only. The status of the task's last attempt.
|
109
|
+
# @!attribute [rw] view
|
110
|
+
# @return [Google::Cloud::Tasks::V2::Task::View]
|
111
|
+
# Output only. The view specifies which subset of the {Google::Cloud::Tasks::V2::Task Task} has
|
112
|
+
# been returned.
|
113
|
+
class Task
|
114
|
+
# The view specifies a subset of {Google::Cloud::Tasks::V2::Task Task} data.
|
115
|
+
#
|
116
|
+
# When a task is returned in a response, not all
|
117
|
+
# information is retrieved by default because some data, such as
|
118
|
+
# payloads, might be desirable to return only when needed because
|
119
|
+
# of its large size or because of the sensitivity of data that it
|
120
|
+
# contains.
|
121
|
+
module View
|
122
|
+
# Unspecified. Defaults to BASIC.
|
123
|
+
VIEW_UNSPECIFIED = 0
|
124
|
+
|
125
|
+
# The basic view omits fields which can be large or can contain
|
126
|
+
# sensitive data.
|
127
|
+
#
|
128
|
+
# This view does not include the
|
129
|
+
# {Google::Cloud::Tasks::V2::AppEngineHttpRequest#body body in AppEngineHttpRequest}.
|
130
|
+
# Bodies are desirable to return only when needed, because they
|
131
|
+
# can be large and because of the sensitivity of the data that you
|
132
|
+
# choose to store in it.
|
133
|
+
BASIC = 1
|
134
|
+
|
135
|
+
# All information is returned.
|
136
|
+
#
|
137
|
+
# Authorization for {Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires
|
138
|
+
# `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
|
139
|
+
# permission on the {Google::Cloud::Tasks::V2::Queue Queue} resource.
|
140
|
+
FULL = 2
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# The status of a task attempt.
|
145
|
+
# @!attribute [rw] schedule_time
|
146
|
+
# @return [Google::Protobuf::Timestamp]
|
147
|
+
# Output only. The time that this attempt was scheduled.
|
148
|
+
#
|
149
|
+
# `schedule_time` will be truncated to the nearest microsecond.
|
150
|
+
# @!attribute [rw] dispatch_time
|
151
|
+
# @return [Google::Protobuf::Timestamp]
|
152
|
+
# Output only. The time that this attempt was dispatched.
|
153
|
+
#
|
154
|
+
# `dispatch_time` will be truncated to the nearest microsecond.
|
155
|
+
# @!attribute [rw] response_time
|
156
|
+
# @return [Google::Protobuf::Timestamp]
|
157
|
+
# Output only. The time that this attempt response was received.
|
158
|
+
#
|
159
|
+
# `response_time` will be truncated to the nearest microsecond.
|
160
|
+
# @!attribute [rw] response_status
|
161
|
+
# @return [Google::Rpc::Status]
|
162
|
+
# Output only. The response from the worker for this attempt.
|
163
|
+
#
|
164
|
+
# If `response_time` is unset, then the task has not been attempted or is
|
165
|
+
# currently running and the `response_status` field is meaningless.
|
166
|
+
class Attempt; end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Copyright 2019 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
|
+
# https://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
|
+
|
16
|
+
module Google
|
17
|
+
module Iam
|
18
|
+
module V1
|
19
|
+
# Request message for `SetIamPolicy` method.
|
20
|
+
# @!attribute [rw] resource
|
21
|
+
# @return [String]
|
22
|
+
# REQUIRED: The resource for which the policy is being specified.
|
23
|
+
# `resource` is usually specified as a path. For example, a Project
|
24
|
+
# resource is specified as `projects/{project}`.
|
25
|
+
# @!attribute [rw] policy
|
26
|
+
# @return [Google::Iam::V1::Policy]
|
27
|
+
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
28
|
+
# the policy is limited to a few 10s of KB. An empty policy is a
|
29
|
+
# valid policy but certain Cloud Platform services (such as Projects)
|
30
|
+
# might reject them.
|
31
|
+
class SetIamPolicyRequest; end
|
32
|
+
|
33
|
+
# Request message for `GetIamPolicy` method.
|
34
|
+
# @!attribute [rw] resource
|
35
|
+
# @return [String]
|
36
|
+
# REQUIRED: The resource for which the policy is being requested.
|
37
|
+
# `resource` is usually specified as a path. For example, a Project
|
38
|
+
# resource is specified as `projects/{project}`.
|
39
|
+
class GetIamPolicyRequest; end
|
40
|
+
|
41
|
+
# Request message for `TestIamPermissions` method.
|
42
|
+
# @!attribute [rw] resource
|
43
|
+
# @return [String]
|
44
|
+
# REQUIRED: The resource for which the policy detail is being requested.
|
45
|
+
# `resource` is usually specified as a path. For example, a Project
|
46
|
+
# resource is specified as `projects/{project}`.
|
47
|
+
# @!attribute [rw] permissions
|
48
|
+
# @return [Array<String>]
|
49
|
+
# The set of permissions to check for the `resource`. Permissions with
|
50
|
+
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
51
|
+
# information see
|
52
|
+
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
53
|
+
class TestIamPermissionsRequest; end
|
54
|
+
|
55
|
+
# Response message for `TestIamPermissions` method.
|
56
|
+
# @!attribute [rw] permissions
|
57
|
+
# @return [Array<String>]
|
58
|
+
# A subset of `TestPermissionsRequest.permissions` that the caller is
|
59
|
+
# allowed.
|
60
|
+
class TestIamPermissionsResponse; end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|