1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/tasks/v2beta3/task.proto 18 19 package com.google.cloud.tasks.v2beta3; 20 21 public interface TaskOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.Task) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Optionally caller-specified in 31 * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. 32 * The task name. 33 * The task name must have the following format: 34 * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` 35 * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), 36 * hyphens (-), colons (:), or periods (.). 37 * For more information, see 38 * [Identifying 39 * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) 40 * * `LOCATION_ID` is the canonical ID for the task's location. 41 * The list of available locations can be obtained by calling 42 * [ListLocations][google.cloud.location.Locations.ListLocations]. 43 * For more information, see https://cloud.google.com/about/locations/. 44 * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or 45 * hyphens (-). The maximum length is 100 characters. 46 * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), 47 * hyphens (-), or underscores (_). The maximum length is 500 characters. 48 * </pre> 49 * 50 * <code>string name = 1;</code> 51 * 52 * @return The name. 53 */ getName()54 java.lang.String getName(); 55 /** 56 * 57 * 58 * <pre> 59 * Optionally caller-specified in 60 * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. 61 * The task name. 62 * The task name must have the following format: 63 * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` 64 * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), 65 * hyphens (-), colons (:), or periods (.). 66 * For more information, see 67 * [Identifying 68 * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) 69 * * `LOCATION_ID` is the canonical ID for the task's location. 70 * The list of available locations can be obtained by calling 71 * [ListLocations][google.cloud.location.Locations.ListLocations]. 72 * For more information, see https://cloud.google.com/about/locations/. 73 * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or 74 * hyphens (-). The maximum length is 100 characters. 75 * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), 76 * hyphens (-), or underscores (_). The maximum length is 500 characters. 77 * </pre> 78 * 79 * <code>string name = 1;</code> 80 * 81 * @return The bytes for name. 82 */ getNameBytes()83 com.google.protobuf.ByteString getNameBytes(); 84 85 /** 86 * 87 * 88 * <pre> 89 * HTTP request that is sent to the App Engine app handler. 90 * An App Engine task is a task that has 91 * [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] 92 * set. 93 * </pre> 94 * 95 * <code>.google.cloud.tasks.v2beta3.AppEngineHttpRequest app_engine_http_request = 3;</code> 96 * 97 * @return Whether the appEngineHttpRequest field is set. 98 */ hasAppEngineHttpRequest()99 boolean hasAppEngineHttpRequest(); 100 /** 101 * 102 * 103 * <pre> 104 * HTTP request that is sent to the App Engine app handler. 105 * An App Engine task is a task that has 106 * [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] 107 * set. 108 * </pre> 109 * 110 * <code>.google.cloud.tasks.v2beta3.AppEngineHttpRequest app_engine_http_request = 3;</code> 111 * 112 * @return The appEngineHttpRequest. 113 */ getAppEngineHttpRequest()114 com.google.cloud.tasks.v2beta3.AppEngineHttpRequest getAppEngineHttpRequest(); 115 /** 116 * 117 * 118 * <pre> 119 * HTTP request that is sent to the App Engine app handler. 120 * An App Engine task is a task that has 121 * [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] 122 * set. 123 * </pre> 124 * 125 * <code>.google.cloud.tasks.v2beta3.AppEngineHttpRequest app_engine_http_request = 3;</code> 126 */ getAppEngineHttpRequestOrBuilder()127 com.google.cloud.tasks.v2beta3.AppEngineHttpRequestOrBuilder getAppEngineHttpRequestOrBuilder(); 128 129 /** 130 * 131 * 132 * <pre> 133 * HTTP request that is sent to the task's target. 134 * An HTTP task is a task that has 135 * [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. 136 * </pre> 137 * 138 * <code>.google.cloud.tasks.v2beta3.HttpRequest http_request = 11;</code> 139 * 140 * @return Whether the httpRequest field is set. 141 */ hasHttpRequest()142 boolean hasHttpRequest(); 143 /** 144 * 145 * 146 * <pre> 147 * HTTP request that is sent to the task's target. 148 * An HTTP task is a task that has 149 * [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. 150 * </pre> 151 * 152 * <code>.google.cloud.tasks.v2beta3.HttpRequest http_request = 11;</code> 153 * 154 * @return The httpRequest. 155 */ getHttpRequest()156 com.google.cloud.tasks.v2beta3.HttpRequest getHttpRequest(); 157 /** 158 * 159 * 160 * <pre> 161 * HTTP request that is sent to the task's target. 162 * An HTTP task is a task that has 163 * [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. 164 * </pre> 165 * 166 * <code>.google.cloud.tasks.v2beta3.HttpRequest http_request = 11;</code> 167 */ getHttpRequestOrBuilder()168 com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder getHttpRequestOrBuilder(); 169 170 /** 171 * 172 * 173 * <pre> 174 * Pull Message contained in a task in a 175 * [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This payload 176 * type cannot be explicitly set through Cloud Tasks API. Its purpose, 177 * currently is to provide backward compatibility with App Engine Task Queue 178 * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) 179 * queues to provide a way to inspect contents of pull tasks through the 180 * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. 181 * </pre> 182 * 183 * <code>.google.cloud.tasks.v2beta3.PullMessage pull_message = 13;</code> 184 * 185 * @return Whether the pullMessage field is set. 186 */ hasPullMessage()187 boolean hasPullMessage(); 188 /** 189 * 190 * 191 * <pre> 192 * Pull Message contained in a task in a 193 * [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This payload 194 * type cannot be explicitly set through Cloud Tasks API. Its purpose, 195 * currently is to provide backward compatibility with App Engine Task Queue 196 * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) 197 * queues to provide a way to inspect contents of pull tasks through the 198 * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. 199 * </pre> 200 * 201 * <code>.google.cloud.tasks.v2beta3.PullMessage pull_message = 13;</code> 202 * 203 * @return The pullMessage. 204 */ getPullMessage()205 com.google.cloud.tasks.v2beta3.PullMessage getPullMessage(); 206 /** 207 * 208 * 209 * <pre> 210 * Pull Message contained in a task in a 211 * [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This payload 212 * type cannot be explicitly set through Cloud Tasks API. Its purpose, 213 * currently is to provide backward compatibility with App Engine Task Queue 214 * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) 215 * queues to provide a way to inspect contents of pull tasks through the 216 * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. 217 * </pre> 218 * 219 * <code>.google.cloud.tasks.v2beta3.PullMessage pull_message = 13;</code> 220 */ getPullMessageOrBuilder()221 com.google.cloud.tasks.v2beta3.PullMessageOrBuilder getPullMessageOrBuilder(); 222 223 /** 224 * 225 * 226 * <pre> 227 * The time when the task is scheduled to be attempted. 228 * For App Engine queues, this is when the task will be attempted or retried. 229 * `schedule_time` will be truncated to the nearest microsecond. 230 * </pre> 231 * 232 * <code>.google.protobuf.Timestamp schedule_time = 4;</code> 233 * 234 * @return Whether the scheduleTime field is set. 235 */ hasScheduleTime()236 boolean hasScheduleTime(); 237 /** 238 * 239 * 240 * <pre> 241 * The time when the task is scheduled to be attempted. 242 * For App Engine queues, this is when the task will be attempted or retried. 243 * `schedule_time` will be truncated to the nearest microsecond. 244 * </pre> 245 * 246 * <code>.google.protobuf.Timestamp schedule_time = 4;</code> 247 * 248 * @return The scheduleTime. 249 */ getScheduleTime()250 com.google.protobuf.Timestamp getScheduleTime(); 251 /** 252 * 253 * 254 * <pre> 255 * The time when the task is scheduled to be attempted. 256 * For App Engine queues, this is when the task will be attempted or retried. 257 * `schedule_time` will be truncated to the nearest microsecond. 258 * </pre> 259 * 260 * <code>.google.protobuf.Timestamp schedule_time = 4;</code> 261 */ getScheduleTimeOrBuilder()262 com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder(); 263 264 /** 265 * 266 * 267 * <pre> 268 * Output only. The time that the task was created. 269 * `create_time` will be truncated to the nearest second. 270 * </pre> 271 * 272 * <code>.google.protobuf.Timestamp create_time = 5;</code> 273 * 274 * @return Whether the createTime field is set. 275 */ hasCreateTime()276 boolean hasCreateTime(); 277 /** 278 * 279 * 280 * <pre> 281 * Output only. The time that the task was created. 282 * `create_time` will be truncated to the nearest second. 283 * </pre> 284 * 285 * <code>.google.protobuf.Timestamp create_time = 5;</code> 286 * 287 * @return The createTime. 288 */ getCreateTime()289 com.google.protobuf.Timestamp getCreateTime(); 290 /** 291 * 292 * 293 * <pre> 294 * Output only. The time that the task was created. 295 * `create_time` will be truncated to the nearest second. 296 * </pre> 297 * 298 * <code>.google.protobuf.Timestamp create_time = 5;</code> 299 */ getCreateTimeOrBuilder()300 com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); 301 302 /** 303 * 304 * 305 * <pre> 306 * The deadline for requests sent to the worker. If the worker does not 307 * respond by this deadline then the request is cancelled and the attempt 308 * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the 309 * task according to the 310 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. 311 * Note that when the request is cancelled, Cloud Tasks will stop listening 312 * for the response, but whether the worker stops processing depends on the 313 * worker. For example, if the worker is stuck, it may not react to cancelled 314 * requests. 315 * The default and maximum values depend on the type of request: 316 * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is 317 * 10 minutes. The deadline 318 * must be in the interval [15 seconds, 30 minutes]. 319 * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 320 * 0 indicates that the 321 * request has the default deadline. The default deadline depends on the 322 * [scaling 323 * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) 324 * of the service: 10 minutes for standard apps with automatic scaling, 24 325 * hours for standard apps with manual and basic scaling, and 60 minutes for 326 * flex apps. If the request deadline is set, it must be in the interval [15 327 * seconds, 24 hours 15 seconds]. Regardless of the task's 328 * `dispatch_deadline`, the app handler will not run for longer than than 329 * the service's timeout. We recommend setting the `dispatch_deadline` to 330 * at most a few seconds more than the app handler's timeout. For more 331 * information see 332 * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). 333 * `dispatch_deadline` will be truncated to the nearest millisecond. The 334 * deadline is an approximate deadline. 335 * </pre> 336 * 337 * <code>.google.protobuf.Duration dispatch_deadline = 12;</code> 338 * 339 * @return Whether the dispatchDeadline field is set. 340 */ hasDispatchDeadline()341 boolean hasDispatchDeadline(); 342 /** 343 * 344 * 345 * <pre> 346 * The deadline for requests sent to the worker. If the worker does not 347 * respond by this deadline then the request is cancelled and the attempt 348 * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the 349 * task according to the 350 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. 351 * Note that when the request is cancelled, Cloud Tasks will stop listening 352 * for the response, but whether the worker stops processing depends on the 353 * worker. For example, if the worker is stuck, it may not react to cancelled 354 * requests. 355 * The default and maximum values depend on the type of request: 356 * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is 357 * 10 minutes. The deadline 358 * must be in the interval [15 seconds, 30 minutes]. 359 * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 360 * 0 indicates that the 361 * request has the default deadline. The default deadline depends on the 362 * [scaling 363 * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) 364 * of the service: 10 minutes for standard apps with automatic scaling, 24 365 * hours for standard apps with manual and basic scaling, and 60 minutes for 366 * flex apps. If the request deadline is set, it must be in the interval [15 367 * seconds, 24 hours 15 seconds]. Regardless of the task's 368 * `dispatch_deadline`, the app handler will not run for longer than than 369 * the service's timeout. We recommend setting the `dispatch_deadline` to 370 * at most a few seconds more than the app handler's timeout. For more 371 * information see 372 * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). 373 * `dispatch_deadline` will be truncated to the nearest millisecond. The 374 * deadline is an approximate deadline. 375 * </pre> 376 * 377 * <code>.google.protobuf.Duration dispatch_deadline = 12;</code> 378 * 379 * @return The dispatchDeadline. 380 */ getDispatchDeadline()381 com.google.protobuf.Duration getDispatchDeadline(); 382 /** 383 * 384 * 385 * <pre> 386 * The deadline for requests sent to the worker. If the worker does not 387 * respond by this deadline then the request is cancelled and the attempt 388 * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the 389 * task according to the 390 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. 391 * Note that when the request is cancelled, Cloud Tasks will stop listening 392 * for the response, but whether the worker stops processing depends on the 393 * worker. For example, if the worker is stuck, it may not react to cancelled 394 * requests. 395 * The default and maximum values depend on the type of request: 396 * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is 397 * 10 minutes. The deadline 398 * must be in the interval [15 seconds, 30 minutes]. 399 * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 400 * 0 indicates that the 401 * request has the default deadline. The default deadline depends on the 402 * [scaling 403 * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) 404 * of the service: 10 minutes for standard apps with automatic scaling, 24 405 * hours for standard apps with manual and basic scaling, and 60 minutes for 406 * flex apps. If the request deadline is set, it must be in the interval [15 407 * seconds, 24 hours 15 seconds]. Regardless of the task's 408 * `dispatch_deadline`, the app handler will not run for longer than than 409 * the service's timeout. We recommend setting the `dispatch_deadline` to 410 * at most a few seconds more than the app handler's timeout. For more 411 * information see 412 * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). 413 * `dispatch_deadline` will be truncated to the nearest millisecond. The 414 * deadline is an approximate deadline. 415 * </pre> 416 * 417 * <code>.google.protobuf.Duration dispatch_deadline = 12;</code> 418 */ getDispatchDeadlineOrBuilder()419 com.google.protobuf.DurationOrBuilder getDispatchDeadlineOrBuilder(); 420 421 /** 422 * 423 * 424 * <pre> 425 * Output only. The number of attempts dispatched. 426 * This count includes attempts which have been dispatched but haven't 427 * received a response. 428 * </pre> 429 * 430 * <code>int32 dispatch_count = 6;</code> 431 * 432 * @return The dispatchCount. 433 */ getDispatchCount()434 int getDispatchCount(); 435 436 /** 437 * 438 * 439 * <pre> 440 * Output only. The number of attempts which have received a response. 441 * </pre> 442 * 443 * <code>int32 response_count = 7;</code> 444 * 445 * @return The responseCount. 446 */ getResponseCount()447 int getResponseCount(); 448 449 /** 450 * 451 * 452 * <pre> 453 * Output only. The status of the task's first attempt. 454 * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will 455 * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information 456 * is not retained by Cloud Tasks. 457 * </pre> 458 * 459 * <code>.google.cloud.tasks.v2beta3.Attempt first_attempt = 8;</code> 460 * 461 * @return Whether the firstAttempt field is set. 462 */ hasFirstAttempt()463 boolean hasFirstAttempt(); 464 /** 465 * 466 * 467 * <pre> 468 * Output only. The status of the task's first attempt. 469 * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will 470 * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information 471 * is not retained by Cloud Tasks. 472 * </pre> 473 * 474 * <code>.google.cloud.tasks.v2beta3.Attempt first_attempt = 8;</code> 475 * 476 * @return The firstAttempt. 477 */ getFirstAttempt()478 com.google.cloud.tasks.v2beta3.Attempt getFirstAttempt(); 479 /** 480 * 481 * 482 * <pre> 483 * Output only. The status of the task's first attempt. 484 * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will 485 * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information 486 * is not retained by Cloud Tasks. 487 * </pre> 488 * 489 * <code>.google.cloud.tasks.v2beta3.Attempt first_attempt = 8;</code> 490 */ getFirstAttemptOrBuilder()491 com.google.cloud.tasks.v2beta3.AttemptOrBuilder getFirstAttemptOrBuilder(); 492 493 /** 494 * 495 * 496 * <pre> 497 * Output only. The status of the task's last attempt. 498 * </pre> 499 * 500 * <code>.google.cloud.tasks.v2beta3.Attempt last_attempt = 9;</code> 501 * 502 * @return Whether the lastAttempt field is set. 503 */ hasLastAttempt()504 boolean hasLastAttempt(); 505 /** 506 * 507 * 508 * <pre> 509 * Output only. The status of the task's last attempt. 510 * </pre> 511 * 512 * <code>.google.cloud.tasks.v2beta3.Attempt last_attempt = 9;</code> 513 * 514 * @return The lastAttempt. 515 */ getLastAttempt()516 com.google.cloud.tasks.v2beta3.Attempt getLastAttempt(); 517 /** 518 * 519 * 520 * <pre> 521 * Output only. The status of the task's last attempt. 522 * </pre> 523 * 524 * <code>.google.cloud.tasks.v2beta3.Attempt last_attempt = 9;</code> 525 */ getLastAttemptOrBuilder()526 com.google.cloud.tasks.v2beta3.AttemptOrBuilder getLastAttemptOrBuilder(); 527 528 /** 529 * 530 * 531 * <pre> 532 * Output only. The view specifies which subset of the 533 * [Task][google.cloud.tasks.v2beta3.Task] has been returned. 534 * </pre> 535 * 536 * <code>.google.cloud.tasks.v2beta3.Task.View view = 10;</code> 537 * 538 * @return The enum numeric value on the wire for view. 539 */ getViewValue()540 int getViewValue(); 541 /** 542 * 543 * 544 * <pre> 545 * Output only. The view specifies which subset of the 546 * [Task][google.cloud.tasks.v2beta3.Task] has been returned. 547 * </pre> 548 * 549 * <code>.google.cloud.tasks.v2beta3.Task.View view = 10;</code> 550 * 551 * @return The view. 552 */ getView()553 com.google.cloud.tasks.v2beta3.Task.View getView(); 554 getPayloadTypeCase()555 public com.google.cloud.tasks.v2beta3.Task.PayloadTypeCase getPayloadTypeCase(); 556 } 557