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/dataproc/v1/jobs.proto 18 19 package com.google.cloud.dataproc.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Job scheduling options. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.dataproc.v1.JobScheduling} 29 */ 30 public final class JobScheduling extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.JobScheduling) 33 JobSchedulingOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use JobScheduling.newBuilder() to construct. JobScheduling(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private JobScheduling(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 JobScheduling()40 private JobScheduling() {} 41 42 @java.lang.Override 43 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)44 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 45 return new JobScheduling(); 46 } 47 48 @java.lang.Override getUnknownFields()49 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 50 return this.unknownFields; 51 } 52 getDescriptor()53 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 54 return com.google.cloud.dataproc.v1.JobsProto 55 .internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor; 56 } 57 58 @java.lang.Override 59 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()60 internalGetFieldAccessorTable() { 61 return com.google.cloud.dataproc.v1.JobsProto 62 .internal_static_google_cloud_dataproc_v1_JobScheduling_fieldAccessorTable 63 .ensureFieldAccessorsInitialized( 64 com.google.cloud.dataproc.v1.JobScheduling.class, 65 com.google.cloud.dataproc.v1.JobScheduling.Builder.class); 66 } 67 68 public static final int MAX_FAILURES_PER_HOUR_FIELD_NUMBER = 1; 69 private int maxFailuresPerHour_ = 0; 70 /** 71 * 72 * 73 * <pre> 74 * Optional. Maximum number of times per hour a driver may be restarted as 75 * a result of driver exiting with non-zero code before job is 76 * reported failed. 77 * A job may be reported as thrashing if the driver exits with a non-zero code 78 * four times within a 10-minute window. 79 * Maximum value is 10. 80 * **Note:** This restartable job option is not supported in Dataproc 81 * [workflow templates] 82 * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). 83 * </pre> 84 * 85 * <code>int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 86 * 87 * @return The maxFailuresPerHour. 88 */ 89 @java.lang.Override getMaxFailuresPerHour()90 public int getMaxFailuresPerHour() { 91 return maxFailuresPerHour_; 92 } 93 94 public static final int MAX_FAILURES_TOTAL_FIELD_NUMBER = 2; 95 private int maxFailuresTotal_ = 0; 96 /** 97 * 98 * 99 * <pre> 100 * Optional. Maximum total number of times a driver may be restarted as a 101 * result of the driver exiting with a non-zero code. After the maximum number 102 * is reached, the job will be reported as failed. 103 * Maximum value is 240. 104 * **Note:** Currently, this restartable job option is 105 * not supported in Dataproc 106 * [workflow 107 * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). 108 * </pre> 109 * 110 * <code>int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 111 * 112 * @return The maxFailuresTotal. 113 */ 114 @java.lang.Override getMaxFailuresTotal()115 public int getMaxFailuresTotal() { 116 return maxFailuresTotal_; 117 } 118 119 private byte memoizedIsInitialized = -1; 120 121 @java.lang.Override isInitialized()122 public final boolean isInitialized() { 123 byte isInitialized = memoizedIsInitialized; 124 if (isInitialized == 1) return true; 125 if (isInitialized == 0) return false; 126 127 memoizedIsInitialized = 1; 128 return true; 129 } 130 131 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)132 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 133 if (maxFailuresPerHour_ != 0) { 134 output.writeInt32(1, maxFailuresPerHour_); 135 } 136 if (maxFailuresTotal_ != 0) { 137 output.writeInt32(2, maxFailuresTotal_); 138 } 139 getUnknownFields().writeTo(output); 140 } 141 142 @java.lang.Override getSerializedSize()143 public int getSerializedSize() { 144 int size = memoizedSize; 145 if (size != -1) return size; 146 147 size = 0; 148 if (maxFailuresPerHour_ != 0) { 149 size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxFailuresPerHour_); 150 } 151 if (maxFailuresTotal_ != 0) { 152 size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxFailuresTotal_); 153 } 154 size += getUnknownFields().getSerializedSize(); 155 memoizedSize = size; 156 return size; 157 } 158 159 @java.lang.Override equals(final java.lang.Object obj)160 public boolean equals(final java.lang.Object obj) { 161 if (obj == this) { 162 return true; 163 } 164 if (!(obj instanceof com.google.cloud.dataproc.v1.JobScheduling)) { 165 return super.equals(obj); 166 } 167 com.google.cloud.dataproc.v1.JobScheduling other = 168 (com.google.cloud.dataproc.v1.JobScheduling) obj; 169 170 if (getMaxFailuresPerHour() != other.getMaxFailuresPerHour()) return false; 171 if (getMaxFailuresTotal() != other.getMaxFailuresTotal()) return false; 172 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 173 return true; 174 } 175 176 @java.lang.Override hashCode()177 public int hashCode() { 178 if (memoizedHashCode != 0) { 179 return memoizedHashCode; 180 } 181 int hash = 41; 182 hash = (19 * hash) + getDescriptor().hashCode(); 183 hash = (37 * hash) + MAX_FAILURES_PER_HOUR_FIELD_NUMBER; 184 hash = (53 * hash) + getMaxFailuresPerHour(); 185 hash = (37 * hash) + MAX_FAILURES_TOTAL_FIELD_NUMBER; 186 hash = (53 * hash) + getMaxFailuresTotal(); 187 hash = (29 * hash) + getUnknownFields().hashCode(); 188 memoizedHashCode = hash; 189 return hash; 190 } 191 parseFrom(java.nio.ByteBuffer data)192 public static com.google.cloud.dataproc.v1.JobScheduling parseFrom(java.nio.ByteBuffer data) 193 throws com.google.protobuf.InvalidProtocolBufferException { 194 return PARSER.parseFrom(data); 195 } 196 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)197 public static com.google.cloud.dataproc.v1.JobScheduling parseFrom( 198 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 199 throws com.google.protobuf.InvalidProtocolBufferException { 200 return PARSER.parseFrom(data, extensionRegistry); 201 } 202 parseFrom( com.google.protobuf.ByteString data)203 public static com.google.cloud.dataproc.v1.JobScheduling parseFrom( 204 com.google.protobuf.ByteString data) 205 throws com.google.protobuf.InvalidProtocolBufferException { 206 return PARSER.parseFrom(data); 207 } 208 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)209 public static com.google.cloud.dataproc.v1.JobScheduling parseFrom( 210 com.google.protobuf.ByteString data, 211 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 212 throws com.google.protobuf.InvalidProtocolBufferException { 213 return PARSER.parseFrom(data, extensionRegistry); 214 } 215 parseFrom(byte[] data)216 public static com.google.cloud.dataproc.v1.JobScheduling parseFrom(byte[] data) 217 throws com.google.protobuf.InvalidProtocolBufferException { 218 return PARSER.parseFrom(data); 219 } 220 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)221 public static com.google.cloud.dataproc.v1.JobScheduling parseFrom( 222 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 223 throws com.google.protobuf.InvalidProtocolBufferException { 224 return PARSER.parseFrom(data, extensionRegistry); 225 } 226 parseFrom(java.io.InputStream input)227 public static com.google.cloud.dataproc.v1.JobScheduling parseFrom(java.io.InputStream input) 228 throws java.io.IOException { 229 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 230 } 231 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)232 public static com.google.cloud.dataproc.v1.JobScheduling parseFrom( 233 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 234 throws java.io.IOException { 235 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 236 PARSER, input, extensionRegistry); 237 } 238 parseDelimitedFrom( java.io.InputStream input)239 public static com.google.cloud.dataproc.v1.JobScheduling parseDelimitedFrom( 240 java.io.InputStream input) throws java.io.IOException { 241 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 242 } 243 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)244 public static com.google.cloud.dataproc.v1.JobScheduling parseDelimitedFrom( 245 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 246 throws java.io.IOException { 247 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 248 PARSER, input, extensionRegistry); 249 } 250 parseFrom( com.google.protobuf.CodedInputStream input)251 public static com.google.cloud.dataproc.v1.JobScheduling parseFrom( 252 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 253 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 254 } 255 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)256 public static com.google.cloud.dataproc.v1.JobScheduling parseFrom( 257 com.google.protobuf.CodedInputStream input, 258 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 259 throws java.io.IOException { 260 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 261 PARSER, input, extensionRegistry); 262 } 263 264 @java.lang.Override newBuilderForType()265 public Builder newBuilderForType() { 266 return newBuilder(); 267 } 268 newBuilder()269 public static Builder newBuilder() { 270 return DEFAULT_INSTANCE.toBuilder(); 271 } 272 newBuilder(com.google.cloud.dataproc.v1.JobScheduling prototype)273 public static Builder newBuilder(com.google.cloud.dataproc.v1.JobScheduling prototype) { 274 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 275 } 276 277 @java.lang.Override toBuilder()278 public Builder toBuilder() { 279 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 280 } 281 282 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)283 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 284 Builder builder = new Builder(parent); 285 return builder; 286 } 287 /** 288 * 289 * 290 * <pre> 291 * Job scheduling options. 292 * </pre> 293 * 294 * Protobuf type {@code google.cloud.dataproc.v1.JobScheduling} 295 */ 296 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 297 implements 298 // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.JobScheduling) 299 com.google.cloud.dataproc.v1.JobSchedulingOrBuilder { getDescriptor()300 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 301 return com.google.cloud.dataproc.v1.JobsProto 302 .internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor; 303 } 304 305 @java.lang.Override 306 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()307 internalGetFieldAccessorTable() { 308 return com.google.cloud.dataproc.v1.JobsProto 309 .internal_static_google_cloud_dataproc_v1_JobScheduling_fieldAccessorTable 310 .ensureFieldAccessorsInitialized( 311 com.google.cloud.dataproc.v1.JobScheduling.class, 312 com.google.cloud.dataproc.v1.JobScheduling.Builder.class); 313 } 314 315 // Construct using com.google.cloud.dataproc.v1.JobScheduling.newBuilder() Builder()316 private Builder() {} 317 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)318 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 319 super(parent); 320 } 321 322 @java.lang.Override clear()323 public Builder clear() { 324 super.clear(); 325 bitField0_ = 0; 326 maxFailuresPerHour_ = 0; 327 maxFailuresTotal_ = 0; 328 return this; 329 } 330 331 @java.lang.Override getDescriptorForType()332 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 333 return com.google.cloud.dataproc.v1.JobsProto 334 .internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor; 335 } 336 337 @java.lang.Override getDefaultInstanceForType()338 public com.google.cloud.dataproc.v1.JobScheduling getDefaultInstanceForType() { 339 return com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance(); 340 } 341 342 @java.lang.Override build()343 public com.google.cloud.dataproc.v1.JobScheduling build() { 344 com.google.cloud.dataproc.v1.JobScheduling result = buildPartial(); 345 if (!result.isInitialized()) { 346 throw newUninitializedMessageException(result); 347 } 348 return result; 349 } 350 351 @java.lang.Override buildPartial()352 public com.google.cloud.dataproc.v1.JobScheduling buildPartial() { 353 com.google.cloud.dataproc.v1.JobScheduling result = 354 new com.google.cloud.dataproc.v1.JobScheduling(this); 355 if (bitField0_ != 0) { 356 buildPartial0(result); 357 } 358 onBuilt(); 359 return result; 360 } 361 buildPartial0(com.google.cloud.dataproc.v1.JobScheduling result)362 private void buildPartial0(com.google.cloud.dataproc.v1.JobScheduling result) { 363 int from_bitField0_ = bitField0_; 364 if (((from_bitField0_ & 0x00000001) != 0)) { 365 result.maxFailuresPerHour_ = maxFailuresPerHour_; 366 } 367 if (((from_bitField0_ & 0x00000002) != 0)) { 368 result.maxFailuresTotal_ = maxFailuresTotal_; 369 } 370 } 371 372 @java.lang.Override clone()373 public Builder clone() { 374 return super.clone(); 375 } 376 377 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)378 public Builder setField( 379 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 380 return super.setField(field, value); 381 } 382 383 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)384 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 385 return super.clearField(field); 386 } 387 388 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)389 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 390 return super.clearOneof(oneof); 391 } 392 393 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)394 public Builder setRepeatedField( 395 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 396 return super.setRepeatedField(field, index, value); 397 } 398 399 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)400 public Builder addRepeatedField( 401 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 402 return super.addRepeatedField(field, value); 403 } 404 405 @java.lang.Override mergeFrom(com.google.protobuf.Message other)406 public Builder mergeFrom(com.google.protobuf.Message other) { 407 if (other instanceof com.google.cloud.dataproc.v1.JobScheduling) { 408 return mergeFrom((com.google.cloud.dataproc.v1.JobScheduling) other); 409 } else { 410 super.mergeFrom(other); 411 return this; 412 } 413 } 414 mergeFrom(com.google.cloud.dataproc.v1.JobScheduling other)415 public Builder mergeFrom(com.google.cloud.dataproc.v1.JobScheduling other) { 416 if (other == com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance()) return this; 417 if (other.getMaxFailuresPerHour() != 0) { 418 setMaxFailuresPerHour(other.getMaxFailuresPerHour()); 419 } 420 if (other.getMaxFailuresTotal() != 0) { 421 setMaxFailuresTotal(other.getMaxFailuresTotal()); 422 } 423 this.mergeUnknownFields(other.getUnknownFields()); 424 onChanged(); 425 return this; 426 } 427 428 @java.lang.Override isInitialized()429 public final boolean isInitialized() { 430 return true; 431 } 432 433 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)434 public Builder mergeFrom( 435 com.google.protobuf.CodedInputStream input, 436 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 437 throws java.io.IOException { 438 if (extensionRegistry == null) { 439 throw new java.lang.NullPointerException(); 440 } 441 try { 442 boolean done = false; 443 while (!done) { 444 int tag = input.readTag(); 445 switch (tag) { 446 case 0: 447 done = true; 448 break; 449 case 8: 450 { 451 maxFailuresPerHour_ = input.readInt32(); 452 bitField0_ |= 0x00000001; 453 break; 454 } // case 8 455 case 16: 456 { 457 maxFailuresTotal_ = input.readInt32(); 458 bitField0_ |= 0x00000002; 459 break; 460 } // case 16 461 default: 462 { 463 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 464 done = true; // was an endgroup tag 465 } 466 break; 467 } // default: 468 } // switch (tag) 469 } // while (!done) 470 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 471 throw e.unwrapIOException(); 472 } finally { 473 onChanged(); 474 } // finally 475 return this; 476 } 477 478 private int bitField0_; 479 480 private int maxFailuresPerHour_; 481 /** 482 * 483 * 484 * <pre> 485 * Optional. Maximum number of times per hour a driver may be restarted as 486 * a result of driver exiting with non-zero code before job is 487 * reported failed. 488 * A job may be reported as thrashing if the driver exits with a non-zero code 489 * four times within a 10-minute window. 490 * Maximum value is 10. 491 * **Note:** This restartable job option is not supported in Dataproc 492 * [workflow templates] 493 * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). 494 * </pre> 495 * 496 * <code>int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 497 * 498 * @return The maxFailuresPerHour. 499 */ 500 @java.lang.Override getMaxFailuresPerHour()501 public int getMaxFailuresPerHour() { 502 return maxFailuresPerHour_; 503 } 504 /** 505 * 506 * 507 * <pre> 508 * Optional. Maximum number of times per hour a driver may be restarted as 509 * a result of driver exiting with non-zero code before job is 510 * reported failed. 511 * A job may be reported as thrashing if the driver exits with a non-zero code 512 * four times within a 10-minute window. 513 * Maximum value is 10. 514 * **Note:** This restartable job option is not supported in Dataproc 515 * [workflow templates] 516 * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). 517 * </pre> 518 * 519 * <code>int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 520 * 521 * @param value The maxFailuresPerHour to set. 522 * @return This builder for chaining. 523 */ setMaxFailuresPerHour(int value)524 public Builder setMaxFailuresPerHour(int value) { 525 526 maxFailuresPerHour_ = value; 527 bitField0_ |= 0x00000001; 528 onChanged(); 529 return this; 530 } 531 /** 532 * 533 * 534 * <pre> 535 * Optional. Maximum number of times per hour a driver may be restarted as 536 * a result of driver exiting with non-zero code before job is 537 * reported failed. 538 * A job may be reported as thrashing if the driver exits with a non-zero code 539 * four times within a 10-minute window. 540 * Maximum value is 10. 541 * **Note:** This restartable job option is not supported in Dataproc 542 * [workflow templates] 543 * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). 544 * </pre> 545 * 546 * <code>int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 547 * 548 * @return This builder for chaining. 549 */ clearMaxFailuresPerHour()550 public Builder clearMaxFailuresPerHour() { 551 bitField0_ = (bitField0_ & ~0x00000001); 552 maxFailuresPerHour_ = 0; 553 onChanged(); 554 return this; 555 } 556 557 private int maxFailuresTotal_; 558 /** 559 * 560 * 561 * <pre> 562 * Optional. Maximum total number of times a driver may be restarted as a 563 * result of the driver exiting with a non-zero code. After the maximum number 564 * is reached, the job will be reported as failed. 565 * Maximum value is 240. 566 * **Note:** Currently, this restartable job option is 567 * not supported in Dataproc 568 * [workflow 569 * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). 570 * </pre> 571 * 572 * <code>int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 573 * 574 * @return The maxFailuresTotal. 575 */ 576 @java.lang.Override getMaxFailuresTotal()577 public int getMaxFailuresTotal() { 578 return maxFailuresTotal_; 579 } 580 /** 581 * 582 * 583 * <pre> 584 * Optional. Maximum total number of times a driver may be restarted as a 585 * result of the driver exiting with a non-zero code. After the maximum number 586 * is reached, the job will be reported as failed. 587 * Maximum value is 240. 588 * **Note:** Currently, this restartable job option is 589 * not supported in Dataproc 590 * [workflow 591 * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). 592 * </pre> 593 * 594 * <code>int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 595 * 596 * @param value The maxFailuresTotal to set. 597 * @return This builder for chaining. 598 */ setMaxFailuresTotal(int value)599 public Builder setMaxFailuresTotal(int value) { 600 601 maxFailuresTotal_ = value; 602 bitField0_ |= 0x00000002; 603 onChanged(); 604 return this; 605 } 606 /** 607 * 608 * 609 * <pre> 610 * Optional. Maximum total number of times a driver may be restarted as a 611 * result of the driver exiting with a non-zero code. After the maximum number 612 * is reached, the job will be reported as failed. 613 * Maximum value is 240. 614 * **Note:** Currently, this restartable job option is 615 * not supported in Dataproc 616 * [workflow 617 * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). 618 * </pre> 619 * 620 * <code>int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 621 * 622 * @return This builder for chaining. 623 */ clearMaxFailuresTotal()624 public Builder clearMaxFailuresTotal() { 625 bitField0_ = (bitField0_ & ~0x00000002); 626 maxFailuresTotal_ = 0; 627 onChanged(); 628 return this; 629 } 630 631 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)632 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 633 return super.setUnknownFields(unknownFields); 634 } 635 636 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)637 public final Builder mergeUnknownFields( 638 final com.google.protobuf.UnknownFieldSet unknownFields) { 639 return super.mergeUnknownFields(unknownFields); 640 } 641 642 // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.JobScheduling) 643 } 644 645 // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.JobScheduling) 646 private static final com.google.cloud.dataproc.v1.JobScheduling DEFAULT_INSTANCE; 647 648 static { 649 DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.JobScheduling(); 650 } 651 getDefaultInstance()652 public static com.google.cloud.dataproc.v1.JobScheduling getDefaultInstance() { 653 return DEFAULT_INSTANCE; 654 } 655 656 private static final com.google.protobuf.Parser<JobScheduling> PARSER = 657 new com.google.protobuf.AbstractParser<JobScheduling>() { 658 @java.lang.Override 659 public JobScheduling parsePartialFrom( 660 com.google.protobuf.CodedInputStream input, 661 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 662 throws com.google.protobuf.InvalidProtocolBufferException { 663 Builder builder = newBuilder(); 664 try { 665 builder.mergeFrom(input, extensionRegistry); 666 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 667 throw e.setUnfinishedMessage(builder.buildPartial()); 668 } catch (com.google.protobuf.UninitializedMessageException e) { 669 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 670 } catch (java.io.IOException e) { 671 throw new com.google.protobuf.InvalidProtocolBufferException(e) 672 .setUnfinishedMessage(builder.buildPartial()); 673 } 674 return builder.buildPartial(); 675 } 676 }; 677 parser()678 public static com.google.protobuf.Parser<JobScheduling> parser() { 679 return PARSER; 680 } 681 682 @java.lang.Override getParserForType()683 public com.google.protobuf.Parser<JobScheduling> getParserForType() { 684 return PARSER; 685 } 686 687 @java.lang.Override getDefaultInstanceForType()688 public com.google.cloud.dataproc.v1.JobScheduling getDefaultInstanceForType() { 689 return DEFAULT_INSTANCE; 690 } 691 } 692