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/queue.proto 18 19 package com.google.cloud.tasks.v2beta3; 20 21 /** 22 * 23 * 24 * <pre> 25 * Retry config. 26 * These settings determine when a failed task attempt is retried. 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.tasks.v2beta3.RetryConfig} 30 */ 31 public final class RetryConfig extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.RetryConfig) 34 RetryConfigOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use RetryConfig.newBuilder() to construct. RetryConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private RetryConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 RetryConfig()41 private RetryConfig() {} 42 43 @java.lang.Override 44 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)45 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 46 return new RetryConfig(); 47 } 48 49 @java.lang.Override getUnknownFields()50 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 51 return this.unknownFields; 52 } 53 getDescriptor()54 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 55 return com.google.cloud.tasks.v2beta3.QueueProto 56 .internal_static_google_cloud_tasks_v2beta3_RetryConfig_descriptor; 57 } 58 59 @java.lang.Override 60 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()61 internalGetFieldAccessorTable() { 62 return com.google.cloud.tasks.v2beta3.QueueProto 63 .internal_static_google_cloud_tasks_v2beta3_RetryConfig_fieldAccessorTable 64 .ensureFieldAccessorsInitialized( 65 com.google.cloud.tasks.v2beta3.RetryConfig.class, 66 com.google.cloud.tasks.v2beta3.RetryConfig.Builder.class); 67 } 68 69 public static final int MAX_ATTEMPTS_FIELD_NUMBER = 1; 70 private int maxAttempts_ = 0; 71 /** 72 * 73 * 74 * <pre> 75 * Number of attempts per task. 76 * Cloud Tasks will attempt the task `max_attempts` times (that is, if the 77 * first attempt fails, then there will be `max_attempts - 1` retries). Must 78 * be >= -1. 79 * If unspecified when the queue is created, Cloud Tasks will pick the 80 * default. 81 * -1 indicates unlimited attempts. 82 * This field has the same meaning as 83 * [task_retry_limit in 84 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 85 * </pre> 86 * 87 * <code>int32 max_attempts = 1;</code> 88 * 89 * @return The maxAttempts. 90 */ 91 @java.lang.Override getMaxAttempts()92 public int getMaxAttempts() { 93 return maxAttempts_; 94 } 95 96 public static final int MAX_RETRY_DURATION_FIELD_NUMBER = 2; 97 private com.google.protobuf.Duration maxRetryDuration_; 98 /** 99 * 100 * 101 * <pre> 102 * If positive, `max_retry_duration` specifies the time limit for 103 * retrying a failed task, measured from when the task was first 104 * attempted. Once `max_retry_duration` time has passed *and* the 105 * task has been attempted 106 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 107 * no further attempts will be made and the task will be deleted. 108 * If zero, then the task age is unlimited. 109 * If unspecified when the queue is created, Cloud Tasks will pick the 110 * default. 111 * `max_retry_duration` will be truncated to the nearest second. 112 * This field has the same meaning as 113 * [task_age_limit in 114 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 115 * </pre> 116 * 117 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 118 * 119 * @return Whether the maxRetryDuration field is set. 120 */ 121 @java.lang.Override hasMaxRetryDuration()122 public boolean hasMaxRetryDuration() { 123 return maxRetryDuration_ != null; 124 } 125 /** 126 * 127 * 128 * <pre> 129 * If positive, `max_retry_duration` specifies the time limit for 130 * retrying a failed task, measured from when the task was first 131 * attempted. Once `max_retry_duration` time has passed *and* the 132 * task has been attempted 133 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 134 * no further attempts will be made and the task will be deleted. 135 * If zero, then the task age is unlimited. 136 * If unspecified when the queue is created, Cloud Tasks will pick the 137 * default. 138 * `max_retry_duration` will be truncated to the nearest second. 139 * This field has the same meaning as 140 * [task_age_limit in 141 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 142 * </pre> 143 * 144 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 145 * 146 * @return The maxRetryDuration. 147 */ 148 @java.lang.Override getMaxRetryDuration()149 public com.google.protobuf.Duration getMaxRetryDuration() { 150 return maxRetryDuration_ == null 151 ? com.google.protobuf.Duration.getDefaultInstance() 152 : maxRetryDuration_; 153 } 154 /** 155 * 156 * 157 * <pre> 158 * If positive, `max_retry_duration` specifies the time limit for 159 * retrying a failed task, measured from when the task was first 160 * attempted. Once `max_retry_duration` time has passed *and* the 161 * task has been attempted 162 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 163 * no further attempts will be made and the task will be deleted. 164 * If zero, then the task age is unlimited. 165 * If unspecified when the queue is created, Cloud Tasks will pick the 166 * default. 167 * `max_retry_duration` will be truncated to the nearest second. 168 * This field has the same meaning as 169 * [task_age_limit in 170 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 171 * </pre> 172 * 173 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 174 */ 175 @java.lang.Override getMaxRetryDurationOrBuilder()176 public com.google.protobuf.DurationOrBuilder getMaxRetryDurationOrBuilder() { 177 return maxRetryDuration_ == null 178 ? com.google.protobuf.Duration.getDefaultInstance() 179 : maxRetryDuration_; 180 } 181 182 public static final int MIN_BACKOFF_FIELD_NUMBER = 3; 183 private com.google.protobuf.Duration minBackoff_; 184 /** 185 * 186 * 187 * <pre> 188 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 189 * for retry between 190 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 191 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 192 * after it fails, if the queue's 193 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 194 * task should be retried. 195 * If unspecified when the queue is created, Cloud Tasks will pick the 196 * default. 197 * `min_backoff` will be truncated to the nearest second. 198 * This field has the same meaning as 199 * [min_backoff_seconds in 200 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 201 * </pre> 202 * 203 * <code>.google.protobuf.Duration min_backoff = 3;</code> 204 * 205 * @return Whether the minBackoff field is set. 206 */ 207 @java.lang.Override hasMinBackoff()208 public boolean hasMinBackoff() { 209 return minBackoff_ != null; 210 } 211 /** 212 * 213 * 214 * <pre> 215 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 216 * for retry between 217 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 218 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 219 * after it fails, if the queue's 220 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 221 * task should be retried. 222 * If unspecified when the queue is created, Cloud Tasks will pick the 223 * default. 224 * `min_backoff` will be truncated to the nearest second. 225 * This field has the same meaning as 226 * [min_backoff_seconds in 227 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 228 * </pre> 229 * 230 * <code>.google.protobuf.Duration min_backoff = 3;</code> 231 * 232 * @return The minBackoff. 233 */ 234 @java.lang.Override getMinBackoff()235 public com.google.protobuf.Duration getMinBackoff() { 236 return minBackoff_ == null ? com.google.protobuf.Duration.getDefaultInstance() : minBackoff_; 237 } 238 /** 239 * 240 * 241 * <pre> 242 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 243 * for retry between 244 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 245 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 246 * after it fails, if the queue's 247 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 248 * task should be retried. 249 * If unspecified when the queue is created, Cloud Tasks will pick the 250 * default. 251 * `min_backoff` will be truncated to the nearest second. 252 * This field has the same meaning as 253 * [min_backoff_seconds in 254 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 255 * </pre> 256 * 257 * <code>.google.protobuf.Duration min_backoff = 3;</code> 258 */ 259 @java.lang.Override getMinBackoffOrBuilder()260 public com.google.protobuf.DurationOrBuilder getMinBackoffOrBuilder() { 261 return minBackoff_ == null ? com.google.protobuf.Duration.getDefaultInstance() : minBackoff_; 262 } 263 264 public static final int MAX_BACKOFF_FIELD_NUMBER = 4; 265 private com.google.protobuf.Duration maxBackoff_; 266 /** 267 * 268 * 269 * <pre> 270 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 271 * for retry between 272 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 273 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 274 * after it fails, if the queue's 275 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 276 * task should be retried. 277 * If unspecified when the queue is created, Cloud Tasks will pick the 278 * default. 279 * `max_backoff` will be truncated to the nearest second. 280 * This field has the same meaning as 281 * [max_backoff_seconds in 282 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 283 * </pre> 284 * 285 * <code>.google.protobuf.Duration max_backoff = 4;</code> 286 * 287 * @return Whether the maxBackoff field is set. 288 */ 289 @java.lang.Override hasMaxBackoff()290 public boolean hasMaxBackoff() { 291 return maxBackoff_ != null; 292 } 293 /** 294 * 295 * 296 * <pre> 297 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 298 * for retry between 299 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 300 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 301 * after it fails, if the queue's 302 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 303 * task should be retried. 304 * If unspecified when the queue is created, Cloud Tasks will pick the 305 * default. 306 * `max_backoff` will be truncated to the nearest second. 307 * This field has the same meaning as 308 * [max_backoff_seconds in 309 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 310 * </pre> 311 * 312 * <code>.google.protobuf.Duration max_backoff = 4;</code> 313 * 314 * @return The maxBackoff. 315 */ 316 @java.lang.Override getMaxBackoff()317 public com.google.protobuf.Duration getMaxBackoff() { 318 return maxBackoff_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxBackoff_; 319 } 320 /** 321 * 322 * 323 * <pre> 324 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 325 * for retry between 326 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 327 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 328 * after it fails, if the queue's 329 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 330 * task should be retried. 331 * If unspecified when the queue is created, Cloud Tasks will pick the 332 * default. 333 * `max_backoff` will be truncated to the nearest second. 334 * This field has the same meaning as 335 * [max_backoff_seconds in 336 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 337 * </pre> 338 * 339 * <code>.google.protobuf.Duration max_backoff = 4;</code> 340 */ 341 @java.lang.Override getMaxBackoffOrBuilder()342 public com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder() { 343 return maxBackoff_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxBackoff_; 344 } 345 346 public static final int MAX_DOUBLINGS_FIELD_NUMBER = 5; 347 private int maxDoublings_ = 0; 348 /** 349 * 350 * 351 * <pre> 352 * The time between retries will double `max_doublings` times. 353 * A task's retry interval starts at 354 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then 355 * doubles `max_doublings` times, then increases linearly, and finally retries 356 * at intervals of 357 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to 358 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. 359 * For example, if 360 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, 361 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, 362 * and `max_doublings` is 3, then the a task will first be retried in 10s. The 363 * retry interval will double three times, and then increase linearly by 2^3 * 364 * 10s. Finally, the task will retry at intervals of 365 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the 366 * task has been attempted 367 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. 368 * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 369 * 300s, .... 370 * If unspecified when the queue is created, Cloud Tasks will pick the 371 * default. 372 * This field has the same meaning as 373 * [max_doublings in 374 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 375 * </pre> 376 * 377 * <code>int32 max_doublings = 5;</code> 378 * 379 * @return The maxDoublings. 380 */ 381 @java.lang.Override getMaxDoublings()382 public int getMaxDoublings() { 383 return maxDoublings_; 384 } 385 386 private byte memoizedIsInitialized = -1; 387 388 @java.lang.Override isInitialized()389 public final boolean isInitialized() { 390 byte isInitialized = memoizedIsInitialized; 391 if (isInitialized == 1) return true; 392 if (isInitialized == 0) return false; 393 394 memoizedIsInitialized = 1; 395 return true; 396 } 397 398 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)399 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 400 if (maxAttempts_ != 0) { 401 output.writeInt32(1, maxAttempts_); 402 } 403 if (maxRetryDuration_ != null) { 404 output.writeMessage(2, getMaxRetryDuration()); 405 } 406 if (minBackoff_ != null) { 407 output.writeMessage(3, getMinBackoff()); 408 } 409 if (maxBackoff_ != null) { 410 output.writeMessage(4, getMaxBackoff()); 411 } 412 if (maxDoublings_ != 0) { 413 output.writeInt32(5, maxDoublings_); 414 } 415 getUnknownFields().writeTo(output); 416 } 417 418 @java.lang.Override getSerializedSize()419 public int getSerializedSize() { 420 int size = memoizedSize; 421 if (size != -1) return size; 422 423 size = 0; 424 if (maxAttempts_ != 0) { 425 size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxAttempts_); 426 } 427 if (maxRetryDuration_ != null) { 428 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMaxRetryDuration()); 429 } 430 if (minBackoff_ != null) { 431 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMinBackoff()); 432 } 433 if (maxBackoff_ != null) { 434 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMaxBackoff()); 435 } 436 if (maxDoublings_ != 0) { 437 size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, maxDoublings_); 438 } 439 size += getUnknownFields().getSerializedSize(); 440 memoizedSize = size; 441 return size; 442 } 443 444 @java.lang.Override equals(final java.lang.Object obj)445 public boolean equals(final java.lang.Object obj) { 446 if (obj == this) { 447 return true; 448 } 449 if (!(obj instanceof com.google.cloud.tasks.v2beta3.RetryConfig)) { 450 return super.equals(obj); 451 } 452 com.google.cloud.tasks.v2beta3.RetryConfig other = 453 (com.google.cloud.tasks.v2beta3.RetryConfig) obj; 454 455 if (getMaxAttempts() != other.getMaxAttempts()) return false; 456 if (hasMaxRetryDuration() != other.hasMaxRetryDuration()) return false; 457 if (hasMaxRetryDuration()) { 458 if (!getMaxRetryDuration().equals(other.getMaxRetryDuration())) return false; 459 } 460 if (hasMinBackoff() != other.hasMinBackoff()) return false; 461 if (hasMinBackoff()) { 462 if (!getMinBackoff().equals(other.getMinBackoff())) return false; 463 } 464 if (hasMaxBackoff() != other.hasMaxBackoff()) return false; 465 if (hasMaxBackoff()) { 466 if (!getMaxBackoff().equals(other.getMaxBackoff())) return false; 467 } 468 if (getMaxDoublings() != other.getMaxDoublings()) return false; 469 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 470 return true; 471 } 472 473 @java.lang.Override hashCode()474 public int hashCode() { 475 if (memoizedHashCode != 0) { 476 return memoizedHashCode; 477 } 478 int hash = 41; 479 hash = (19 * hash) + getDescriptor().hashCode(); 480 hash = (37 * hash) + MAX_ATTEMPTS_FIELD_NUMBER; 481 hash = (53 * hash) + getMaxAttempts(); 482 if (hasMaxRetryDuration()) { 483 hash = (37 * hash) + MAX_RETRY_DURATION_FIELD_NUMBER; 484 hash = (53 * hash) + getMaxRetryDuration().hashCode(); 485 } 486 if (hasMinBackoff()) { 487 hash = (37 * hash) + MIN_BACKOFF_FIELD_NUMBER; 488 hash = (53 * hash) + getMinBackoff().hashCode(); 489 } 490 if (hasMaxBackoff()) { 491 hash = (37 * hash) + MAX_BACKOFF_FIELD_NUMBER; 492 hash = (53 * hash) + getMaxBackoff().hashCode(); 493 } 494 hash = (37 * hash) + MAX_DOUBLINGS_FIELD_NUMBER; 495 hash = (53 * hash) + getMaxDoublings(); 496 hash = (29 * hash) + getUnknownFields().hashCode(); 497 memoizedHashCode = hash; 498 return hash; 499 } 500 parseFrom(java.nio.ByteBuffer data)501 public static com.google.cloud.tasks.v2beta3.RetryConfig parseFrom(java.nio.ByteBuffer data) 502 throws com.google.protobuf.InvalidProtocolBufferException { 503 return PARSER.parseFrom(data); 504 } 505 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)506 public static com.google.cloud.tasks.v2beta3.RetryConfig parseFrom( 507 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 508 throws com.google.protobuf.InvalidProtocolBufferException { 509 return PARSER.parseFrom(data, extensionRegistry); 510 } 511 parseFrom( com.google.protobuf.ByteString data)512 public static com.google.cloud.tasks.v2beta3.RetryConfig parseFrom( 513 com.google.protobuf.ByteString data) 514 throws com.google.protobuf.InvalidProtocolBufferException { 515 return PARSER.parseFrom(data); 516 } 517 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)518 public static com.google.cloud.tasks.v2beta3.RetryConfig parseFrom( 519 com.google.protobuf.ByteString data, 520 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 521 throws com.google.protobuf.InvalidProtocolBufferException { 522 return PARSER.parseFrom(data, extensionRegistry); 523 } 524 parseFrom(byte[] data)525 public static com.google.cloud.tasks.v2beta3.RetryConfig parseFrom(byte[] data) 526 throws com.google.protobuf.InvalidProtocolBufferException { 527 return PARSER.parseFrom(data); 528 } 529 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)530 public static com.google.cloud.tasks.v2beta3.RetryConfig parseFrom( 531 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 532 throws com.google.protobuf.InvalidProtocolBufferException { 533 return PARSER.parseFrom(data, extensionRegistry); 534 } 535 parseFrom(java.io.InputStream input)536 public static com.google.cloud.tasks.v2beta3.RetryConfig parseFrom(java.io.InputStream input) 537 throws java.io.IOException { 538 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 539 } 540 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)541 public static com.google.cloud.tasks.v2beta3.RetryConfig parseFrom( 542 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 543 throws java.io.IOException { 544 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 545 PARSER, input, extensionRegistry); 546 } 547 parseDelimitedFrom( java.io.InputStream input)548 public static com.google.cloud.tasks.v2beta3.RetryConfig parseDelimitedFrom( 549 java.io.InputStream input) throws java.io.IOException { 550 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 551 } 552 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)553 public static com.google.cloud.tasks.v2beta3.RetryConfig parseDelimitedFrom( 554 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 555 throws java.io.IOException { 556 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 557 PARSER, input, extensionRegistry); 558 } 559 parseFrom( com.google.protobuf.CodedInputStream input)560 public static com.google.cloud.tasks.v2beta3.RetryConfig parseFrom( 561 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 562 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 563 } 564 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)565 public static com.google.cloud.tasks.v2beta3.RetryConfig parseFrom( 566 com.google.protobuf.CodedInputStream input, 567 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 568 throws java.io.IOException { 569 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 570 PARSER, input, extensionRegistry); 571 } 572 573 @java.lang.Override newBuilderForType()574 public Builder newBuilderForType() { 575 return newBuilder(); 576 } 577 newBuilder()578 public static Builder newBuilder() { 579 return DEFAULT_INSTANCE.toBuilder(); 580 } 581 newBuilder(com.google.cloud.tasks.v2beta3.RetryConfig prototype)582 public static Builder newBuilder(com.google.cloud.tasks.v2beta3.RetryConfig prototype) { 583 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 584 } 585 586 @java.lang.Override toBuilder()587 public Builder toBuilder() { 588 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 589 } 590 591 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)592 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 593 Builder builder = new Builder(parent); 594 return builder; 595 } 596 /** 597 * 598 * 599 * <pre> 600 * Retry config. 601 * These settings determine when a failed task attempt is retried. 602 * </pre> 603 * 604 * Protobuf type {@code google.cloud.tasks.v2beta3.RetryConfig} 605 */ 606 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 607 implements 608 // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.RetryConfig) 609 com.google.cloud.tasks.v2beta3.RetryConfigOrBuilder { getDescriptor()610 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 611 return com.google.cloud.tasks.v2beta3.QueueProto 612 .internal_static_google_cloud_tasks_v2beta3_RetryConfig_descriptor; 613 } 614 615 @java.lang.Override 616 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()617 internalGetFieldAccessorTable() { 618 return com.google.cloud.tasks.v2beta3.QueueProto 619 .internal_static_google_cloud_tasks_v2beta3_RetryConfig_fieldAccessorTable 620 .ensureFieldAccessorsInitialized( 621 com.google.cloud.tasks.v2beta3.RetryConfig.class, 622 com.google.cloud.tasks.v2beta3.RetryConfig.Builder.class); 623 } 624 625 // Construct using com.google.cloud.tasks.v2beta3.RetryConfig.newBuilder() Builder()626 private Builder() {} 627 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)628 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 629 super(parent); 630 } 631 632 @java.lang.Override clear()633 public Builder clear() { 634 super.clear(); 635 bitField0_ = 0; 636 maxAttempts_ = 0; 637 maxRetryDuration_ = null; 638 if (maxRetryDurationBuilder_ != null) { 639 maxRetryDurationBuilder_.dispose(); 640 maxRetryDurationBuilder_ = null; 641 } 642 minBackoff_ = null; 643 if (minBackoffBuilder_ != null) { 644 minBackoffBuilder_.dispose(); 645 minBackoffBuilder_ = null; 646 } 647 maxBackoff_ = null; 648 if (maxBackoffBuilder_ != null) { 649 maxBackoffBuilder_.dispose(); 650 maxBackoffBuilder_ = null; 651 } 652 maxDoublings_ = 0; 653 return this; 654 } 655 656 @java.lang.Override getDescriptorForType()657 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 658 return com.google.cloud.tasks.v2beta3.QueueProto 659 .internal_static_google_cloud_tasks_v2beta3_RetryConfig_descriptor; 660 } 661 662 @java.lang.Override getDefaultInstanceForType()663 public com.google.cloud.tasks.v2beta3.RetryConfig getDefaultInstanceForType() { 664 return com.google.cloud.tasks.v2beta3.RetryConfig.getDefaultInstance(); 665 } 666 667 @java.lang.Override build()668 public com.google.cloud.tasks.v2beta3.RetryConfig build() { 669 com.google.cloud.tasks.v2beta3.RetryConfig result = buildPartial(); 670 if (!result.isInitialized()) { 671 throw newUninitializedMessageException(result); 672 } 673 return result; 674 } 675 676 @java.lang.Override buildPartial()677 public com.google.cloud.tasks.v2beta3.RetryConfig buildPartial() { 678 com.google.cloud.tasks.v2beta3.RetryConfig result = 679 new com.google.cloud.tasks.v2beta3.RetryConfig(this); 680 if (bitField0_ != 0) { 681 buildPartial0(result); 682 } 683 onBuilt(); 684 return result; 685 } 686 buildPartial0(com.google.cloud.tasks.v2beta3.RetryConfig result)687 private void buildPartial0(com.google.cloud.tasks.v2beta3.RetryConfig result) { 688 int from_bitField0_ = bitField0_; 689 if (((from_bitField0_ & 0x00000001) != 0)) { 690 result.maxAttempts_ = maxAttempts_; 691 } 692 if (((from_bitField0_ & 0x00000002) != 0)) { 693 result.maxRetryDuration_ = 694 maxRetryDurationBuilder_ == null ? maxRetryDuration_ : maxRetryDurationBuilder_.build(); 695 } 696 if (((from_bitField0_ & 0x00000004) != 0)) { 697 result.minBackoff_ = minBackoffBuilder_ == null ? minBackoff_ : minBackoffBuilder_.build(); 698 } 699 if (((from_bitField0_ & 0x00000008) != 0)) { 700 result.maxBackoff_ = maxBackoffBuilder_ == null ? maxBackoff_ : maxBackoffBuilder_.build(); 701 } 702 if (((from_bitField0_ & 0x00000010) != 0)) { 703 result.maxDoublings_ = maxDoublings_; 704 } 705 } 706 707 @java.lang.Override clone()708 public Builder clone() { 709 return super.clone(); 710 } 711 712 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)713 public Builder setField( 714 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 715 return super.setField(field, value); 716 } 717 718 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)719 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 720 return super.clearField(field); 721 } 722 723 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)724 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 725 return super.clearOneof(oneof); 726 } 727 728 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)729 public Builder setRepeatedField( 730 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 731 return super.setRepeatedField(field, index, value); 732 } 733 734 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)735 public Builder addRepeatedField( 736 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 737 return super.addRepeatedField(field, value); 738 } 739 740 @java.lang.Override mergeFrom(com.google.protobuf.Message other)741 public Builder mergeFrom(com.google.protobuf.Message other) { 742 if (other instanceof com.google.cloud.tasks.v2beta3.RetryConfig) { 743 return mergeFrom((com.google.cloud.tasks.v2beta3.RetryConfig) other); 744 } else { 745 super.mergeFrom(other); 746 return this; 747 } 748 } 749 mergeFrom(com.google.cloud.tasks.v2beta3.RetryConfig other)750 public Builder mergeFrom(com.google.cloud.tasks.v2beta3.RetryConfig other) { 751 if (other == com.google.cloud.tasks.v2beta3.RetryConfig.getDefaultInstance()) return this; 752 if (other.getMaxAttempts() != 0) { 753 setMaxAttempts(other.getMaxAttempts()); 754 } 755 if (other.hasMaxRetryDuration()) { 756 mergeMaxRetryDuration(other.getMaxRetryDuration()); 757 } 758 if (other.hasMinBackoff()) { 759 mergeMinBackoff(other.getMinBackoff()); 760 } 761 if (other.hasMaxBackoff()) { 762 mergeMaxBackoff(other.getMaxBackoff()); 763 } 764 if (other.getMaxDoublings() != 0) { 765 setMaxDoublings(other.getMaxDoublings()); 766 } 767 this.mergeUnknownFields(other.getUnknownFields()); 768 onChanged(); 769 return this; 770 } 771 772 @java.lang.Override isInitialized()773 public final boolean isInitialized() { 774 return true; 775 } 776 777 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)778 public Builder mergeFrom( 779 com.google.protobuf.CodedInputStream input, 780 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 781 throws java.io.IOException { 782 if (extensionRegistry == null) { 783 throw new java.lang.NullPointerException(); 784 } 785 try { 786 boolean done = false; 787 while (!done) { 788 int tag = input.readTag(); 789 switch (tag) { 790 case 0: 791 done = true; 792 break; 793 case 8: 794 { 795 maxAttempts_ = input.readInt32(); 796 bitField0_ |= 0x00000001; 797 break; 798 } // case 8 799 case 18: 800 { 801 input.readMessage( 802 getMaxRetryDurationFieldBuilder().getBuilder(), extensionRegistry); 803 bitField0_ |= 0x00000002; 804 break; 805 } // case 18 806 case 26: 807 { 808 input.readMessage(getMinBackoffFieldBuilder().getBuilder(), extensionRegistry); 809 bitField0_ |= 0x00000004; 810 break; 811 } // case 26 812 case 34: 813 { 814 input.readMessage(getMaxBackoffFieldBuilder().getBuilder(), extensionRegistry); 815 bitField0_ |= 0x00000008; 816 break; 817 } // case 34 818 case 40: 819 { 820 maxDoublings_ = input.readInt32(); 821 bitField0_ |= 0x00000010; 822 break; 823 } // case 40 824 default: 825 { 826 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 827 done = true; // was an endgroup tag 828 } 829 break; 830 } // default: 831 } // switch (tag) 832 } // while (!done) 833 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 834 throw e.unwrapIOException(); 835 } finally { 836 onChanged(); 837 } // finally 838 return this; 839 } 840 841 private int bitField0_; 842 843 private int maxAttempts_; 844 /** 845 * 846 * 847 * <pre> 848 * Number of attempts per task. 849 * Cloud Tasks will attempt the task `max_attempts` times (that is, if the 850 * first attempt fails, then there will be `max_attempts - 1` retries). Must 851 * be >= -1. 852 * If unspecified when the queue is created, Cloud Tasks will pick the 853 * default. 854 * -1 indicates unlimited attempts. 855 * This field has the same meaning as 856 * [task_retry_limit in 857 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 858 * </pre> 859 * 860 * <code>int32 max_attempts = 1;</code> 861 * 862 * @return The maxAttempts. 863 */ 864 @java.lang.Override getMaxAttempts()865 public int getMaxAttempts() { 866 return maxAttempts_; 867 } 868 /** 869 * 870 * 871 * <pre> 872 * Number of attempts per task. 873 * Cloud Tasks will attempt the task `max_attempts` times (that is, if the 874 * first attempt fails, then there will be `max_attempts - 1` retries). Must 875 * be >= -1. 876 * If unspecified when the queue is created, Cloud Tasks will pick the 877 * default. 878 * -1 indicates unlimited attempts. 879 * This field has the same meaning as 880 * [task_retry_limit in 881 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 882 * </pre> 883 * 884 * <code>int32 max_attempts = 1;</code> 885 * 886 * @param value The maxAttempts to set. 887 * @return This builder for chaining. 888 */ setMaxAttempts(int value)889 public Builder setMaxAttempts(int value) { 890 891 maxAttempts_ = value; 892 bitField0_ |= 0x00000001; 893 onChanged(); 894 return this; 895 } 896 /** 897 * 898 * 899 * <pre> 900 * Number of attempts per task. 901 * Cloud Tasks will attempt the task `max_attempts` times (that is, if the 902 * first attempt fails, then there will be `max_attempts - 1` retries). Must 903 * be >= -1. 904 * If unspecified when the queue is created, Cloud Tasks will pick the 905 * default. 906 * -1 indicates unlimited attempts. 907 * This field has the same meaning as 908 * [task_retry_limit in 909 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 910 * </pre> 911 * 912 * <code>int32 max_attempts = 1;</code> 913 * 914 * @return This builder for chaining. 915 */ clearMaxAttempts()916 public Builder clearMaxAttempts() { 917 bitField0_ = (bitField0_ & ~0x00000001); 918 maxAttempts_ = 0; 919 onChanged(); 920 return this; 921 } 922 923 private com.google.protobuf.Duration maxRetryDuration_; 924 private com.google.protobuf.SingleFieldBuilderV3< 925 com.google.protobuf.Duration, 926 com.google.protobuf.Duration.Builder, 927 com.google.protobuf.DurationOrBuilder> 928 maxRetryDurationBuilder_; 929 /** 930 * 931 * 932 * <pre> 933 * If positive, `max_retry_duration` specifies the time limit for 934 * retrying a failed task, measured from when the task was first 935 * attempted. Once `max_retry_duration` time has passed *and* the 936 * task has been attempted 937 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 938 * no further attempts will be made and the task will be deleted. 939 * If zero, then the task age is unlimited. 940 * If unspecified when the queue is created, Cloud Tasks will pick the 941 * default. 942 * `max_retry_duration` will be truncated to the nearest second. 943 * This field has the same meaning as 944 * [task_age_limit in 945 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 946 * </pre> 947 * 948 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 949 * 950 * @return Whether the maxRetryDuration field is set. 951 */ hasMaxRetryDuration()952 public boolean hasMaxRetryDuration() { 953 return ((bitField0_ & 0x00000002) != 0); 954 } 955 /** 956 * 957 * 958 * <pre> 959 * If positive, `max_retry_duration` specifies the time limit for 960 * retrying a failed task, measured from when the task was first 961 * attempted. Once `max_retry_duration` time has passed *and* the 962 * task has been attempted 963 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 964 * no further attempts will be made and the task will be deleted. 965 * If zero, then the task age is unlimited. 966 * If unspecified when the queue is created, Cloud Tasks will pick the 967 * default. 968 * `max_retry_duration` will be truncated to the nearest second. 969 * This field has the same meaning as 970 * [task_age_limit in 971 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 972 * </pre> 973 * 974 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 975 * 976 * @return The maxRetryDuration. 977 */ getMaxRetryDuration()978 public com.google.protobuf.Duration getMaxRetryDuration() { 979 if (maxRetryDurationBuilder_ == null) { 980 return maxRetryDuration_ == null 981 ? com.google.protobuf.Duration.getDefaultInstance() 982 : maxRetryDuration_; 983 } else { 984 return maxRetryDurationBuilder_.getMessage(); 985 } 986 } 987 /** 988 * 989 * 990 * <pre> 991 * If positive, `max_retry_duration` specifies the time limit for 992 * retrying a failed task, measured from when the task was first 993 * attempted. Once `max_retry_duration` time has passed *and* the 994 * task has been attempted 995 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 996 * no further attempts will be made and the task will be deleted. 997 * If zero, then the task age is unlimited. 998 * If unspecified when the queue is created, Cloud Tasks will pick the 999 * default. 1000 * `max_retry_duration` will be truncated to the nearest second. 1001 * This field has the same meaning as 1002 * [task_age_limit in 1003 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1004 * </pre> 1005 * 1006 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 1007 */ setMaxRetryDuration(com.google.protobuf.Duration value)1008 public Builder setMaxRetryDuration(com.google.protobuf.Duration value) { 1009 if (maxRetryDurationBuilder_ == null) { 1010 if (value == null) { 1011 throw new NullPointerException(); 1012 } 1013 maxRetryDuration_ = value; 1014 } else { 1015 maxRetryDurationBuilder_.setMessage(value); 1016 } 1017 bitField0_ |= 0x00000002; 1018 onChanged(); 1019 return this; 1020 } 1021 /** 1022 * 1023 * 1024 * <pre> 1025 * If positive, `max_retry_duration` specifies the time limit for 1026 * retrying a failed task, measured from when the task was first 1027 * attempted. Once `max_retry_duration` time has passed *and* the 1028 * task has been attempted 1029 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 1030 * no further attempts will be made and the task will be deleted. 1031 * If zero, then the task age is unlimited. 1032 * If unspecified when the queue is created, Cloud Tasks will pick the 1033 * default. 1034 * `max_retry_duration` will be truncated to the nearest second. 1035 * This field has the same meaning as 1036 * [task_age_limit in 1037 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1038 * </pre> 1039 * 1040 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 1041 */ setMaxRetryDuration(com.google.protobuf.Duration.Builder builderForValue)1042 public Builder setMaxRetryDuration(com.google.protobuf.Duration.Builder builderForValue) { 1043 if (maxRetryDurationBuilder_ == null) { 1044 maxRetryDuration_ = builderForValue.build(); 1045 } else { 1046 maxRetryDurationBuilder_.setMessage(builderForValue.build()); 1047 } 1048 bitField0_ |= 0x00000002; 1049 onChanged(); 1050 return this; 1051 } 1052 /** 1053 * 1054 * 1055 * <pre> 1056 * If positive, `max_retry_duration` specifies the time limit for 1057 * retrying a failed task, measured from when the task was first 1058 * attempted. Once `max_retry_duration` time has passed *and* the 1059 * task has been attempted 1060 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 1061 * no further attempts will be made and the task will be deleted. 1062 * If zero, then the task age is unlimited. 1063 * If unspecified when the queue is created, Cloud Tasks will pick the 1064 * default. 1065 * `max_retry_duration` will be truncated to the nearest second. 1066 * This field has the same meaning as 1067 * [task_age_limit in 1068 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1069 * </pre> 1070 * 1071 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 1072 */ mergeMaxRetryDuration(com.google.protobuf.Duration value)1073 public Builder mergeMaxRetryDuration(com.google.protobuf.Duration value) { 1074 if (maxRetryDurationBuilder_ == null) { 1075 if (((bitField0_ & 0x00000002) != 0) 1076 && maxRetryDuration_ != null 1077 && maxRetryDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { 1078 getMaxRetryDurationBuilder().mergeFrom(value); 1079 } else { 1080 maxRetryDuration_ = value; 1081 } 1082 } else { 1083 maxRetryDurationBuilder_.mergeFrom(value); 1084 } 1085 bitField0_ |= 0x00000002; 1086 onChanged(); 1087 return this; 1088 } 1089 /** 1090 * 1091 * 1092 * <pre> 1093 * If positive, `max_retry_duration` specifies the time limit for 1094 * retrying a failed task, measured from when the task was first 1095 * attempted. Once `max_retry_duration` time has passed *and* the 1096 * task has been attempted 1097 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 1098 * no further attempts will be made and the task will be deleted. 1099 * If zero, then the task age is unlimited. 1100 * If unspecified when the queue is created, Cloud Tasks will pick the 1101 * default. 1102 * `max_retry_duration` will be truncated to the nearest second. 1103 * This field has the same meaning as 1104 * [task_age_limit in 1105 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1106 * </pre> 1107 * 1108 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 1109 */ clearMaxRetryDuration()1110 public Builder clearMaxRetryDuration() { 1111 bitField0_ = (bitField0_ & ~0x00000002); 1112 maxRetryDuration_ = null; 1113 if (maxRetryDurationBuilder_ != null) { 1114 maxRetryDurationBuilder_.dispose(); 1115 maxRetryDurationBuilder_ = null; 1116 } 1117 onChanged(); 1118 return this; 1119 } 1120 /** 1121 * 1122 * 1123 * <pre> 1124 * If positive, `max_retry_duration` specifies the time limit for 1125 * retrying a failed task, measured from when the task was first 1126 * attempted. Once `max_retry_duration` time has passed *and* the 1127 * task has been attempted 1128 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 1129 * no further attempts will be made and the task will be deleted. 1130 * If zero, then the task age is unlimited. 1131 * If unspecified when the queue is created, Cloud Tasks will pick the 1132 * default. 1133 * `max_retry_duration` will be truncated to the nearest second. 1134 * This field has the same meaning as 1135 * [task_age_limit in 1136 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1137 * </pre> 1138 * 1139 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 1140 */ getMaxRetryDurationBuilder()1141 public com.google.protobuf.Duration.Builder getMaxRetryDurationBuilder() { 1142 bitField0_ |= 0x00000002; 1143 onChanged(); 1144 return getMaxRetryDurationFieldBuilder().getBuilder(); 1145 } 1146 /** 1147 * 1148 * 1149 * <pre> 1150 * If positive, `max_retry_duration` specifies the time limit for 1151 * retrying a failed task, measured from when the task was first 1152 * attempted. Once `max_retry_duration` time has passed *and* the 1153 * task has been attempted 1154 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 1155 * no further attempts will be made and the task will be deleted. 1156 * If zero, then the task age is unlimited. 1157 * If unspecified when the queue is created, Cloud Tasks will pick the 1158 * default. 1159 * `max_retry_duration` will be truncated to the nearest second. 1160 * This field has the same meaning as 1161 * [task_age_limit in 1162 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1163 * </pre> 1164 * 1165 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 1166 */ getMaxRetryDurationOrBuilder()1167 public com.google.protobuf.DurationOrBuilder getMaxRetryDurationOrBuilder() { 1168 if (maxRetryDurationBuilder_ != null) { 1169 return maxRetryDurationBuilder_.getMessageOrBuilder(); 1170 } else { 1171 return maxRetryDuration_ == null 1172 ? com.google.protobuf.Duration.getDefaultInstance() 1173 : maxRetryDuration_; 1174 } 1175 } 1176 /** 1177 * 1178 * 1179 * <pre> 1180 * If positive, `max_retry_duration` specifies the time limit for 1181 * retrying a failed task, measured from when the task was first 1182 * attempted. Once `max_retry_duration` time has passed *and* the 1183 * task has been attempted 1184 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, 1185 * no further attempts will be made and the task will be deleted. 1186 * If zero, then the task age is unlimited. 1187 * If unspecified when the queue is created, Cloud Tasks will pick the 1188 * default. 1189 * `max_retry_duration` will be truncated to the nearest second. 1190 * This field has the same meaning as 1191 * [task_age_limit in 1192 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1193 * </pre> 1194 * 1195 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 1196 */ 1197 private com.google.protobuf.SingleFieldBuilderV3< 1198 com.google.protobuf.Duration, 1199 com.google.protobuf.Duration.Builder, 1200 com.google.protobuf.DurationOrBuilder> getMaxRetryDurationFieldBuilder()1201 getMaxRetryDurationFieldBuilder() { 1202 if (maxRetryDurationBuilder_ == null) { 1203 maxRetryDurationBuilder_ = 1204 new com.google.protobuf.SingleFieldBuilderV3< 1205 com.google.protobuf.Duration, 1206 com.google.protobuf.Duration.Builder, 1207 com.google.protobuf.DurationOrBuilder>( 1208 getMaxRetryDuration(), getParentForChildren(), isClean()); 1209 maxRetryDuration_ = null; 1210 } 1211 return maxRetryDurationBuilder_; 1212 } 1213 1214 private com.google.protobuf.Duration minBackoff_; 1215 private com.google.protobuf.SingleFieldBuilderV3< 1216 com.google.protobuf.Duration, 1217 com.google.protobuf.Duration.Builder, 1218 com.google.protobuf.DurationOrBuilder> 1219 minBackoffBuilder_; 1220 /** 1221 * 1222 * 1223 * <pre> 1224 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1225 * for retry between 1226 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1227 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1228 * after it fails, if the queue's 1229 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1230 * task should be retried. 1231 * If unspecified when the queue is created, Cloud Tasks will pick the 1232 * default. 1233 * `min_backoff` will be truncated to the nearest second. 1234 * This field has the same meaning as 1235 * [min_backoff_seconds in 1236 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1237 * </pre> 1238 * 1239 * <code>.google.protobuf.Duration min_backoff = 3;</code> 1240 * 1241 * @return Whether the minBackoff field is set. 1242 */ hasMinBackoff()1243 public boolean hasMinBackoff() { 1244 return ((bitField0_ & 0x00000004) != 0); 1245 } 1246 /** 1247 * 1248 * 1249 * <pre> 1250 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1251 * for retry between 1252 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1253 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1254 * after it fails, if the queue's 1255 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1256 * task should be retried. 1257 * If unspecified when the queue is created, Cloud Tasks will pick the 1258 * default. 1259 * `min_backoff` will be truncated to the nearest second. 1260 * This field has the same meaning as 1261 * [min_backoff_seconds in 1262 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1263 * </pre> 1264 * 1265 * <code>.google.protobuf.Duration min_backoff = 3;</code> 1266 * 1267 * @return The minBackoff. 1268 */ getMinBackoff()1269 public com.google.protobuf.Duration getMinBackoff() { 1270 if (minBackoffBuilder_ == null) { 1271 return minBackoff_ == null 1272 ? com.google.protobuf.Duration.getDefaultInstance() 1273 : minBackoff_; 1274 } else { 1275 return minBackoffBuilder_.getMessage(); 1276 } 1277 } 1278 /** 1279 * 1280 * 1281 * <pre> 1282 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1283 * for retry between 1284 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1285 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1286 * after it fails, if the queue's 1287 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1288 * task should be retried. 1289 * If unspecified when the queue is created, Cloud Tasks will pick the 1290 * default. 1291 * `min_backoff` will be truncated to the nearest second. 1292 * This field has the same meaning as 1293 * [min_backoff_seconds in 1294 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1295 * </pre> 1296 * 1297 * <code>.google.protobuf.Duration min_backoff = 3;</code> 1298 */ setMinBackoff(com.google.protobuf.Duration value)1299 public Builder setMinBackoff(com.google.protobuf.Duration value) { 1300 if (minBackoffBuilder_ == null) { 1301 if (value == null) { 1302 throw new NullPointerException(); 1303 } 1304 minBackoff_ = value; 1305 } else { 1306 minBackoffBuilder_.setMessage(value); 1307 } 1308 bitField0_ |= 0x00000004; 1309 onChanged(); 1310 return this; 1311 } 1312 /** 1313 * 1314 * 1315 * <pre> 1316 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1317 * for retry between 1318 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1319 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1320 * after it fails, if the queue's 1321 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1322 * task should be retried. 1323 * If unspecified when the queue is created, Cloud Tasks will pick the 1324 * default. 1325 * `min_backoff` will be truncated to the nearest second. 1326 * This field has the same meaning as 1327 * [min_backoff_seconds in 1328 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1329 * </pre> 1330 * 1331 * <code>.google.protobuf.Duration min_backoff = 3;</code> 1332 */ setMinBackoff(com.google.protobuf.Duration.Builder builderForValue)1333 public Builder setMinBackoff(com.google.protobuf.Duration.Builder builderForValue) { 1334 if (minBackoffBuilder_ == null) { 1335 minBackoff_ = builderForValue.build(); 1336 } else { 1337 minBackoffBuilder_.setMessage(builderForValue.build()); 1338 } 1339 bitField0_ |= 0x00000004; 1340 onChanged(); 1341 return this; 1342 } 1343 /** 1344 * 1345 * 1346 * <pre> 1347 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1348 * for retry between 1349 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1350 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1351 * after it fails, if the queue's 1352 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1353 * task should be retried. 1354 * If unspecified when the queue is created, Cloud Tasks will pick the 1355 * default. 1356 * `min_backoff` will be truncated to the nearest second. 1357 * This field has the same meaning as 1358 * [min_backoff_seconds in 1359 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1360 * </pre> 1361 * 1362 * <code>.google.protobuf.Duration min_backoff = 3;</code> 1363 */ mergeMinBackoff(com.google.protobuf.Duration value)1364 public Builder mergeMinBackoff(com.google.protobuf.Duration value) { 1365 if (minBackoffBuilder_ == null) { 1366 if (((bitField0_ & 0x00000004) != 0) 1367 && minBackoff_ != null 1368 && minBackoff_ != com.google.protobuf.Duration.getDefaultInstance()) { 1369 getMinBackoffBuilder().mergeFrom(value); 1370 } else { 1371 minBackoff_ = value; 1372 } 1373 } else { 1374 minBackoffBuilder_.mergeFrom(value); 1375 } 1376 bitField0_ |= 0x00000004; 1377 onChanged(); 1378 return this; 1379 } 1380 /** 1381 * 1382 * 1383 * <pre> 1384 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1385 * for retry between 1386 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1387 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1388 * after it fails, if the queue's 1389 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1390 * task should be retried. 1391 * If unspecified when the queue is created, Cloud Tasks will pick the 1392 * default. 1393 * `min_backoff` will be truncated to the nearest second. 1394 * This field has the same meaning as 1395 * [min_backoff_seconds in 1396 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1397 * </pre> 1398 * 1399 * <code>.google.protobuf.Duration min_backoff = 3;</code> 1400 */ clearMinBackoff()1401 public Builder clearMinBackoff() { 1402 bitField0_ = (bitField0_ & ~0x00000004); 1403 minBackoff_ = null; 1404 if (minBackoffBuilder_ != null) { 1405 minBackoffBuilder_.dispose(); 1406 minBackoffBuilder_ = null; 1407 } 1408 onChanged(); 1409 return this; 1410 } 1411 /** 1412 * 1413 * 1414 * <pre> 1415 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1416 * for retry between 1417 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1418 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1419 * after it fails, if the queue's 1420 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1421 * task should be retried. 1422 * If unspecified when the queue is created, Cloud Tasks will pick the 1423 * default. 1424 * `min_backoff` will be truncated to the nearest second. 1425 * This field has the same meaning as 1426 * [min_backoff_seconds in 1427 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1428 * </pre> 1429 * 1430 * <code>.google.protobuf.Duration min_backoff = 3;</code> 1431 */ getMinBackoffBuilder()1432 public com.google.protobuf.Duration.Builder getMinBackoffBuilder() { 1433 bitField0_ |= 0x00000004; 1434 onChanged(); 1435 return getMinBackoffFieldBuilder().getBuilder(); 1436 } 1437 /** 1438 * 1439 * 1440 * <pre> 1441 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1442 * for retry between 1443 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1444 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1445 * after it fails, if the queue's 1446 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1447 * task should be retried. 1448 * If unspecified when the queue is created, Cloud Tasks will pick the 1449 * default. 1450 * `min_backoff` will be truncated to the nearest second. 1451 * This field has the same meaning as 1452 * [min_backoff_seconds in 1453 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1454 * </pre> 1455 * 1456 * <code>.google.protobuf.Duration min_backoff = 3;</code> 1457 */ getMinBackoffOrBuilder()1458 public com.google.protobuf.DurationOrBuilder getMinBackoffOrBuilder() { 1459 if (minBackoffBuilder_ != null) { 1460 return minBackoffBuilder_.getMessageOrBuilder(); 1461 } else { 1462 return minBackoff_ == null 1463 ? com.google.protobuf.Duration.getDefaultInstance() 1464 : minBackoff_; 1465 } 1466 } 1467 /** 1468 * 1469 * 1470 * <pre> 1471 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1472 * for retry between 1473 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1474 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1475 * after it fails, if the queue's 1476 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1477 * task should be retried. 1478 * If unspecified when the queue is created, Cloud Tasks will pick the 1479 * default. 1480 * `min_backoff` will be truncated to the nearest second. 1481 * This field has the same meaning as 1482 * [min_backoff_seconds in 1483 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1484 * </pre> 1485 * 1486 * <code>.google.protobuf.Duration min_backoff = 3;</code> 1487 */ 1488 private com.google.protobuf.SingleFieldBuilderV3< 1489 com.google.protobuf.Duration, 1490 com.google.protobuf.Duration.Builder, 1491 com.google.protobuf.DurationOrBuilder> getMinBackoffFieldBuilder()1492 getMinBackoffFieldBuilder() { 1493 if (minBackoffBuilder_ == null) { 1494 minBackoffBuilder_ = 1495 new com.google.protobuf.SingleFieldBuilderV3< 1496 com.google.protobuf.Duration, 1497 com.google.protobuf.Duration.Builder, 1498 com.google.protobuf.DurationOrBuilder>( 1499 getMinBackoff(), getParentForChildren(), isClean()); 1500 minBackoff_ = null; 1501 } 1502 return minBackoffBuilder_; 1503 } 1504 1505 private com.google.protobuf.Duration maxBackoff_; 1506 private com.google.protobuf.SingleFieldBuilderV3< 1507 com.google.protobuf.Duration, 1508 com.google.protobuf.Duration.Builder, 1509 com.google.protobuf.DurationOrBuilder> 1510 maxBackoffBuilder_; 1511 /** 1512 * 1513 * 1514 * <pre> 1515 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1516 * for retry between 1517 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1518 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1519 * after it fails, if the queue's 1520 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1521 * task should be retried. 1522 * If unspecified when the queue is created, Cloud Tasks will pick the 1523 * default. 1524 * `max_backoff` will be truncated to the nearest second. 1525 * This field has the same meaning as 1526 * [max_backoff_seconds in 1527 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1528 * </pre> 1529 * 1530 * <code>.google.protobuf.Duration max_backoff = 4;</code> 1531 * 1532 * @return Whether the maxBackoff field is set. 1533 */ hasMaxBackoff()1534 public boolean hasMaxBackoff() { 1535 return ((bitField0_ & 0x00000008) != 0); 1536 } 1537 /** 1538 * 1539 * 1540 * <pre> 1541 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1542 * for retry between 1543 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1544 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1545 * after it fails, if the queue's 1546 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1547 * task should be retried. 1548 * If unspecified when the queue is created, Cloud Tasks will pick the 1549 * default. 1550 * `max_backoff` will be truncated to the nearest second. 1551 * This field has the same meaning as 1552 * [max_backoff_seconds in 1553 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1554 * </pre> 1555 * 1556 * <code>.google.protobuf.Duration max_backoff = 4;</code> 1557 * 1558 * @return The maxBackoff. 1559 */ getMaxBackoff()1560 public com.google.protobuf.Duration getMaxBackoff() { 1561 if (maxBackoffBuilder_ == null) { 1562 return maxBackoff_ == null 1563 ? com.google.protobuf.Duration.getDefaultInstance() 1564 : maxBackoff_; 1565 } else { 1566 return maxBackoffBuilder_.getMessage(); 1567 } 1568 } 1569 /** 1570 * 1571 * 1572 * <pre> 1573 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1574 * for retry between 1575 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1576 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1577 * after it fails, if the queue's 1578 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1579 * task should be retried. 1580 * If unspecified when the queue is created, Cloud Tasks will pick the 1581 * default. 1582 * `max_backoff` will be truncated to the nearest second. 1583 * This field has the same meaning as 1584 * [max_backoff_seconds in 1585 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1586 * </pre> 1587 * 1588 * <code>.google.protobuf.Duration max_backoff = 4;</code> 1589 */ setMaxBackoff(com.google.protobuf.Duration value)1590 public Builder setMaxBackoff(com.google.protobuf.Duration value) { 1591 if (maxBackoffBuilder_ == null) { 1592 if (value == null) { 1593 throw new NullPointerException(); 1594 } 1595 maxBackoff_ = value; 1596 } else { 1597 maxBackoffBuilder_.setMessage(value); 1598 } 1599 bitField0_ |= 0x00000008; 1600 onChanged(); 1601 return this; 1602 } 1603 /** 1604 * 1605 * 1606 * <pre> 1607 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1608 * for retry between 1609 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1610 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1611 * after it fails, if the queue's 1612 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1613 * task should be retried. 1614 * If unspecified when the queue is created, Cloud Tasks will pick the 1615 * default. 1616 * `max_backoff` will be truncated to the nearest second. 1617 * This field has the same meaning as 1618 * [max_backoff_seconds in 1619 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1620 * </pre> 1621 * 1622 * <code>.google.protobuf.Duration max_backoff = 4;</code> 1623 */ setMaxBackoff(com.google.protobuf.Duration.Builder builderForValue)1624 public Builder setMaxBackoff(com.google.protobuf.Duration.Builder builderForValue) { 1625 if (maxBackoffBuilder_ == null) { 1626 maxBackoff_ = builderForValue.build(); 1627 } else { 1628 maxBackoffBuilder_.setMessage(builderForValue.build()); 1629 } 1630 bitField0_ |= 0x00000008; 1631 onChanged(); 1632 return this; 1633 } 1634 /** 1635 * 1636 * 1637 * <pre> 1638 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1639 * for retry between 1640 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1641 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1642 * after it fails, if the queue's 1643 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1644 * task should be retried. 1645 * If unspecified when the queue is created, Cloud Tasks will pick the 1646 * default. 1647 * `max_backoff` will be truncated to the nearest second. 1648 * This field has the same meaning as 1649 * [max_backoff_seconds in 1650 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1651 * </pre> 1652 * 1653 * <code>.google.protobuf.Duration max_backoff = 4;</code> 1654 */ mergeMaxBackoff(com.google.protobuf.Duration value)1655 public Builder mergeMaxBackoff(com.google.protobuf.Duration value) { 1656 if (maxBackoffBuilder_ == null) { 1657 if (((bitField0_ & 0x00000008) != 0) 1658 && maxBackoff_ != null 1659 && maxBackoff_ != com.google.protobuf.Duration.getDefaultInstance()) { 1660 getMaxBackoffBuilder().mergeFrom(value); 1661 } else { 1662 maxBackoff_ = value; 1663 } 1664 } else { 1665 maxBackoffBuilder_.mergeFrom(value); 1666 } 1667 bitField0_ |= 0x00000008; 1668 onChanged(); 1669 return this; 1670 } 1671 /** 1672 * 1673 * 1674 * <pre> 1675 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1676 * for retry between 1677 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1678 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1679 * after it fails, if the queue's 1680 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1681 * task should be retried. 1682 * If unspecified when the queue is created, Cloud Tasks will pick the 1683 * default. 1684 * `max_backoff` will be truncated to the nearest second. 1685 * This field has the same meaning as 1686 * [max_backoff_seconds in 1687 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1688 * </pre> 1689 * 1690 * <code>.google.protobuf.Duration max_backoff = 4;</code> 1691 */ clearMaxBackoff()1692 public Builder clearMaxBackoff() { 1693 bitField0_ = (bitField0_ & ~0x00000008); 1694 maxBackoff_ = null; 1695 if (maxBackoffBuilder_ != null) { 1696 maxBackoffBuilder_.dispose(); 1697 maxBackoffBuilder_ = null; 1698 } 1699 onChanged(); 1700 return this; 1701 } 1702 /** 1703 * 1704 * 1705 * <pre> 1706 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1707 * for retry between 1708 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1709 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1710 * after it fails, if the queue's 1711 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1712 * task should be retried. 1713 * If unspecified when the queue is created, Cloud Tasks will pick the 1714 * default. 1715 * `max_backoff` will be truncated to the nearest second. 1716 * This field has the same meaning as 1717 * [max_backoff_seconds in 1718 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1719 * </pre> 1720 * 1721 * <code>.google.protobuf.Duration max_backoff = 4;</code> 1722 */ getMaxBackoffBuilder()1723 public com.google.protobuf.Duration.Builder getMaxBackoffBuilder() { 1724 bitField0_ |= 0x00000008; 1725 onChanged(); 1726 return getMaxBackoffFieldBuilder().getBuilder(); 1727 } 1728 /** 1729 * 1730 * 1731 * <pre> 1732 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1733 * for retry between 1734 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1735 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1736 * after it fails, if the queue's 1737 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1738 * task should be retried. 1739 * If unspecified when the queue is created, Cloud Tasks will pick the 1740 * default. 1741 * `max_backoff` will be truncated to the nearest second. 1742 * This field has the same meaning as 1743 * [max_backoff_seconds in 1744 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1745 * </pre> 1746 * 1747 * <code>.google.protobuf.Duration max_backoff = 4;</code> 1748 */ getMaxBackoffOrBuilder()1749 public com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder() { 1750 if (maxBackoffBuilder_ != null) { 1751 return maxBackoffBuilder_.getMessageOrBuilder(); 1752 } else { 1753 return maxBackoff_ == null 1754 ? com.google.protobuf.Duration.getDefaultInstance() 1755 : maxBackoff_; 1756 } 1757 } 1758 /** 1759 * 1760 * 1761 * <pre> 1762 * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] 1763 * for retry between 1764 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and 1765 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration 1766 * after it fails, if the queue's 1767 * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the 1768 * task should be retried. 1769 * If unspecified when the queue is created, Cloud Tasks will pick the 1770 * default. 1771 * `max_backoff` will be truncated to the nearest second. 1772 * This field has the same meaning as 1773 * [max_backoff_seconds in 1774 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1775 * </pre> 1776 * 1777 * <code>.google.protobuf.Duration max_backoff = 4;</code> 1778 */ 1779 private com.google.protobuf.SingleFieldBuilderV3< 1780 com.google.protobuf.Duration, 1781 com.google.protobuf.Duration.Builder, 1782 com.google.protobuf.DurationOrBuilder> getMaxBackoffFieldBuilder()1783 getMaxBackoffFieldBuilder() { 1784 if (maxBackoffBuilder_ == null) { 1785 maxBackoffBuilder_ = 1786 new com.google.protobuf.SingleFieldBuilderV3< 1787 com.google.protobuf.Duration, 1788 com.google.protobuf.Duration.Builder, 1789 com.google.protobuf.DurationOrBuilder>( 1790 getMaxBackoff(), getParentForChildren(), isClean()); 1791 maxBackoff_ = null; 1792 } 1793 return maxBackoffBuilder_; 1794 } 1795 1796 private int maxDoublings_; 1797 /** 1798 * 1799 * 1800 * <pre> 1801 * The time between retries will double `max_doublings` times. 1802 * A task's retry interval starts at 1803 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then 1804 * doubles `max_doublings` times, then increases linearly, and finally retries 1805 * at intervals of 1806 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to 1807 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. 1808 * For example, if 1809 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, 1810 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, 1811 * and `max_doublings` is 3, then the a task will first be retried in 10s. The 1812 * retry interval will double three times, and then increase linearly by 2^3 * 1813 * 10s. Finally, the task will retry at intervals of 1814 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the 1815 * task has been attempted 1816 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. 1817 * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 1818 * 300s, .... 1819 * If unspecified when the queue is created, Cloud Tasks will pick the 1820 * default. 1821 * This field has the same meaning as 1822 * [max_doublings in 1823 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1824 * </pre> 1825 * 1826 * <code>int32 max_doublings = 5;</code> 1827 * 1828 * @return The maxDoublings. 1829 */ 1830 @java.lang.Override getMaxDoublings()1831 public int getMaxDoublings() { 1832 return maxDoublings_; 1833 } 1834 /** 1835 * 1836 * 1837 * <pre> 1838 * The time between retries will double `max_doublings` times. 1839 * A task's retry interval starts at 1840 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then 1841 * doubles `max_doublings` times, then increases linearly, and finally retries 1842 * at intervals of 1843 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to 1844 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. 1845 * For example, if 1846 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, 1847 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, 1848 * and `max_doublings` is 3, then the a task will first be retried in 10s. The 1849 * retry interval will double three times, and then increase linearly by 2^3 * 1850 * 10s. Finally, the task will retry at intervals of 1851 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the 1852 * task has been attempted 1853 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. 1854 * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 1855 * 300s, .... 1856 * If unspecified when the queue is created, Cloud Tasks will pick the 1857 * default. 1858 * This field has the same meaning as 1859 * [max_doublings in 1860 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1861 * </pre> 1862 * 1863 * <code>int32 max_doublings = 5;</code> 1864 * 1865 * @param value The maxDoublings to set. 1866 * @return This builder for chaining. 1867 */ setMaxDoublings(int value)1868 public Builder setMaxDoublings(int value) { 1869 1870 maxDoublings_ = value; 1871 bitField0_ |= 0x00000010; 1872 onChanged(); 1873 return this; 1874 } 1875 /** 1876 * 1877 * 1878 * <pre> 1879 * The time between retries will double `max_doublings` times. 1880 * A task's retry interval starts at 1881 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then 1882 * doubles `max_doublings` times, then increases linearly, and finally retries 1883 * at intervals of 1884 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to 1885 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. 1886 * For example, if 1887 * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, 1888 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, 1889 * and `max_doublings` is 3, then the a task will first be retried in 10s. The 1890 * retry interval will double three times, and then increase linearly by 2^3 * 1891 * 10s. Finally, the task will retry at intervals of 1892 * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the 1893 * task has been attempted 1894 * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. 1895 * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 1896 * 300s, .... 1897 * If unspecified when the queue is created, Cloud Tasks will pick the 1898 * default. 1899 * This field has the same meaning as 1900 * [max_doublings in 1901 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 1902 * </pre> 1903 * 1904 * <code>int32 max_doublings = 5;</code> 1905 * 1906 * @return This builder for chaining. 1907 */ clearMaxDoublings()1908 public Builder clearMaxDoublings() { 1909 bitField0_ = (bitField0_ & ~0x00000010); 1910 maxDoublings_ = 0; 1911 onChanged(); 1912 return this; 1913 } 1914 1915 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1916 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1917 return super.setUnknownFields(unknownFields); 1918 } 1919 1920 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1921 public final Builder mergeUnknownFields( 1922 final com.google.protobuf.UnknownFieldSet unknownFields) { 1923 return super.mergeUnknownFields(unknownFields); 1924 } 1925 1926 // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.RetryConfig) 1927 } 1928 1929 // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.RetryConfig) 1930 private static final com.google.cloud.tasks.v2beta3.RetryConfig DEFAULT_INSTANCE; 1931 1932 static { 1933 DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.RetryConfig(); 1934 } 1935 getDefaultInstance()1936 public static com.google.cloud.tasks.v2beta3.RetryConfig getDefaultInstance() { 1937 return DEFAULT_INSTANCE; 1938 } 1939 1940 private static final com.google.protobuf.Parser<RetryConfig> PARSER = 1941 new com.google.protobuf.AbstractParser<RetryConfig>() { 1942 @java.lang.Override 1943 public RetryConfig parsePartialFrom( 1944 com.google.protobuf.CodedInputStream input, 1945 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1946 throws com.google.protobuf.InvalidProtocolBufferException { 1947 Builder builder = newBuilder(); 1948 try { 1949 builder.mergeFrom(input, extensionRegistry); 1950 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1951 throw e.setUnfinishedMessage(builder.buildPartial()); 1952 } catch (com.google.protobuf.UninitializedMessageException e) { 1953 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1954 } catch (java.io.IOException e) { 1955 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1956 .setUnfinishedMessage(builder.buildPartial()); 1957 } 1958 return builder.buildPartial(); 1959 } 1960 }; 1961 parser()1962 public static com.google.protobuf.Parser<RetryConfig> parser() { 1963 return PARSER; 1964 } 1965 1966 @java.lang.Override getParserForType()1967 public com.google.protobuf.Parser<RetryConfig> getParserForType() { 1968 return PARSER; 1969 } 1970 1971 @java.lang.Override getDefaultInstanceForType()1972 public com.google.cloud.tasks.v2beta3.RetryConfig getDefaultInstanceForType() { 1973 return DEFAULT_INSTANCE; 1974 } 1975 } 1976