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