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/devtools/cloudbuild/v1/cloudbuild.proto 18 19 package com.google.cloudbuild.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Optional arguments to enable specific features of builds. 26 * </pre> 27 * 28 * Protobuf type {@code google.devtools.cloudbuild.v1.BuildOptions} 29 */ 30 public final class BuildOptions extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.BuildOptions) 33 BuildOptionsOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use BuildOptions.newBuilder() to construct. BuildOptions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private BuildOptions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 BuildOptions()40 private BuildOptions() { 41 sourceProvenanceHash_ = java.util.Collections.emptyList(); 42 requestedVerifyOption_ = 0; 43 machineType_ = 0; 44 substitutionOption_ = 0; 45 logStreamingOption_ = 0; 46 workerPool_ = ""; 47 logging_ = 0; 48 env_ = com.google.protobuf.LazyStringArrayList.EMPTY; 49 secretEnv_ = com.google.protobuf.LazyStringArrayList.EMPTY; 50 volumes_ = java.util.Collections.emptyList(); 51 defaultLogsBucketBehavior_ = 0; 52 } 53 54 @java.lang.Override 55 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)56 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 57 return new BuildOptions(); 58 } 59 60 @java.lang.Override getUnknownFields()61 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 62 return this.unknownFields; 63 } 64 getDescriptor()65 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 66 return com.google.cloudbuild.v1.Cloudbuild 67 .internal_static_google_devtools_cloudbuild_v1_BuildOptions_descriptor; 68 } 69 70 @java.lang.Override 71 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()72 internalGetFieldAccessorTable() { 73 return com.google.cloudbuild.v1.Cloudbuild 74 .internal_static_google_devtools_cloudbuild_v1_BuildOptions_fieldAccessorTable 75 .ensureFieldAccessorsInitialized( 76 com.google.cloudbuild.v1.BuildOptions.class, 77 com.google.cloudbuild.v1.BuildOptions.Builder.class); 78 } 79 80 /** 81 * 82 * 83 * <pre> 84 * Specifies the manner in which the build should be verified, if at all. 85 * </pre> 86 * 87 * Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.VerifyOption} 88 */ 89 public enum VerifyOption implements com.google.protobuf.ProtocolMessageEnum { 90 /** 91 * 92 * 93 * <pre> 94 * Not a verifiable build (the default). 95 * </pre> 96 * 97 * <code>NOT_VERIFIED = 0;</code> 98 */ 99 NOT_VERIFIED(0), 100 /** 101 * 102 * 103 * <pre> 104 * Build must be verified. 105 * </pre> 106 * 107 * <code>VERIFIED = 1;</code> 108 */ 109 VERIFIED(1), 110 UNRECOGNIZED(-1), 111 ; 112 113 /** 114 * 115 * 116 * <pre> 117 * Not a verifiable build (the default). 118 * </pre> 119 * 120 * <code>NOT_VERIFIED = 0;</code> 121 */ 122 public static final int NOT_VERIFIED_VALUE = 0; 123 /** 124 * 125 * 126 * <pre> 127 * Build must be verified. 128 * </pre> 129 * 130 * <code>VERIFIED = 1;</code> 131 */ 132 public static final int VERIFIED_VALUE = 1; 133 getNumber()134 public final int getNumber() { 135 if (this == UNRECOGNIZED) { 136 throw new java.lang.IllegalArgumentException( 137 "Can't get the number of an unknown enum value."); 138 } 139 return value; 140 } 141 142 /** 143 * @param value The numeric wire value of the corresponding enum entry. 144 * @return The enum associated with the given numeric wire value. 145 * @deprecated Use {@link #forNumber(int)} instead. 146 */ 147 @java.lang.Deprecated valueOf(int value)148 public static VerifyOption valueOf(int value) { 149 return forNumber(value); 150 } 151 152 /** 153 * @param value The numeric wire value of the corresponding enum entry. 154 * @return The enum associated with the given numeric wire value. 155 */ forNumber(int value)156 public static VerifyOption forNumber(int value) { 157 switch (value) { 158 case 0: 159 return NOT_VERIFIED; 160 case 1: 161 return VERIFIED; 162 default: 163 return null; 164 } 165 } 166 internalGetValueMap()167 public static com.google.protobuf.Internal.EnumLiteMap<VerifyOption> internalGetValueMap() { 168 return internalValueMap; 169 } 170 171 private static final com.google.protobuf.Internal.EnumLiteMap<VerifyOption> internalValueMap = 172 new com.google.protobuf.Internal.EnumLiteMap<VerifyOption>() { 173 public VerifyOption findValueByNumber(int number) { 174 return VerifyOption.forNumber(number); 175 } 176 }; 177 getValueDescriptor()178 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 179 if (this == UNRECOGNIZED) { 180 throw new java.lang.IllegalStateException( 181 "Can't get the descriptor of an unrecognized enum value."); 182 } 183 return getDescriptor().getValues().get(ordinal()); 184 } 185 getDescriptorForType()186 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 187 return getDescriptor(); 188 } 189 getDescriptor()190 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 191 return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(0); 192 } 193 194 private static final VerifyOption[] VALUES = values(); 195 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)196 public static VerifyOption valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 197 if (desc.getType() != getDescriptor()) { 198 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 199 } 200 if (desc.getIndex() == -1) { 201 return UNRECOGNIZED; 202 } 203 return VALUES[desc.getIndex()]; 204 } 205 206 private final int value; 207 VerifyOption(int value)208 private VerifyOption(int value) { 209 this.value = value; 210 } 211 212 // @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.VerifyOption) 213 } 214 215 /** 216 * 217 * 218 * <pre> 219 * Supported Compute Engine machine types. 220 * For more information, see [Machine 221 * types](https://cloud.google.com/compute/docs/machine-types). 222 * </pre> 223 * 224 * Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.MachineType} 225 */ 226 public enum MachineType implements com.google.protobuf.ProtocolMessageEnum { 227 /** 228 * 229 * 230 * <pre> 231 * Standard machine type. 232 * </pre> 233 * 234 * <code>UNSPECIFIED = 0;</code> 235 */ 236 UNSPECIFIED(0), 237 /** 238 * 239 * 240 * <pre> 241 * Highcpu machine with 8 CPUs. 242 * </pre> 243 * 244 * <code>N1_HIGHCPU_8 = 1;</code> 245 */ 246 N1_HIGHCPU_8(1), 247 /** 248 * 249 * 250 * <pre> 251 * Highcpu machine with 32 CPUs. 252 * </pre> 253 * 254 * <code>N1_HIGHCPU_32 = 2;</code> 255 */ 256 N1_HIGHCPU_32(2), 257 /** 258 * 259 * 260 * <pre> 261 * Highcpu e2 machine with 8 CPUs. 262 * </pre> 263 * 264 * <code>E2_HIGHCPU_8 = 5;</code> 265 */ 266 E2_HIGHCPU_8(5), 267 /** 268 * 269 * 270 * <pre> 271 * Highcpu e2 machine with 32 CPUs. 272 * </pre> 273 * 274 * <code>E2_HIGHCPU_32 = 6;</code> 275 */ 276 E2_HIGHCPU_32(6), 277 UNRECOGNIZED(-1), 278 ; 279 280 /** 281 * 282 * 283 * <pre> 284 * Standard machine type. 285 * </pre> 286 * 287 * <code>UNSPECIFIED = 0;</code> 288 */ 289 public static final int UNSPECIFIED_VALUE = 0; 290 /** 291 * 292 * 293 * <pre> 294 * Highcpu machine with 8 CPUs. 295 * </pre> 296 * 297 * <code>N1_HIGHCPU_8 = 1;</code> 298 */ 299 public static final int N1_HIGHCPU_8_VALUE = 1; 300 /** 301 * 302 * 303 * <pre> 304 * Highcpu machine with 32 CPUs. 305 * </pre> 306 * 307 * <code>N1_HIGHCPU_32 = 2;</code> 308 */ 309 public static final int N1_HIGHCPU_32_VALUE = 2; 310 /** 311 * 312 * 313 * <pre> 314 * Highcpu e2 machine with 8 CPUs. 315 * </pre> 316 * 317 * <code>E2_HIGHCPU_8 = 5;</code> 318 */ 319 public static final int E2_HIGHCPU_8_VALUE = 5; 320 /** 321 * 322 * 323 * <pre> 324 * Highcpu e2 machine with 32 CPUs. 325 * </pre> 326 * 327 * <code>E2_HIGHCPU_32 = 6;</code> 328 */ 329 public static final int E2_HIGHCPU_32_VALUE = 6; 330 getNumber()331 public final int getNumber() { 332 if (this == UNRECOGNIZED) { 333 throw new java.lang.IllegalArgumentException( 334 "Can't get the number of an unknown enum value."); 335 } 336 return value; 337 } 338 339 /** 340 * @param value The numeric wire value of the corresponding enum entry. 341 * @return The enum associated with the given numeric wire value. 342 * @deprecated Use {@link #forNumber(int)} instead. 343 */ 344 @java.lang.Deprecated valueOf(int value)345 public static MachineType valueOf(int value) { 346 return forNumber(value); 347 } 348 349 /** 350 * @param value The numeric wire value of the corresponding enum entry. 351 * @return The enum associated with the given numeric wire value. 352 */ forNumber(int value)353 public static MachineType forNumber(int value) { 354 switch (value) { 355 case 0: 356 return UNSPECIFIED; 357 case 1: 358 return N1_HIGHCPU_8; 359 case 2: 360 return N1_HIGHCPU_32; 361 case 5: 362 return E2_HIGHCPU_8; 363 case 6: 364 return E2_HIGHCPU_32; 365 default: 366 return null; 367 } 368 } 369 internalGetValueMap()370 public static com.google.protobuf.Internal.EnumLiteMap<MachineType> internalGetValueMap() { 371 return internalValueMap; 372 } 373 374 private static final com.google.protobuf.Internal.EnumLiteMap<MachineType> internalValueMap = 375 new com.google.protobuf.Internal.EnumLiteMap<MachineType>() { 376 public MachineType findValueByNumber(int number) { 377 return MachineType.forNumber(number); 378 } 379 }; 380 getValueDescriptor()381 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 382 if (this == UNRECOGNIZED) { 383 throw new java.lang.IllegalStateException( 384 "Can't get the descriptor of an unrecognized enum value."); 385 } 386 return getDescriptor().getValues().get(ordinal()); 387 } 388 getDescriptorForType()389 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 390 return getDescriptor(); 391 } 392 getDescriptor()393 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 394 return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(1); 395 } 396 397 private static final MachineType[] VALUES = values(); 398 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)399 public static MachineType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 400 if (desc.getType() != getDescriptor()) { 401 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 402 } 403 if (desc.getIndex() == -1) { 404 return UNRECOGNIZED; 405 } 406 return VALUES[desc.getIndex()]; 407 } 408 409 private final int value; 410 MachineType(int value)411 private MachineType(int value) { 412 this.value = value; 413 } 414 415 // @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.MachineType) 416 } 417 418 /** 419 * 420 * 421 * <pre> 422 * Specifies the behavior when there is an error in the substitution checks. 423 * </pre> 424 * 425 * Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption} 426 */ 427 public enum SubstitutionOption implements com.google.protobuf.ProtocolMessageEnum { 428 /** 429 * 430 * 431 * <pre> 432 * Fails the build if error in substitutions checks, like missing 433 * a substitution in the template or in the map. 434 * </pre> 435 * 436 * <code>MUST_MATCH = 0;</code> 437 */ 438 MUST_MATCH(0), 439 /** 440 * 441 * 442 * <pre> 443 * Do not fail the build if error in substitutions checks. 444 * </pre> 445 * 446 * <code>ALLOW_LOOSE = 1;</code> 447 */ 448 ALLOW_LOOSE(1), 449 UNRECOGNIZED(-1), 450 ; 451 452 /** 453 * 454 * 455 * <pre> 456 * Fails the build if error in substitutions checks, like missing 457 * a substitution in the template or in the map. 458 * </pre> 459 * 460 * <code>MUST_MATCH = 0;</code> 461 */ 462 public static final int MUST_MATCH_VALUE = 0; 463 /** 464 * 465 * 466 * <pre> 467 * Do not fail the build if error in substitutions checks. 468 * </pre> 469 * 470 * <code>ALLOW_LOOSE = 1;</code> 471 */ 472 public static final int ALLOW_LOOSE_VALUE = 1; 473 getNumber()474 public final int getNumber() { 475 if (this == UNRECOGNIZED) { 476 throw new java.lang.IllegalArgumentException( 477 "Can't get the number of an unknown enum value."); 478 } 479 return value; 480 } 481 482 /** 483 * @param value The numeric wire value of the corresponding enum entry. 484 * @return The enum associated with the given numeric wire value. 485 * @deprecated Use {@link #forNumber(int)} instead. 486 */ 487 @java.lang.Deprecated valueOf(int value)488 public static SubstitutionOption valueOf(int value) { 489 return forNumber(value); 490 } 491 492 /** 493 * @param value The numeric wire value of the corresponding enum entry. 494 * @return The enum associated with the given numeric wire value. 495 */ forNumber(int value)496 public static SubstitutionOption forNumber(int value) { 497 switch (value) { 498 case 0: 499 return MUST_MATCH; 500 case 1: 501 return ALLOW_LOOSE; 502 default: 503 return null; 504 } 505 } 506 507 public static com.google.protobuf.Internal.EnumLiteMap<SubstitutionOption> internalGetValueMap()508 internalGetValueMap() { 509 return internalValueMap; 510 } 511 512 private static final com.google.protobuf.Internal.EnumLiteMap<SubstitutionOption> 513 internalValueMap = 514 new com.google.protobuf.Internal.EnumLiteMap<SubstitutionOption>() { 515 public SubstitutionOption findValueByNumber(int number) { 516 return SubstitutionOption.forNumber(number); 517 } 518 }; 519 getValueDescriptor()520 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 521 if (this == UNRECOGNIZED) { 522 throw new java.lang.IllegalStateException( 523 "Can't get the descriptor of an unrecognized enum value."); 524 } 525 return getDescriptor().getValues().get(ordinal()); 526 } 527 getDescriptorForType()528 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 529 return getDescriptor(); 530 } 531 getDescriptor()532 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 533 return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(2); 534 } 535 536 private static final SubstitutionOption[] VALUES = values(); 537 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)538 public static SubstitutionOption valueOf( 539 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 540 if (desc.getType() != getDescriptor()) { 541 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 542 } 543 if (desc.getIndex() == -1) { 544 return UNRECOGNIZED; 545 } 546 return VALUES[desc.getIndex()]; 547 } 548 549 private final int value; 550 SubstitutionOption(int value)551 private SubstitutionOption(int value) { 552 this.value = value; 553 } 554 555 // @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption) 556 } 557 558 /** 559 * 560 * 561 * <pre> 562 * Specifies the behavior when writing build logs to Google Cloud Storage. 563 * </pre> 564 * 565 * Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption} 566 */ 567 public enum LogStreamingOption implements com.google.protobuf.ProtocolMessageEnum { 568 /** 569 * 570 * 571 * <pre> 572 * Service may automatically determine build log streaming behavior. 573 * </pre> 574 * 575 * <code>STREAM_DEFAULT = 0;</code> 576 */ 577 STREAM_DEFAULT(0), 578 /** 579 * 580 * 581 * <pre> 582 * Build logs should be streamed to Google Cloud Storage. 583 * </pre> 584 * 585 * <code>STREAM_ON = 1;</code> 586 */ 587 STREAM_ON(1), 588 /** 589 * 590 * 591 * <pre> 592 * Build logs should not be streamed to Google Cloud Storage; they will be 593 * written when the build is completed. 594 * </pre> 595 * 596 * <code>STREAM_OFF = 2;</code> 597 */ 598 STREAM_OFF(2), 599 UNRECOGNIZED(-1), 600 ; 601 602 /** 603 * 604 * 605 * <pre> 606 * Service may automatically determine build log streaming behavior. 607 * </pre> 608 * 609 * <code>STREAM_DEFAULT = 0;</code> 610 */ 611 public static final int STREAM_DEFAULT_VALUE = 0; 612 /** 613 * 614 * 615 * <pre> 616 * Build logs should be streamed to Google Cloud Storage. 617 * </pre> 618 * 619 * <code>STREAM_ON = 1;</code> 620 */ 621 public static final int STREAM_ON_VALUE = 1; 622 /** 623 * 624 * 625 * <pre> 626 * Build logs should not be streamed to Google Cloud Storage; they will be 627 * written when the build is completed. 628 * </pre> 629 * 630 * <code>STREAM_OFF = 2;</code> 631 */ 632 public static final int STREAM_OFF_VALUE = 2; 633 getNumber()634 public final int getNumber() { 635 if (this == UNRECOGNIZED) { 636 throw new java.lang.IllegalArgumentException( 637 "Can't get the number of an unknown enum value."); 638 } 639 return value; 640 } 641 642 /** 643 * @param value The numeric wire value of the corresponding enum entry. 644 * @return The enum associated with the given numeric wire value. 645 * @deprecated Use {@link #forNumber(int)} instead. 646 */ 647 @java.lang.Deprecated valueOf(int value)648 public static LogStreamingOption valueOf(int value) { 649 return forNumber(value); 650 } 651 652 /** 653 * @param value The numeric wire value of the corresponding enum entry. 654 * @return The enum associated with the given numeric wire value. 655 */ forNumber(int value)656 public static LogStreamingOption forNumber(int value) { 657 switch (value) { 658 case 0: 659 return STREAM_DEFAULT; 660 case 1: 661 return STREAM_ON; 662 case 2: 663 return STREAM_OFF; 664 default: 665 return null; 666 } 667 } 668 669 public static com.google.protobuf.Internal.EnumLiteMap<LogStreamingOption> internalGetValueMap()670 internalGetValueMap() { 671 return internalValueMap; 672 } 673 674 private static final com.google.protobuf.Internal.EnumLiteMap<LogStreamingOption> 675 internalValueMap = 676 new com.google.protobuf.Internal.EnumLiteMap<LogStreamingOption>() { 677 public LogStreamingOption findValueByNumber(int number) { 678 return LogStreamingOption.forNumber(number); 679 } 680 }; 681 getValueDescriptor()682 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 683 if (this == UNRECOGNIZED) { 684 throw new java.lang.IllegalStateException( 685 "Can't get the descriptor of an unrecognized enum value."); 686 } 687 return getDescriptor().getValues().get(ordinal()); 688 } 689 getDescriptorForType()690 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 691 return getDescriptor(); 692 } 693 getDescriptor()694 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 695 return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(3); 696 } 697 698 private static final LogStreamingOption[] VALUES = values(); 699 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)700 public static LogStreamingOption valueOf( 701 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 702 if (desc.getType() != getDescriptor()) { 703 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 704 } 705 if (desc.getIndex() == -1) { 706 return UNRECOGNIZED; 707 } 708 return VALUES[desc.getIndex()]; 709 } 710 711 private final int value; 712 LogStreamingOption(int value)713 private LogStreamingOption(int value) { 714 this.value = value; 715 } 716 717 // @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption) 718 } 719 720 /** 721 * 722 * 723 * <pre> 724 * Specifies the logging mode. 725 * </pre> 726 * 727 * Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.LoggingMode} 728 */ 729 public enum LoggingMode implements com.google.protobuf.ProtocolMessageEnum { 730 /** 731 * 732 * 733 * <pre> 734 * The service determines the logging mode. The default is `LEGACY`. Do not 735 * rely on the default logging behavior as it may change in the future. 736 * </pre> 737 * 738 * <code>LOGGING_UNSPECIFIED = 0;</code> 739 */ 740 LOGGING_UNSPECIFIED(0), 741 /** 742 * 743 * 744 * <pre> 745 * Build logs are stored in Cloud Logging and Cloud Storage. 746 * </pre> 747 * 748 * <code>LEGACY = 1;</code> 749 */ 750 LEGACY(1), 751 /** 752 * 753 * 754 * <pre> 755 * Build logs are stored in Cloud Storage. 756 * </pre> 757 * 758 * <code>GCS_ONLY = 2;</code> 759 */ 760 GCS_ONLY(2), 761 /** 762 * 763 * 764 * <pre> 765 * This option is the same as CLOUD_LOGGING_ONLY. 766 * </pre> 767 * 768 * <code>STACKDRIVER_ONLY = 3 [deprecated = true];</code> 769 */ 770 @java.lang.Deprecated 771 STACKDRIVER_ONLY(3), 772 /** 773 * 774 * 775 * <pre> 776 * Build logs are stored in Cloud Logging. Selecting this option will not 777 * allow [logs 778 * streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log). 779 * </pre> 780 * 781 * <code>CLOUD_LOGGING_ONLY = 5;</code> 782 */ 783 CLOUD_LOGGING_ONLY(5), 784 /** 785 * 786 * 787 * <pre> 788 * Turn off all logging. No build logs will be captured. 789 * </pre> 790 * 791 * <code>NONE = 4;</code> 792 */ 793 NONE(4), 794 UNRECOGNIZED(-1), 795 ; 796 797 /** 798 * 799 * 800 * <pre> 801 * The service determines the logging mode. The default is `LEGACY`. Do not 802 * rely on the default logging behavior as it may change in the future. 803 * </pre> 804 * 805 * <code>LOGGING_UNSPECIFIED = 0;</code> 806 */ 807 public static final int LOGGING_UNSPECIFIED_VALUE = 0; 808 /** 809 * 810 * 811 * <pre> 812 * Build logs are stored in Cloud Logging and Cloud Storage. 813 * </pre> 814 * 815 * <code>LEGACY = 1;</code> 816 */ 817 public static final int LEGACY_VALUE = 1; 818 /** 819 * 820 * 821 * <pre> 822 * Build logs are stored in Cloud Storage. 823 * </pre> 824 * 825 * <code>GCS_ONLY = 2;</code> 826 */ 827 public static final int GCS_ONLY_VALUE = 2; 828 /** 829 * 830 * 831 * <pre> 832 * This option is the same as CLOUD_LOGGING_ONLY. 833 * </pre> 834 * 835 * <code>STACKDRIVER_ONLY = 3 [deprecated = true];</code> 836 */ 837 @java.lang.Deprecated public static final int STACKDRIVER_ONLY_VALUE = 3; 838 /** 839 * 840 * 841 * <pre> 842 * Build logs are stored in Cloud Logging. Selecting this option will not 843 * allow [logs 844 * streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log). 845 * </pre> 846 * 847 * <code>CLOUD_LOGGING_ONLY = 5;</code> 848 */ 849 public static final int CLOUD_LOGGING_ONLY_VALUE = 5; 850 /** 851 * 852 * 853 * <pre> 854 * Turn off all logging. No build logs will be captured. 855 * </pre> 856 * 857 * <code>NONE = 4;</code> 858 */ 859 public static final int NONE_VALUE = 4; 860 getNumber()861 public final int getNumber() { 862 if (this == UNRECOGNIZED) { 863 throw new java.lang.IllegalArgumentException( 864 "Can't get the number of an unknown enum value."); 865 } 866 return value; 867 } 868 869 /** 870 * @param value The numeric wire value of the corresponding enum entry. 871 * @return The enum associated with the given numeric wire value. 872 * @deprecated Use {@link #forNumber(int)} instead. 873 */ 874 @java.lang.Deprecated valueOf(int value)875 public static LoggingMode valueOf(int value) { 876 return forNumber(value); 877 } 878 879 /** 880 * @param value The numeric wire value of the corresponding enum entry. 881 * @return The enum associated with the given numeric wire value. 882 */ forNumber(int value)883 public static LoggingMode forNumber(int value) { 884 switch (value) { 885 case 0: 886 return LOGGING_UNSPECIFIED; 887 case 1: 888 return LEGACY; 889 case 2: 890 return GCS_ONLY; 891 case 3: 892 return STACKDRIVER_ONLY; 893 case 5: 894 return CLOUD_LOGGING_ONLY; 895 case 4: 896 return NONE; 897 default: 898 return null; 899 } 900 } 901 internalGetValueMap()902 public static com.google.protobuf.Internal.EnumLiteMap<LoggingMode> internalGetValueMap() { 903 return internalValueMap; 904 } 905 906 private static final com.google.protobuf.Internal.EnumLiteMap<LoggingMode> internalValueMap = 907 new com.google.protobuf.Internal.EnumLiteMap<LoggingMode>() { 908 public LoggingMode findValueByNumber(int number) { 909 return LoggingMode.forNumber(number); 910 } 911 }; 912 getValueDescriptor()913 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 914 if (this == UNRECOGNIZED) { 915 throw new java.lang.IllegalStateException( 916 "Can't get the descriptor of an unrecognized enum value."); 917 } 918 return getDescriptor().getValues().get(ordinal()); 919 } 920 getDescriptorForType()921 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 922 return getDescriptor(); 923 } 924 getDescriptor()925 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 926 return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(4); 927 } 928 929 private static final LoggingMode[] VALUES = values(); 930 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)931 public static LoggingMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 932 if (desc.getType() != getDescriptor()) { 933 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 934 } 935 if (desc.getIndex() == -1) { 936 return UNRECOGNIZED; 937 } 938 return VALUES[desc.getIndex()]; 939 } 940 941 private final int value; 942 LoggingMode(int value)943 private LoggingMode(int value) { 944 this.value = value; 945 } 946 947 // @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.LoggingMode) 948 } 949 950 /** 951 * 952 * 953 * <pre> 954 * Default GCS log bucket behavior options. 955 * </pre> 956 * 957 * Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior} 958 */ 959 public enum DefaultLogsBucketBehavior implements com.google.protobuf.ProtocolMessageEnum { 960 /** 961 * 962 * 963 * <pre> 964 * Unspecified. 965 * </pre> 966 * 967 * <code>DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED = 0;</code> 968 */ 969 DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED(0), 970 /** 971 * 972 * 973 * <pre> 974 * Bucket is located in user-owned project in the same region as the 975 * build. The builder service account must have access to create and write 976 * to GCS buckets in the build project. 977 * </pre> 978 * 979 * <code>REGIONAL_USER_OWNED_BUCKET = 1;</code> 980 */ 981 REGIONAL_USER_OWNED_BUCKET(1), 982 UNRECOGNIZED(-1), 983 ; 984 985 /** 986 * 987 * 988 * <pre> 989 * Unspecified. 990 * </pre> 991 * 992 * <code>DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED = 0;</code> 993 */ 994 public static final int DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED_VALUE = 0; 995 /** 996 * 997 * 998 * <pre> 999 * Bucket is located in user-owned project in the same region as the 1000 * build. The builder service account must have access to create and write 1001 * to GCS buckets in the build project. 1002 * </pre> 1003 * 1004 * <code>REGIONAL_USER_OWNED_BUCKET = 1;</code> 1005 */ 1006 public static final int REGIONAL_USER_OWNED_BUCKET_VALUE = 1; 1007 getNumber()1008 public final int getNumber() { 1009 if (this == UNRECOGNIZED) { 1010 throw new java.lang.IllegalArgumentException( 1011 "Can't get the number of an unknown enum value."); 1012 } 1013 return value; 1014 } 1015 1016 /** 1017 * @param value The numeric wire value of the corresponding enum entry. 1018 * @return The enum associated with the given numeric wire value. 1019 * @deprecated Use {@link #forNumber(int)} instead. 1020 */ 1021 @java.lang.Deprecated valueOf(int value)1022 public static DefaultLogsBucketBehavior valueOf(int value) { 1023 return forNumber(value); 1024 } 1025 1026 /** 1027 * @param value The numeric wire value of the corresponding enum entry. 1028 * @return The enum associated with the given numeric wire value. 1029 */ forNumber(int value)1030 public static DefaultLogsBucketBehavior forNumber(int value) { 1031 switch (value) { 1032 case 0: 1033 return DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED; 1034 case 1: 1035 return REGIONAL_USER_OWNED_BUCKET; 1036 default: 1037 return null; 1038 } 1039 } 1040 1041 public static com.google.protobuf.Internal.EnumLiteMap<DefaultLogsBucketBehavior> internalGetValueMap()1042 internalGetValueMap() { 1043 return internalValueMap; 1044 } 1045 1046 private static final com.google.protobuf.Internal.EnumLiteMap<DefaultLogsBucketBehavior> 1047 internalValueMap = 1048 new com.google.protobuf.Internal.EnumLiteMap<DefaultLogsBucketBehavior>() { 1049 public DefaultLogsBucketBehavior findValueByNumber(int number) { 1050 return DefaultLogsBucketBehavior.forNumber(number); 1051 } 1052 }; 1053 getValueDescriptor()1054 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 1055 if (this == UNRECOGNIZED) { 1056 throw new java.lang.IllegalStateException( 1057 "Can't get the descriptor of an unrecognized enum value."); 1058 } 1059 return getDescriptor().getValues().get(ordinal()); 1060 } 1061 getDescriptorForType()1062 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 1063 return getDescriptor(); 1064 } 1065 getDescriptor()1066 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 1067 return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(5); 1068 } 1069 1070 private static final DefaultLogsBucketBehavior[] VALUES = values(); 1071 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)1072 public static DefaultLogsBucketBehavior valueOf( 1073 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 1074 if (desc.getType() != getDescriptor()) { 1075 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 1076 } 1077 if (desc.getIndex() == -1) { 1078 return UNRECOGNIZED; 1079 } 1080 return VALUES[desc.getIndex()]; 1081 } 1082 1083 private final int value; 1084 DefaultLogsBucketBehavior(int value)1085 private DefaultLogsBucketBehavior(int value) { 1086 this.value = value; 1087 } 1088 1089 // @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior) 1090 } 1091 1092 public interface PoolOptionOrBuilder 1093 extends 1094 // @@protoc_insertion_point(interface_extends:google.devtools.cloudbuild.v1.BuildOptions.PoolOption) 1095 com.google.protobuf.MessageOrBuilder { 1096 1097 /** 1098 * 1099 * 1100 * <pre> 1101 * The `WorkerPool` resource to execute the build on. 1102 * You must have `cloudbuild.workerpools.use` on the project hosting the 1103 * WorkerPool. 1104 * Format projects/{project}/locations/{location}/workerPools/{workerPoolId} 1105 * </pre> 1106 * 1107 * <code>string name = 1 [(.google.api.resource_reference) = { ... }</code> 1108 * 1109 * @return The name. 1110 */ getName()1111 java.lang.String getName(); 1112 /** 1113 * 1114 * 1115 * <pre> 1116 * The `WorkerPool` resource to execute the build on. 1117 * You must have `cloudbuild.workerpools.use` on the project hosting the 1118 * WorkerPool. 1119 * Format projects/{project}/locations/{location}/workerPools/{workerPoolId} 1120 * </pre> 1121 * 1122 * <code>string name = 1 [(.google.api.resource_reference) = { ... }</code> 1123 * 1124 * @return The bytes for name. 1125 */ getNameBytes()1126 com.google.protobuf.ByteString getNameBytes(); 1127 } 1128 /** 1129 * 1130 * 1131 * <pre> 1132 * Details about how a build should be executed on a `WorkerPool`. 1133 * See [running builds in a private 1134 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 1135 * for more information. 1136 * </pre> 1137 * 1138 * Protobuf type {@code google.devtools.cloudbuild.v1.BuildOptions.PoolOption} 1139 */ 1140 public static final class PoolOption extends com.google.protobuf.GeneratedMessageV3 1141 implements 1142 // @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.BuildOptions.PoolOption) 1143 PoolOptionOrBuilder { 1144 private static final long serialVersionUID = 0L; 1145 // Use PoolOption.newBuilder() to construct. PoolOption(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)1146 private PoolOption(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 1147 super(builder); 1148 } 1149 PoolOption()1150 private PoolOption() { 1151 name_ = ""; 1152 } 1153 1154 @java.lang.Override 1155 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)1156 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 1157 return new PoolOption(); 1158 } 1159 1160 @java.lang.Override getUnknownFields()1161 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 1162 return this.unknownFields; 1163 } 1164 getDescriptor()1165 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1166 return com.google.cloudbuild.v1.Cloudbuild 1167 .internal_static_google_devtools_cloudbuild_v1_BuildOptions_PoolOption_descriptor; 1168 } 1169 1170 @java.lang.Override 1171 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1172 internalGetFieldAccessorTable() { 1173 return com.google.cloudbuild.v1.Cloudbuild 1174 .internal_static_google_devtools_cloudbuild_v1_BuildOptions_PoolOption_fieldAccessorTable 1175 .ensureFieldAccessorsInitialized( 1176 com.google.cloudbuild.v1.BuildOptions.PoolOption.class, 1177 com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder.class); 1178 } 1179 1180 public static final int NAME_FIELD_NUMBER = 1; 1181 1182 @SuppressWarnings("serial") 1183 private volatile java.lang.Object name_ = ""; 1184 /** 1185 * 1186 * 1187 * <pre> 1188 * The `WorkerPool` resource to execute the build on. 1189 * You must have `cloudbuild.workerpools.use` on the project hosting the 1190 * WorkerPool. 1191 * Format projects/{project}/locations/{location}/workerPools/{workerPoolId} 1192 * </pre> 1193 * 1194 * <code>string name = 1 [(.google.api.resource_reference) = { ... }</code> 1195 * 1196 * @return The name. 1197 */ 1198 @java.lang.Override getName()1199 public java.lang.String getName() { 1200 java.lang.Object ref = name_; 1201 if (ref instanceof java.lang.String) { 1202 return (java.lang.String) ref; 1203 } else { 1204 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1205 java.lang.String s = bs.toStringUtf8(); 1206 name_ = s; 1207 return s; 1208 } 1209 } 1210 /** 1211 * 1212 * 1213 * <pre> 1214 * The `WorkerPool` resource to execute the build on. 1215 * You must have `cloudbuild.workerpools.use` on the project hosting the 1216 * WorkerPool. 1217 * Format projects/{project}/locations/{location}/workerPools/{workerPoolId} 1218 * </pre> 1219 * 1220 * <code>string name = 1 [(.google.api.resource_reference) = { ... }</code> 1221 * 1222 * @return The bytes for name. 1223 */ 1224 @java.lang.Override getNameBytes()1225 public com.google.protobuf.ByteString getNameBytes() { 1226 java.lang.Object ref = name_; 1227 if (ref instanceof java.lang.String) { 1228 com.google.protobuf.ByteString b = 1229 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1230 name_ = b; 1231 return b; 1232 } else { 1233 return (com.google.protobuf.ByteString) ref; 1234 } 1235 } 1236 1237 private byte memoizedIsInitialized = -1; 1238 1239 @java.lang.Override isInitialized()1240 public final boolean isInitialized() { 1241 byte isInitialized = memoizedIsInitialized; 1242 if (isInitialized == 1) return true; 1243 if (isInitialized == 0) return false; 1244 1245 memoizedIsInitialized = 1; 1246 return true; 1247 } 1248 1249 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1250 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1251 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 1252 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 1253 } 1254 getUnknownFields().writeTo(output); 1255 } 1256 1257 @java.lang.Override getSerializedSize()1258 public int getSerializedSize() { 1259 int size = memoizedSize; 1260 if (size != -1) return size; 1261 1262 size = 0; 1263 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 1264 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 1265 } 1266 size += getUnknownFields().getSerializedSize(); 1267 memoizedSize = size; 1268 return size; 1269 } 1270 1271 @java.lang.Override equals(final java.lang.Object obj)1272 public boolean equals(final java.lang.Object obj) { 1273 if (obj == this) { 1274 return true; 1275 } 1276 if (!(obj instanceof com.google.cloudbuild.v1.BuildOptions.PoolOption)) { 1277 return super.equals(obj); 1278 } 1279 com.google.cloudbuild.v1.BuildOptions.PoolOption other = 1280 (com.google.cloudbuild.v1.BuildOptions.PoolOption) obj; 1281 1282 if (!getName().equals(other.getName())) return false; 1283 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1284 return true; 1285 } 1286 1287 @java.lang.Override hashCode()1288 public int hashCode() { 1289 if (memoizedHashCode != 0) { 1290 return memoizedHashCode; 1291 } 1292 int hash = 41; 1293 hash = (19 * hash) + getDescriptor().hashCode(); 1294 hash = (37 * hash) + NAME_FIELD_NUMBER; 1295 hash = (53 * hash) + getName().hashCode(); 1296 hash = (29 * hash) + getUnknownFields().hashCode(); 1297 memoizedHashCode = hash; 1298 return hash; 1299 } 1300 parseFrom( java.nio.ByteBuffer data)1301 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom( 1302 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 1303 return PARSER.parseFrom(data); 1304 } 1305 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1306 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom( 1307 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1308 throws com.google.protobuf.InvalidProtocolBufferException { 1309 return PARSER.parseFrom(data, extensionRegistry); 1310 } 1311 parseFrom( com.google.protobuf.ByteString data)1312 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom( 1313 com.google.protobuf.ByteString data) 1314 throws com.google.protobuf.InvalidProtocolBufferException { 1315 return PARSER.parseFrom(data); 1316 } 1317 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1318 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom( 1319 com.google.protobuf.ByteString data, 1320 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1321 throws com.google.protobuf.InvalidProtocolBufferException { 1322 return PARSER.parseFrom(data, extensionRegistry); 1323 } 1324 parseFrom(byte[] data)1325 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(byte[] data) 1326 throws com.google.protobuf.InvalidProtocolBufferException { 1327 return PARSER.parseFrom(data); 1328 } 1329 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1330 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom( 1331 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1332 throws com.google.protobuf.InvalidProtocolBufferException { 1333 return PARSER.parseFrom(data, extensionRegistry); 1334 } 1335 parseFrom( java.io.InputStream input)1336 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom( 1337 java.io.InputStream input) throws java.io.IOException { 1338 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1339 } 1340 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1341 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom( 1342 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1343 throws java.io.IOException { 1344 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1345 PARSER, input, extensionRegistry); 1346 } 1347 parseDelimitedFrom( java.io.InputStream input)1348 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseDelimitedFrom( 1349 java.io.InputStream input) throws java.io.IOException { 1350 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1351 } 1352 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1353 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseDelimitedFrom( 1354 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1355 throws java.io.IOException { 1356 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1357 PARSER, input, extensionRegistry); 1358 } 1359 parseFrom( com.google.protobuf.CodedInputStream input)1360 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom( 1361 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1362 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1363 } 1364 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1365 public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom( 1366 com.google.protobuf.CodedInputStream input, 1367 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1368 throws java.io.IOException { 1369 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1370 PARSER, input, extensionRegistry); 1371 } 1372 1373 @java.lang.Override newBuilderForType()1374 public Builder newBuilderForType() { 1375 return newBuilder(); 1376 } 1377 newBuilder()1378 public static Builder newBuilder() { 1379 return DEFAULT_INSTANCE.toBuilder(); 1380 } 1381 newBuilder(com.google.cloudbuild.v1.BuildOptions.PoolOption prototype)1382 public static Builder newBuilder(com.google.cloudbuild.v1.BuildOptions.PoolOption prototype) { 1383 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1384 } 1385 1386 @java.lang.Override toBuilder()1387 public Builder toBuilder() { 1388 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1389 } 1390 1391 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1392 protected Builder newBuilderForType( 1393 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1394 Builder builder = new Builder(parent); 1395 return builder; 1396 } 1397 /** 1398 * 1399 * 1400 * <pre> 1401 * Details about how a build should be executed on a `WorkerPool`. 1402 * See [running builds in a private 1403 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 1404 * for more information. 1405 * </pre> 1406 * 1407 * Protobuf type {@code google.devtools.cloudbuild.v1.BuildOptions.PoolOption} 1408 */ 1409 public static final class Builder 1410 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1411 implements 1412 // @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.BuildOptions.PoolOption) 1413 com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder { getDescriptor()1414 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1415 return com.google.cloudbuild.v1.Cloudbuild 1416 .internal_static_google_devtools_cloudbuild_v1_BuildOptions_PoolOption_descriptor; 1417 } 1418 1419 @java.lang.Override 1420 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1421 internalGetFieldAccessorTable() { 1422 return com.google.cloudbuild.v1.Cloudbuild 1423 .internal_static_google_devtools_cloudbuild_v1_BuildOptions_PoolOption_fieldAccessorTable 1424 .ensureFieldAccessorsInitialized( 1425 com.google.cloudbuild.v1.BuildOptions.PoolOption.class, 1426 com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder.class); 1427 } 1428 1429 // Construct using com.google.cloudbuild.v1.BuildOptions.PoolOption.newBuilder() Builder()1430 private Builder() {} 1431 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1432 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1433 super(parent); 1434 } 1435 1436 @java.lang.Override clear()1437 public Builder clear() { 1438 super.clear(); 1439 bitField0_ = 0; 1440 name_ = ""; 1441 return this; 1442 } 1443 1444 @java.lang.Override getDescriptorForType()1445 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1446 return com.google.cloudbuild.v1.Cloudbuild 1447 .internal_static_google_devtools_cloudbuild_v1_BuildOptions_PoolOption_descriptor; 1448 } 1449 1450 @java.lang.Override getDefaultInstanceForType()1451 public com.google.cloudbuild.v1.BuildOptions.PoolOption getDefaultInstanceForType() { 1452 return com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance(); 1453 } 1454 1455 @java.lang.Override build()1456 public com.google.cloudbuild.v1.BuildOptions.PoolOption build() { 1457 com.google.cloudbuild.v1.BuildOptions.PoolOption result = buildPartial(); 1458 if (!result.isInitialized()) { 1459 throw newUninitializedMessageException(result); 1460 } 1461 return result; 1462 } 1463 1464 @java.lang.Override buildPartial()1465 public com.google.cloudbuild.v1.BuildOptions.PoolOption buildPartial() { 1466 com.google.cloudbuild.v1.BuildOptions.PoolOption result = 1467 new com.google.cloudbuild.v1.BuildOptions.PoolOption(this); 1468 if (bitField0_ != 0) { 1469 buildPartial0(result); 1470 } 1471 onBuilt(); 1472 return result; 1473 } 1474 buildPartial0(com.google.cloudbuild.v1.BuildOptions.PoolOption result)1475 private void buildPartial0(com.google.cloudbuild.v1.BuildOptions.PoolOption result) { 1476 int from_bitField0_ = bitField0_; 1477 if (((from_bitField0_ & 0x00000001) != 0)) { 1478 result.name_ = name_; 1479 } 1480 } 1481 1482 @java.lang.Override clone()1483 public Builder clone() { 1484 return super.clone(); 1485 } 1486 1487 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1488 public Builder setField( 1489 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1490 return super.setField(field, value); 1491 } 1492 1493 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1494 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1495 return super.clearField(field); 1496 } 1497 1498 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1499 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1500 return super.clearOneof(oneof); 1501 } 1502 1503 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1504 public Builder setRepeatedField( 1505 com.google.protobuf.Descriptors.FieldDescriptor field, 1506 int index, 1507 java.lang.Object value) { 1508 return super.setRepeatedField(field, index, value); 1509 } 1510 1511 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1512 public Builder addRepeatedField( 1513 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1514 return super.addRepeatedField(field, value); 1515 } 1516 1517 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1518 public Builder mergeFrom(com.google.protobuf.Message other) { 1519 if (other instanceof com.google.cloudbuild.v1.BuildOptions.PoolOption) { 1520 return mergeFrom((com.google.cloudbuild.v1.BuildOptions.PoolOption) other); 1521 } else { 1522 super.mergeFrom(other); 1523 return this; 1524 } 1525 } 1526 mergeFrom(com.google.cloudbuild.v1.BuildOptions.PoolOption other)1527 public Builder mergeFrom(com.google.cloudbuild.v1.BuildOptions.PoolOption other) { 1528 if (other == com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance()) 1529 return this; 1530 if (!other.getName().isEmpty()) { 1531 name_ = other.name_; 1532 bitField0_ |= 0x00000001; 1533 onChanged(); 1534 } 1535 this.mergeUnknownFields(other.getUnknownFields()); 1536 onChanged(); 1537 return this; 1538 } 1539 1540 @java.lang.Override isInitialized()1541 public final boolean isInitialized() { 1542 return true; 1543 } 1544 1545 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1546 public Builder mergeFrom( 1547 com.google.protobuf.CodedInputStream input, 1548 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1549 throws java.io.IOException { 1550 if (extensionRegistry == null) { 1551 throw new java.lang.NullPointerException(); 1552 } 1553 try { 1554 boolean done = false; 1555 while (!done) { 1556 int tag = input.readTag(); 1557 switch (tag) { 1558 case 0: 1559 done = true; 1560 break; 1561 case 10: 1562 { 1563 name_ = input.readStringRequireUtf8(); 1564 bitField0_ |= 0x00000001; 1565 break; 1566 } // case 10 1567 default: 1568 { 1569 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1570 done = true; // was an endgroup tag 1571 } 1572 break; 1573 } // default: 1574 } // switch (tag) 1575 } // while (!done) 1576 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1577 throw e.unwrapIOException(); 1578 } finally { 1579 onChanged(); 1580 } // finally 1581 return this; 1582 } 1583 1584 private int bitField0_; 1585 1586 private java.lang.Object name_ = ""; 1587 /** 1588 * 1589 * 1590 * <pre> 1591 * The `WorkerPool` resource to execute the build on. 1592 * You must have `cloudbuild.workerpools.use` on the project hosting the 1593 * WorkerPool. 1594 * Format projects/{project}/locations/{location}/workerPools/{workerPoolId} 1595 * </pre> 1596 * 1597 * <code>string name = 1 [(.google.api.resource_reference) = { ... }</code> 1598 * 1599 * @return The name. 1600 */ getName()1601 public java.lang.String getName() { 1602 java.lang.Object ref = name_; 1603 if (!(ref instanceof java.lang.String)) { 1604 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1605 java.lang.String s = bs.toStringUtf8(); 1606 name_ = s; 1607 return s; 1608 } else { 1609 return (java.lang.String) ref; 1610 } 1611 } 1612 /** 1613 * 1614 * 1615 * <pre> 1616 * The `WorkerPool` resource to execute the build on. 1617 * You must have `cloudbuild.workerpools.use` on the project hosting the 1618 * WorkerPool. 1619 * Format projects/{project}/locations/{location}/workerPools/{workerPoolId} 1620 * </pre> 1621 * 1622 * <code>string name = 1 [(.google.api.resource_reference) = { ... }</code> 1623 * 1624 * @return The bytes for name. 1625 */ getNameBytes()1626 public com.google.protobuf.ByteString getNameBytes() { 1627 java.lang.Object ref = name_; 1628 if (ref instanceof String) { 1629 com.google.protobuf.ByteString b = 1630 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1631 name_ = b; 1632 return b; 1633 } else { 1634 return (com.google.protobuf.ByteString) ref; 1635 } 1636 } 1637 /** 1638 * 1639 * 1640 * <pre> 1641 * The `WorkerPool` resource to execute the build on. 1642 * You must have `cloudbuild.workerpools.use` on the project hosting the 1643 * WorkerPool. 1644 * Format projects/{project}/locations/{location}/workerPools/{workerPoolId} 1645 * </pre> 1646 * 1647 * <code>string name = 1 [(.google.api.resource_reference) = { ... }</code> 1648 * 1649 * @param value The name to set. 1650 * @return This builder for chaining. 1651 */ setName(java.lang.String value)1652 public Builder setName(java.lang.String value) { 1653 if (value == null) { 1654 throw new NullPointerException(); 1655 } 1656 name_ = value; 1657 bitField0_ |= 0x00000001; 1658 onChanged(); 1659 return this; 1660 } 1661 /** 1662 * 1663 * 1664 * <pre> 1665 * The `WorkerPool` resource to execute the build on. 1666 * You must have `cloudbuild.workerpools.use` on the project hosting the 1667 * WorkerPool. 1668 * Format projects/{project}/locations/{location}/workerPools/{workerPoolId} 1669 * </pre> 1670 * 1671 * <code>string name = 1 [(.google.api.resource_reference) = { ... }</code> 1672 * 1673 * @return This builder for chaining. 1674 */ clearName()1675 public Builder clearName() { 1676 name_ = getDefaultInstance().getName(); 1677 bitField0_ = (bitField0_ & ~0x00000001); 1678 onChanged(); 1679 return this; 1680 } 1681 /** 1682 * 1683 * 1684 * <pre> 1685 * The `WorkerPool` resource to execute the build on. 1686 * You must have `cloudbuild.workerpools.use` on the project hosting the 1687 * WorkerPool. 1688 * Format projects/{project}/locations/{location}/workerPools/{workerPoolId} 1689 * </pre> 1690 * 1691 * <code>string name = 1 [(.google.api.resource_reference) = { ... }</code> 1692 * 1693 * @param value The bytes for name to set. 1694 * @return This builder for chaining. 1695 */ setNameBytes(com.google.protobuf.ByteString value)1696 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1697 if (value == null) { 1698 throw new NullPointerException(); 1699 } 1700 checkByteStringIsUtf8(value); 1701 name_ = value; 1702 bitField0_ |= 0x00000001; 1703 onChanged(); 1704 return this; 1705 } 1706 1707 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1708 public final Builder setUnknownFields( 1709 final com.google.protobuf.UnknownFieldSet unknownFields) { 1710 return super.setUnknownFields(unknownFields); 1711 } 1712 1713 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1714 public final Builder mergeUnknownFields( 1715 final com.google.protobuf.UnknownFieldSet unknownFields) { 1716 return super.mergeUnknownFields(unknownFields); 1717 } 1718 1719 // @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.BuildOptions.PoolOption) 1720 } 1721 1722 // @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuildOptions.PoolOption) 1723 private static final com.google.cloudbuild.v1.BuildOptions.PoolOption DEFAULT_INSTANCE; 1724 1725 static { 1726 DEFAULT_INSTANCE = new com.google.cloudbuild.v1.BuildOptions.PoolOption(); 1727 } 1728 getDefaultInstance()1729 public static com.google.cloudbuild.v1.BuildOptions.PoolOption getDefaultInstance() { 1730 return DEFAULT_INSTANCE; 1731 } 1732 1733 private static final com.google.protobuf.Parser<PoolOption> PARSER = 1734 new com.google.protobuf.AbstractParser<PoolOption>() { 1735 @java.lang.Override 1736 public PoolOption parsePartialFrom( 1737 com.google.protobuf.CodedInputStream input, 1738 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1739 throws com.google.protobuf.InvalidProtocolBufferException { 1740 Builder builder = newBuilder(); 1741 try { 1742 builder.mergeFrom(input, extensionRegistry); 1743 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1744 throw e.setUnfinishedMessage(builder.buildPartial()); 1745 } catch (com.google.protobuf.UninitializedMessageException e) { 1746 throw e.asInvalidProtocolBufferException() 1747 .setUnfinishedMessage(builder.buildPartial()); 1748 } catch (java.io.IOException e) { 1749 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1750 .setUnfinishedMessage(builder.buildPartial()); 1751 } 1752 return builder.buildPartial(); 1753 } 1754 }; 1755 parser()1756 public static com.google.protobuf.Parser<PoolOption> parser() { 1757 return PARSER; 1758 } 1759 1760 @java.lang.Override getParserForType()1761 public com.google.protobuf.Parser<PoolOption> getParserForType() { 1762 return PARSER; 1763 } 1764 1765 @java.lang.Override getDefaultInstanceForType()1766 public com.google.cloudbuild.v1.BuildOptions.PoolOption getDefaultInstanceForType() { 1767 return DEFAULT_INSTANCE; 1768 } 1769 } 1770 1771 public static final int SOURCE_PROVENANCE_HASH_FIELD_NUMBER = 1; 1772 1773 @SuppressWarnings("serial") 1774 private java.util.List<java.lang.Integer> sourceProvenanceHash_; 1775 1776 private static final com.google.protobuf.Internal.ListAdapter.Converter< 1777 java.lang.Integer, com.google.cloudbuild.v1.Hash.HashType> 1778 sourceProvenanceHash_converter_ = 1779 new com.google.protobuf.Internal.ListAdapter.Converter< 1780 java.lang.Integer, com.google.cloudbuild.v1.Hash.HashType>() { 1781 public com.google.cloudbuild.v1.Hash.HashType convert(java.lang.Integer from) { 1782 com.google.cloudbuild.v1.Hash.HashType result = 1783 com.google.cloudbuild.v1.Hash.HashType.forNumber(from); 1784 return result == null ? com.google.cloudbuild.v1.Hash.HashType.UNRECOGNIZED : result; 1785 } 1786 }; 1787 /** 1788 * 1789 * 1790 * <pre> 1791 * Requested hash for SourceProvenance. 1792 * </pre> 1793 * 1794 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;</code> 1795 * 1796 * @return A list containing the sourceProvenanceHash. 1797 */ 1798 @java.lang.Override getSourceProvenanceHashList()1799 public java.util.List<com.google.cloudbuild.v1.Hash.HashType> getSourceProvenanceHashList() { 1800 return new com.google.protobuf.Internal.ListAdapter< 1801 java.lang.Integer, com.google.cloudbuild.v1.Hash.HashType>( 1802 sourceProvenanceHash_, sourceProvenanceHash_converter_); 1803 } 1804 /** 1805 * 1806 * 1807 * <pre> 1808 * Requested hash for SourceProvenance. 1809 * </pre> 1810 * 1811 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;</code> 1812 * 1813 * @return The count of sourceProvenanceHash. 1814 */ 1815 @java.lang.Override getSourceProvenanceHashCount()1816 public int getSourceProvenanceHashCount() { 1817 return sourceProvenanceHash_.size(); 1818 } 1819 /** 1820 * 1821 * 1822 * <pre> 1823 * Requested hash for SourceProvenance. 1824 * </pre> 1825 * 1826 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;</code> 1827 * 1828 * @param index The index of the element to return. 1829 * @return The sourceProvenanceHash at the given index. 1830 */ 1831 @java.lang.Override getSourceProvenanceHash(int index)1832 public com.google.cloudbuild.v1.Hash.HashType getSourceProvenanceHash(int index) { 1833 return sourceProvenanceHash_converter_.convert(sourceProvenanceHash_.get(index)); 1834 } 1835 /** 1836 * 1837 * 1838 * <pre> 1839 * Requested hash for SourceProvenance. 1840 * </pre> 1841 * 1842 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;</code> 1843 * 1844 * @return A list containing the enum numeric values on the wire for sourceProvenanceHash. 1845 */ 1846 @java.lang.Override getSourceProvenanceHashValueList()1847 public java.util.List<java.lang.Integer> getSourceProvenanceHashValueList() { 1848 return sourceProvenanceHash_; 1849 } 1850 /** 1851 * 1852 * 1853 * <pre> 1854 * Requested hash for SourceProvenance. 1855 * </pre> 1856 * 1857 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;</code> 1858 * 1859 * @param index The index of the value to return. 1860 * @return The enum numeric value on the wire of sourceProvenanceHash at the given index. 1861 */ 1862 @java.lang.Override getSourceProvenanceHashValue(int index)1863 public int getSourceProvenanceHashValue(int index) { 1864 return sourceProvenanceHash_.get(index); 1865 } 1866 1867 private int sourceProvenanceHashMemoizedSerializedSize; 1868 1869 public static final int REQUESTED_VERIFY_OPTION_FIELD_NUMBER = 2; 1870 private int requestedVerifyOption_ = 0; 1871 /** 1872 * 1873 * 1874 * <pre> 1875 * Requested verifiability options. 1876 * </pre> 1877 * 1878 * <code>.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2; 1879 * </code> 1880 * 1881 * @return The enum numeric value on the wire for requestedVerifyOption. 1882 */ 1883 @java.lang.Override getRequestedVerifyOptionValue()1884 public int getRequestedVerifyOptionValue() { 1885 return requestedVerifyOption_; 1886 } 1887 /** 1888 * 1889 * 1890 * <pre> 1891 * Requested verifiability options. 1892 * </pre> 1893 * 1894 * <code>.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2; 1895 * </code> 1896 * 1897 * @return The requestedVerifyOption. 1898 */ 1899 @java.lang.Override getRequestedVerifyOption()1900 public com.google.cloudbuild.v1.BuildOptions.VerifyOption getRequestedVerifyOption() { 1901 com.google.cloudbuild.v1.BuildOptions.VerifyOption result = 1902 com.google.cloudbuild.v1.BuildOptions.VerifyOption.forNumber(requestedVerifyOption_); 1903 return result == null 1904 ? com.google.cloudbuild.v1.BuildOptions.VerifyOption.UNRECOGNIZED 1905 : result; 1906 } 1907 1908 public static final int MACHINE_TYPE_FIELD_NUMBER = 3; 1909 private int machineType_ = 0; 1910 /** 1911 * 1912 * 1913 * <pre> 1914 * Compute Engine machine type on which to run the build. 1915 * </pre> 1916 * 1917 * <code>.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;</code> 1918 * 1919 * @return The enum numeric value on the wire for machineType. 1920 */ 1921 @java.lang.Override getMachineTypeValue()1922 public int getMachineTypeValue() { 1923 return machineType_; 1924 } 1925 /** 1926 * 1927 * 1928 * <pre> 1929 * Compute Engine machine type on which to run the build. 1930 * </pre> 1931 * 1932 * <code>.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;</code> 1933 * 1934 * @return The machineType. 1935 */ 1936 @java.lang.Override getMachineType()1937 public com.google.cloudbuild.v1.BuildOptions.MachineType getMachineType() { 1938 com.google.cloudbuild.v1.BuildOptions.MachineType result = 1939 com.google.cloudbuild.v1.BuildOptions.MachineType.forNumber(machineType_); 1940 return result == null ? com.google.cloudbuild.v1.BuildOptions.MachineType.UNRECOGNIZED : result; 1941 } 1942 1943 public static final int DISK_SIZE_GB_FIELD_NUMBER = 6; 1944 private long diskSizeGb_ = 0L; 1945 /** 1946 * 1947 * 1948 * <pre> 1949 * Requested disk size for the VM that runs the build. Note that this is *NOT* 1950 * "disk free"; some of the space will be used by the operating system and 1951 * build utilities. Also note that this is the minimum disk size that will be 1952 * allocated for the build -- the build may run with a larger disk than 1953 * requested. At present, the maximum disk size is 2000GB; builds that request 1954 * more than the maximum are rejected with an error. 1955 * </pre> 1956 * 1957 * <code>int64 disk_size_gb = 6;</code> 1958 * 1959 * @return The diskSizeGb. 1960 */ 1961 @java.lang.Override getDiskSizeGb()1962 public long getDiskSizeGb() { 1963 return diskSizeGb_; 1964 } 1965 1966 public static final int SUBSTITUTION_OPTION_FIELD_NUMBER = 4; 1967 private int substitutionOption_ = 0; 1968 /** 1969 * 1970 * 1971 * <pre> 1972 * Option to specify behavior when there is an error in the substitution 1973 * checks. 1974 * NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot 1975 * be overridden in the build configuration file. 1976 * </pre> 1977 * 1978 * <code>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4; 1979 * </code> 1980 * 1981 * @return The enum numeric value on the wire for substitutionOption. 1982 */ 1983 @java.lang.Override getSubstitutionOptionValue()1984 public int getSubstitutionOptionValue() { 1985 return substitutionOption_; 1986 } 1987 /** 1988 * 1989 * 1990 * <pre> 1991 * Option to specify behavior when there is an error in the substitution 1992 * checks. 1993 * NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot 1994 * be overridden in the build configuration file. 1995 * </pre> 1996 * 1997 * <code>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4; 1998 * </code> 1999 * 2000 * @return The substitutionOption. 2001 */ 2002 @java.lang.Override getSubstitutionOption()2003 public com.google.cloudbuild.v1.BuildOptions.SubstitutionOption getSubstitutionOption() { 2004 com.google.cloudbuild.v1.BuildOptions.SubstitutionOption result = 2005 com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.forNumber(substitutionOption_); 2006 return result == null 2007 ? com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.UNRECOGNIZED 2008 : result; 2009 } 2010 2011 public static final int DYNAMIC_SUBSTITUTIONS_FIELD_NUMBER = 17; 2012 private boolean dynamicSubstitutions_ = false; 2013 /** 2014 * 2015 * 2016 * <pre> 2017 * Option to specify whether or not to apply bash style string 2018 * operations to the substitutions. 2019 * NOTE: this is always enabled for triggered builds and cannot be 2020 * overridden in the build configuration file. 2021 * </pre> 2022 * 2023 * <code>bool dynamic_substitutions = 17;</code> 2024 * 2025 * @return The dynamicSubstitutions. 2026 */ 2027 @java.lang.Override getDynamicSubstitutions()2028 public boolean getDynamicSubstitutions() { 2029 return dynamicSubstitutions_; 2030 } 2031 2032 public static final int LOG_STREAMING_OPTION_FIELD_NUMBER = 5; 2033 private int logStreamingOption_ = 0; 2034 /** 2035 * 2036 * 2037 * <pre> 2038 * Option to define build log streaming behavior to Google Cloud 2039 * Storage. 2040 * </pre> 2041 * 2042 * <code>.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5; 2043 * </code> 2044 * 2045 * @return The enum numeric value on the wire for logStreamingOption. 2046 */ 2047 @java.lang.Override getLogStreamingOptionValue()2048 public int getLogStreamingOptionValue() { 2049 return logStreamingOption_; 2050 } 2051 /** 2052 * 2053 * 2054 * <pre> 2055 * Option to define build log streaming behavior to Google Cloud 2056 * Storage. 2057 * </pre> 2058 * 2059 * <code>.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5; 2060 * </code> 2061 * 2062 * @return The logStreamingOption. 2063 */ 2064 @java.lang.Override getLogStreamingOption()2065 public com.google.cloudbuild.v1.BuildOptions.LogStreamingOption getLogStreamingOption() { 2066 com.google.cloudbuild.v1.BuildOptions.LogStreamingOption result = 2067 com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.forNumber(logStreamingOption_); 2068 return result == null 2069 ? com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.UNRECOGNIZED 2070 : result; 2071 } 2072 2073 public static final int WORKER_POOL_FIELD_NUMBER = 7; 2074 2075 @SuppressWarnings("serial") 2076 private volatile java.lang.Object workerPool_ = ""; 2077 /** 2078 * 2079 * 2080 * <pre> 2081 * This field deprecated; please use `pool.name` instead. 2082 * </pre> 2083 * 2084 * <code>string worker_pool = 7 [deprecated = true];</code> 2085 * 2086 * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See 2087 * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1969 2088 * @return The workerPool. 2089 */ 2090 @java.lang.Override 2091 @java.lang.Deprecated getWorkerPool()2092 public java.lang.String getWorkerPool() { 2093 java.lang.Object ref = workerPool_; 2094 if (ref instanceof java.lang.String) { 2095 return (java.lang.String) ref; 2096 } else { 2097 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2098 java.lang.String s = bs.toStringUtf8(); 2099 workerPool_ = s; 2100 return s; 2101 } 2102 } 2103 /** 2104 * 2105 * 2106 * <pre> 2107 * This field deprecated; please use `pool.name` instead. 2108 * </pre> 2109 * 2110 * <code>string worker_pool = 7 [deprecated = true];</code> 2111 * 2112 * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See 2113 * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1969 2114 * @return The bytes for workerPool. 2115 */ 2116 @java.lang.Override 2117 @java.lang.Deprecated getWorkerPoolBytes()2118 public com.google.protobuf.ByteString getWorkerPoolBytes() { 2119 java.lang.Object ref = workerPool_; 2120 if (ref instanceof java.lang.String) { 2121 com.google.protobuf.ByteString b = 2122 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2123 workerPool_ = b; 2124 return b; 2125 } else { 2126 return (com.google.protobuf.ByteString) ref; 2127 } 2128 } 2129 2130 public static final int POOL_FIELD_NUMBER = 19; 2131 private com.google.cloudbuild.v1.BuildOptions.PoolOption pool_; 2132 /** 2133 * 2134 * 2135 * <pre> 2136 * Optional. Specification for execution on a `WorkerPool`. 2137 * See [running builds in a private 2138 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 2139 * for more information. 2140 * </pre> 2141 * 2142 * <code> 2143 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 2144 * </code> 2145 * 2146 * @return Whether the pool field is set. 2147 */ 2148 @java.lang.Override hasPool()2149 public boolean hasPool() { 2150 return pool_ != null; 2151 } 2152 /** 2153 * 2154 * 2155 * <pre> 2156 * Optional. Specification for execution on a `WorkerPool`. 2157 * See [running builds in a private 2158 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 2159 * for more information. 2160 * </pre> 2161 * 2162 * <code> 2163 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 2164 * </code> 2165 * 2166 * @return The pool. 2167 */ 2168 @java.lang.Override getPool()2169 public com.google.cloudbuild.v1.BuildOptions.PoolOption getPool() { 2170 return pool_ == null 2171 ? com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance() 2172 : pool_; 2173 } 2174 /** 2175 * 2176 * 2177 * <pre> 2178 * Optional. Specification for execution on a `WorkerPool`. 2179 * See [running builds in a private 2180 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 2181 * for more information. 2182 * </pre> 2183 * 2184 * <code> 2185 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 2186 * </code> 2187 */ 2188 @java.lang.Override getPoolOrBuilder()2189 public com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder getPoolOrBuilder() { 2190 return pool_ == null 2191 ? com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance() 2192 : pool_; 2193 } 2194 2195 public static final int LOGGING_FIELD_NUMBER = 11; 2196 private int logging_ = 0; 2197 /** 2198 * 2199 * 2200 * <pre> 2201 * Option to specify the logging mode, which determines if and where build 2202 * logs are stored. 2203 * </pre> 2204 * 2205 * <code>.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;</code> 2206 * 2207 * @return The enum numeric value on the wire for logging. 2208 */ 2209 @java.lang.Override getLoggingValue()2210 public int getLoggingValue() { 2211 return logging_; 2212 } 2213 /** 2214 * 2215 * 2216 * <pre> 2217 * Option to specify the logging mode, which determines if and where build 2218 * logs are stored. 2219 * </pre> 2220 * 2221 * <code>.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;</code> 2222 * 2223 * @return The logging. 2224 */ 2225 @java.lang.Override getLogging()2226 public com.google.cloudbuild.v1.BuildOptions.LoggingMode getLogging() { 2227 com.google.cloudbuild.v1.BuildOptions.LoggingMode result = 2228 com.google.cloudbuild.v1.BuildOptions.LoggingMode.forNumber(logging_); 2229 return result == null ? com.google.cloudbuild.v1.BuildOptions.LoggingMode.UNRECOGNIZED : result; 2230 } 2231 2232 public static final int ENV_FIELD_NUMBER = 12; 2233 2234 @SuppressWarnings("serial") 2235 private com.google.protobuf.LazyStringList env_; 2236 /** 2237 * 2238 * 2239 * <pre> 2240 * A list of global environment variable definitions that will exist for all 2241 * build steps in this build. If a variable is defined in both globally and in 2242 * a build step, the variable will use the build step value. 2243 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 2244 * being given the value "VALUE". 2245 * </pre> 2246 * 2247 * <code>repeated string env = 12;</code> 2248 * 2249 * @return A list containing the env. 2250 */ getEnvList()2251 public com.google.protobuf.ProtocolStringList getEnvList() { 2252 return env_; 2253 } 2254 /** 2255 * 2256 * 2257 * <pre> 2258 * A list of global environment variable definitions that will exist for all 2259 * build steps in this build. If a variable is defined in both globally and in 2260 * a build step, the variable will use the build step value. 2261 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 2262 * being given the value "VALUE". 2263 * </pre> 2264 * 2265 * <code>repeated string env = 12;</code> 2266 * 2267 * @return The count of env. 2268 */ getEnvCount()2269 public int getEnvCount() { 2270 return env_.size(); 2271 } 2272 /** 2273 * 2274 * 2275 * <pre> 2276 * A list of global environment variable definitions that will exist for all 2277 * build steps in this build. If a variable is defined in both globally and in 2278 * a build step, the variable will use the build step value. 2279 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 2280 * being given the value "VALUE". 2281 * </pre> 2282 * 2283 * <code>repeated string env = 12;</code> 2284 * 2285 * @param index The index of the element to return. 2286 * @return The env at the given index. 2287 */ getEnv(int index)2288 public java.lang.String getEnv(int index) { 2289 return env_.get(index); 2290 } 2291 /** 2292 * 2293 * 2294 * <pre> 2295 * A list of global environment variable definitions that will exist for all 2296 * build steps in this build. If a variable is defined in both globally and in 2297 * a build step, the variable will use the build step value. 2298 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 2299 * being given the value "VALUE". 2300 * </pre> 2301 * 2302 * <code>repeated string env = 12;</code> 2303 * 2304 * @param index The index of the value to return. 2305 * @return The bytes of the env at the given index. 2306 */ getEnvBytes(int index)2307 public com.google.protobuf.ByteString getEnvBytes(int index) { 2308 return env_.getByteString(index); 2309 } 2310 2311 public static final int SECRET_ENV_FIELD_NUMBER = 13; 2312 2313 @SuppressWarnings("serial") 2314 private com.google.protobuf.LazyStringList secretEnv_; 2315 /** 2316 * 2317 * 2318 * <pre> 2319 * A list of global environment variables, which are encrypted using a Cloud 2320 * Key Management Service crypto key. These values must be specified in the 2321 * build's `Secret`. These variables will be available to all build steps 2322 * in this build. 2323 * </pre> 2324 * 2325 * <code>repeated string secret_env = 13;</code> 2326 * 2327 * @return A list containing the secretEnv. 2328 */ getSecretEnvList()2329 public com.google.protobuf.ProtocolStringList getSecretEnvList() { 2330 return secretEnv_; 2331 } 2332 /** 2333 * 2334 * 2335 * <pre> 2336 * A list of global environment variables, which are encrypted using a Cloud 2337 * Key Management Service crypto key. These values must be specified in the 2338 * build's `Secret`. These variables will be available to all build steps 2339 * in this build. 2340 * </pre> 2341 * 2342 * <code>repeated string secret_env = 13;</code> 2343 * 2344 * @return The count of secretEnv. 2345 */ getSecretEnvCount()2346 public int getSecretEnvCount() { 2347 return secretEnv_.size(); 2348 } 2349 /** 2350 * 2351 * 2352 * <pre> 2353 * A list of global environment variables, which are encrypted using a Cloud 2354 * Key Management Service crypto key. These values must be specified in the 2355 * build's `Secret`. These variables will be available to all build steps 2356 * in this build. 2357 * </pre> 2358 * 2359 * <code>repeated string secret_env = 13;</code> 2360 * 2361 * @param index The index of the element to return. 2362 * @return The secretEnv at the given index. 2363 */ getSecretEnv(int index)2364 public java.lang.String getSecretEnv(int index) { 2365 return secretEnv_.get(index); 2366 } 2367 /** 2368 * 2369 * 2370 * <pre> 2371 * A list of global environment variables, which are encrypted using a Cloud 2372 * Key Management Service crypto key. These values must be specified in the 2373 * build's `Secret`. These variables will be available to all build steps 2374 * in this build. 2375 * </pre> 2376 * 2377 * <code>repeated string secret_env = 13;</code> 2378 * 2379 * @param index The index of the value to return. 2380 * @return The bytes of the secretEnv at the given index. 2381 */ getSecretEnvBytes(int index)2382 public com.google.protobuf.ByteString getSecretEnvBytes(int index) { 2383 return secretEnv_.getByteString(index); 2384 } 2385 2386 public static final int VOLUMES_FIELD_NUMBER = 14; 2387 2388 @SuppressWarnings("serial") 2389 private java.util.List<com.google.cloudbuild.v1.Volume> volumes_; 2390 /** 2391 * 2392 * 2393 * <pre> 2394 * Global list of volumes to mount for ALL build steps 2395 * Each volume is created as an empty volume prior to starting the build 2396 * process. Upon completion of the build, volumes and their contents are 2397 * discarded. Global volume names and paths cannot conflict with the volumes 2398 * defined a build step. 2399 * Using a global volume in a build with only one step is not valid as 2400 * it is indicative of a build request with an incorrect configuration. 2401 * </pre> 2402 * 2403 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 2404 */ 2405 @java.lang.Override getVolumesList()2406 public java.util.List<com.google.cloudbuild.v1.Volume> getVolumesList() { 2407 return volumes_; 2408 } 2409 /** 2410 * 2411 * 2412 * <pre> 2413 * Global list of volumes to mount for ALL build steps 2414 * Each volume is created as an empty volume prior to starting the build 2415 * process. Upon completion of the build, volumes and their contents are 2416 * discarded. Global volume names and paths cannot conflict with the volumes 2417 * defined a build step. 2418 * Using a global volume in a build with only one step is not valid as 2419 * it is indicative of a build request with an incorrect configuration. 2420 * </pre> 2421 * 2422 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 2423 */ 2424 @java.lang.Override 2425 public java.util.List<? extends com.google.cloudbuild.v1.VolumeOrBuilder> getVolumesOrBuilderList()2426 getVolumesOrBuilderList() { 2427 return volumes_; 2428 } 2429 /** 2430 * 2431 * 2432 * <pre> 2433 * Global list of volumes to mount for ALL build steps 2434 * Each volume is created as an empty volume prior to starting the build 2435 * process. Upon completion of the build, volumes and their contents are 2436 * discarded. Global volume names and paths cannot conflict with the volumes 2437 * defined a build step. 2438 * Using a global volume in a build with only one step is not valid as 2439 * it is indicative of a build request with an incorrect configuration. 2440 * </pre> 2441 * 2442 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 2443 */ 2444 @java.lang.Override getVolumesCount()2445 public int getVolumesCount() { 2446 return volumes_.size(); 2447 } 2448 /** 2449 * 2450 * 2451 * <pre> 2452 * Global list of volumes to mount for ALL build steps 2453 * Each volume is created as an empty volume prior to starting the build 2454 * process. Upon completion of the build, volumes and their contents are 2455 * discarded. Global volume names and paths cannot conflict with the volumes 2456 * defined a build step. 2457 * Using a global volume in a build with only one step is not valid as 2458 * it is indicative of a build request with an incorrect configuration. 2459 * </pre> 2460 * 2461 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 2462 */ 2463 @java.lang.Override getVolumes(int index)2464 public com.google.cloudbuild.v1.Volume getVolumes(int index) { 2465 return volumes_.get(index); 2466 } 2467 /** 2468 * 2469 * 2470 * <pre> 2471 * Global list of volumes to mount for ALL build steps 2472 * Each volume is created as an empty volume prior to starting the build 2473 * process. Upon completion of the build, volumes and their contents are 2474 * discarded. Global volume names and paths cannot conflict with the volumes 2475 * defined a build step. 2476 * Using a global volume in a build with only one step is not valid as 2477 * it is indicative of a build request with an incorrect configuration. 2478 * </pre> 2479 * 2480 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 2481 */ 2482 @java.lang.Override getVolumesOrBuilder(int index)2483 public com.google.cloudbuild.v1.VolumeOrBuilder getVolumesOrBuilder(int index) { 2484 return volumes_.get(index); 2485 } 2486 2487 public static final int DEFAULT_LOGS_BUCKET_BEHAVIOR_FIELD_NUMBER = 21; 2488 private int defaultLogsBucketBehavior_ = 0; 2489 /** 2490 * 2491 * 2492 * <pre> 2493 * Optional. Option to specify how default logs buckets are setup. 2494 * </pre> 2495 * 2496 * <code> 2497 * .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL]; 2498 * </code> 2499 * 2500 * @return The enum numeric value on the wire for defaultLogsBucketBehavior. 2501 */ 2502 @java.lang.Override getDefaultLogsBucketBehaviorValue()2503 public int getDefaultLogsBucketBehaviorValue() { 2504 return defaultLogsBucketBehavior_; 2505 } 2506 /** 2507 * 2508 * 2509 * <pre> 2510 * Optional. Option to specify how default logs buckets are setup. 2511 * </pre> 2512 * 2513 * <code> 2514 * .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL]; 2515 * </code> 2516 * 2517 * @return The defaultLogsBucketBehavior. 2518 */ 2519 @java.lang.Override 2520 public com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior getDefaultLogsBucketBehavior()2521 getDefaultLogsBucketBehavior() { 2522 com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior result = 2523 com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior.forNumber( 2524 defaultLogsBucketBehavior_); 2525 return result == null 2526 ? com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior.UNRECOGNIZED 2527 : result; 2528 } 2529 2530 private byte memoizedIsInitialized = -1; 2531 2532 @java.lang.Override isInitialized()2533 public final boolean isInitialized() { 2534 byte isInitialized = memoizedIsInitialized; 2535 if (isInitialized == 1) return true; 2536 if (isInitialized == 0) return false; 2537 2538 memoizedIsInitialized = 1; 2539 return true; 2540 } 2541 2542 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)2543 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 2544 getSerializedSize(); 2545 if (getSourceProvenanceHashList().size() > 0) { 2546 output.writeUInt32NoTag(10); 2547 output.writeUInt32NoTag(sourceProvenanceHashMemoizedSerializedSize); 2548 } 2549 for (int i = 0; i < sourceProvenanceHash_.size(); i++) { 2550 output.writeEnumNoTag(sourceProvenanceHash_.get(i)); 2551 } 2552 if (requestedVerifyOption_ 2553 != com.google.cloudbuild.v1.BuildOptions.VerifyOption.NOT_VERIFIED.getNumber()) { 2554 output.writeEnum(2, requestedVerifyOption_); 2555 } 2556 if (machineType_ != com.google.cloudbuild.v1.BuildOptions.MachineType.UNSPECIFIED.getNumber()) { 2557 output.writeEnum(3, machineType_); 2558 } 2559 if (substitutionOption_ 2560 != com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.MUST_MATCH.getNumber()) { 2561 output.writeEnum(4, substitutionOption_); 2562 } 2563 if (logStreamingOption_ 2564 != com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.STREAM_DEFAULT.getNumber()) { 2565 output.writeEnum(5, logStreamingOption_); 2566 } 2567 if (diskSizeGb_ != 0L) { 2568 output.writeInt64(6, diskSizeGb_); 2569 } 2570 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerPool_)) { 2571 com.google.protobuf.GeneratedMessageV3.writeString(output, 7, workerPool_); 2572 } 2573 if (logging_ 2574 != com.google.cloudbuild.v1.BuildOptions.LoggingMode.LOGGING_UNSPECIFIED.getNumber()) { 2575 output.writeEnum(11, logging_); 2576 } 2577 for (int i = 0; i < env_.size(); i++) { 2578 com.google.protobuf.GeneratedMessageV3.writeString(output, 12, env_.getRaw(i)); 2579 } 2580 for (int i = 0; i < secretEnv_.size(); i++) { 2581 com.google.protobuf.GeneratedMessageV3.writeString(output, 13, secretEnv_.getRaw(i)); 2582 } 2583 for (int i = 0; i < volumes_.size(); i++) { 2584 output.writeMessage(14, volumes_.get(i)); 2585 } 2586 if (dynamicSubstitutions_ != false) { 2587 output.writeBool(17, dynamicSubstitutions_); 2588 } 2589 if (pool_ != null) { 2590 output.writeMessage(19, getPool()); 2591 } 2592 if (defaultLogsBucketBehavior_ 2593 != com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior 2594 .DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED 2595 .getNumber()) { 2596 output.writeEnum(21, defaultLogsBucketBehavior_); 2597 } 2598 getUnknownFields().writeTo(output); 2599 } 2600 2601 @java.lang.Override getSerializedSize()2602 public int getSerializedSize() { 2603 int size = memoizedSize; 2604 if (size != -1) return size; 2605 2606 size = 0; 2607 { 2608 int dataSize = 0; 2609 for (int i = 0; i < sourceProvenanceHash_.size(); i++) { 2610 dataSize += 2611 com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( 2612 sourceProvenanceHash_.get(i)); 2613 } 2614 size += dataSize; 2615 if (!getSourceProvenanceHashList().isEmpty()) { 2616 size += 1; 2617 size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); 2618 } 2619 sourceProvenanceHashMemoizedSerializedSize = dataSize; 2620 } 2621 if (requestedVerifyOption_ 2622 != com.google.cloudbuild.v1.BuildOptions.VerifyOption.NOT_VERIFIED.getNumber()) { 2623 size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, requestedVerifyOption_); 2624 } 2625 if (machineType_ != com.google.cloudbuild.v1.BuildOptions.MachineType.UNSPECIFIED.getNumber()) { 2626 size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, machineType_); 2627 } 2628 if (substitutionOption_ 2629 != com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.MUST_MATCH.getNumber()) { 2630 size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, substitutionOption_); 2631 } 2632 if (logStreamingOption_ 2633 != com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.STREAM_DEFAULT.getNumber()) { 2634 size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, logStreamingOption_); 2635 } 2636 if (diskSizeGb_ != 0L) { 2637 size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, diskSizeGb_); 2638 } 2639 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerPool_)) { 2640 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, workerPool_); 2641 } 2642 if (logging_ 2643 != com.google.cloudbuild.v1.BuildOptions.LoggingMode.LOGGING_UNSPECIFIED.getNumber()) { 2644 size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, logging_); 2645 } 2646 { 2647 int dataSize = 0; 2648 for (int i = 0; i < env_.size(); i++) { 2649 dataSize += computeStringSizeNoTag(env_.getRaw(i)); 2650 } 2651 size += dataSize; 2652 size += 1 * getEnvList().size(); 2653 } 2654 { 2655 int dataSize = 0; 2656 for (int i = 0; i < secretEnv_.size(); i++) { 2657 dataSize += computeStringSizeNoTag(secretEnv_.getRaw(i)); 2658 } 2659 size += dataSize; 2660 size += 1 * getSecretEnvList().size(); 2661 } 2662 for (int i = 0; i < volumes_.size(); i++) { 2663 size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, volumes_.get(i)); 2664 } 2665 if (dynamicSubstitutions_ != false) { 2666 size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, dynamicSubstitutions_); 2667 } 2668 if (pool_ != null) { 2669 size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getPool()); 2670 } 2671 if (defaultLogsBucketBehavior_ 2672 != com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior 2673 .DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED 2674 .getNumber()) { 2675 size += com.google.protobuf.CodedOutputStream.computeEnumSize(21, defaultLogsBucketBehavior_); 2676 } 2677 size += getUnknownFields().getSerializedSize(); 2678 memoizedSize = size; 2679 return size; 2680 } 2681 2682 @java.lang.Override equals(final java.lang.Object obj)2683 public boolean equals(final java.lang.Object obj) { 2684 if (obj == this) { 2685 return true; 2686 } 2687 if (!(obj instanceof com.google.cloudbuild.v1.BuildOptions)) { 2688 return super.equals(obj); 2689 } 2690 com.google.cloudbuild.v1.BuildOptions other = (com.google.cloudbuild.v1.BuildOptions) obj; 2691 2692 if (!sourceProvenanceHash_.equals(other.sourceProvenanceHash_)) return false; 2693 if (requestedVerifyOption_ != other.requestedVerifyOption_) return false; 2694 if (machineType_ != other.machineType_) return false; 2695 if (getDiskSizeGb() != other.getDiskSizeGb()) return false; 2696 if (substitutionOption_ != other.substitutionOption_) return false; 2697 if (getDynamicSubstitutions() != other.getDynamicSubstitutions()) return false; 2698 if (logStreamingOption_ != other.logStreamingOption_) return false; 2699 if (!getWorkerPool().equals(other.getWorkerPool())) return false; 2700 if (hasPool() != other.hasPool()) return false; 2701 if (hasPool()) { 2702 if (!getPool().equals(other.getPool())) return false; 2703 } 2704 if (logging_ != other.logging_) return false; 2705 if (!getEnvList().equals(other.getEnvList())) return false; 2706 if (!getSecretEnvList().equals(other.getSecretEnvList())) return false; 2707 if (!getVolumesList().equals(other.getVolumesList())) return false; 2708 if (defaultLogsBucketBehavior_ != other.defaultLogsBucketBehavior_) return false; 2709 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 2710 return true; 2711 } 2712 2713 @java.lang.Override hashCode()2714 public int hashCode() { 2715 if (memoizedHashCode != 0) { 2716 return memoizedHashCode; 2717 } 2718 int hash = 41; 2719 hash = (19 * hash) + getDescriptor().hashCode(); 2720 if (getSourceProvenanceHashCount() > 0) { 2721 hash = (37 * hash) + SOURCE_PROVENANCE_HASH_FIELD_NUMBER; 2722 hash = (53 * hash) + sourceProvenanceHash_.hashCode(); 2723 } 2724 hash = (37 * hash) + REQUESTED_VERIFY_OPTION_FIELD_NUMBER; 2725 hash = (53 * hash) + requestedVerifyOption_; 2726 hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; 2727 hash = (53 * hash) + machineType_; 2728 hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER; 2729 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskSizeGb()); 2730 hash = (37 * hash) + SUBSTITUTION_OPTION_FIELD_NUMBER; 2731 hash = (53 * hash) + substitutionOption_; 2732 hash = (37 * hash) + DYNAMIC_SUBSTITUTIONS_FIELD_NUMBER; 2733 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDynamicSubstitutions()); 2734 hash = (37 * hash) + LOG_STREAMING_OPTION_FIELD_NUMBER; 2735 hash = (53 * hash) + logStreamingOption_; 2736 hash = (37 * hash) + WORKER_POOL_FIELD_NUMBER; 2737 hash = (53 * hash) + getWorkerPool().hashCode(); 2738 if (hasPool()) { 2739 hash = (37 * hash) + POOL_FIELD_NUMBER; 2740 hash = (53 * hash) + getPool().hashCode(); 2741 } 2742 hash = (37 * hash) + LOGGING_FIELD_NUMBER; 2743 hash = (53 * hash) + logging_; 2744 if (getEnvCount() > 0) { 2745 hash = (37 * hash) + ENV_FIELD_NUMBER; 2746 hash = (53 * hash) + getEnvList().hashCode(); 2747 } 2748 if (getSecretEnvCount() > 0) { 2749 hash = (37 * hash) + SECRET_ENV_FIELD_NUMBER; 2750 hash = (53 * hash) + getSecretEnvList().hashCode(); 2751 } 2752 if (getVolumesCount() > 0) { 2753 hash = (37 * hash) + VOLUMES_FIELD_NUMBER; 2754 hash = (53 * hash) + getVolumesList().hashCode(); 2755 } 2756 hash = (37 * hash) + DEFAULT_LOGS_BUCKET_BEHAVIOR_FIELD_NUMBER; 2757 hash = (53 * hash) + defaultLogsBucketBehavior_; 2758 hash = (29 * hash) + getUnknownFields().hashCode(); 2759 memoizedHashCode = hash; 2760 return hash; 2761 } 2762 parseFrom(java.nio.ByteBuffer data)2763 public static com.google.cloudbuild.v1.BuildOptions parseFrom(java.nio.ByteBuffer data) 2764 throws com.google.protobuf.InvalidProtocolBufferException { 2765 return PARSER.parseFrom(data); 2766 } 2767 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2768 public static com.google.cloudbuild.v1.BuildOptions parseFrom( 2769 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2770 throws com.google.protobuf.InvalidProtocolBufferException { 2771 return PARSER.parseFrom(data, extensionRegistry); 2772 } 2773 parseFrom(com.google.protobuf.ByteString data)2774 public static com.google.cloudbuild.v1.BuildOptions parseFrom(com.google.protobuf.ByteString data) 2775 throws com.google.protobuf.InvalidProtocolBufferException { 2776 return PARSER.parseFrom(data); 2777 } 2778 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2779 public static com.google.cloudbuild.v1.BuildOptions parseFrom( 2780 com.google.protobuf.ByteString data, 2781 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2782 throws com.google.protobuf.InvalidProtocolBufferException { 2783 return PARSER.parseFrom(data, extensionRegistry); 2784 } 2785 parseFrom(byte[] data)2786 public static com.google.cloudbuild.v1.BuildOptions parseFrom(byte[] data) 2787 throws com.google.protobuf.InvalidProtocolBufferException { 2788 return PARSER.parseFrom(data); 2789 } 2790 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2791 public static com.google.cloudbuild.v1.BuildOptions parseFrom( 2792 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2793 throws com.google.protobuf.InvalidProtocolBufferException { 2794 return PARSER.parseFrom(data, extensionRegistry); 2795 } 2796 parseFrom(java.io.InputStream input)2797 public static com.google.cloudbuild.v1.BuildOptions parseFrom(java.io.InputStream input) 2798 throws java.io.IOException { 2799 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 2800 } 2801 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2802 public static com.google.cloudbuild.v1.BuildOptions parseFrom( 2803 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2804 throws java.io.IOException { 2805 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 2806 PARSER, input, extensionRegistry); 2807 } 2808 parseDelimitedFrom(java.io.InputStream input)2809 public static com.google.cloudbuild.v1.BuildOptions parseDelimitedFrom(java.io.InputStream input) 2810 throws java.io.IOException { 2811 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 2812 } 2813 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2814 public static com.google.cloudbuild.v1.BuildOptions parseDelimitedFrom( 2815 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2816 throws java.io.IOException { 2817 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 2818 PARSER, input, extensionRegistry); 2819 } 2820 parseFrom( com.google.protobuf.CodedInputStream input)2821 public static com.google.cloudbuild.v1.BuildOptions parseFrom( 2822 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 2823 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 2824 } 2825 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2826 public static com.google.cloudbuild.v1.BuildOptions parseFrom( 2827 com.google.protobuf.CodedInputStream input, 2828 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2829 throws java.io.IOException { 2830 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 2831 PARSER, input, extensionRegistry); 2832 } 2833 2834 @java.lang.Override newBuilderForType()2835 public Builder newBuilderForType() { 2836 return newBuilder(); 2837 } 2838 newBuilder()2839 public static Builder newBuilder() { 2840 return DEFAULT_INSTANCE.toBuilder(); 2841 } 2842 newBuilder(com.google.cloudbuild.v1.BuildOptions prototype)2843 public static Builder newBuilder(com.google.cloudbuild.v1.BuildOptions prototype) { 2844 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 2845 } 2846 2847 @java.lang.Override toBuilder()2848 public Builder toBuilder() { 2849 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 2850 } 2851 2852 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2853 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 2854 Builder builder = new Builder(parent); 2855 return builder; 2856 } 2857 /** 2858 * 2859 * 2860 * <pre> 2861 * Optional arguments to enable specific features of builds. 2862 * </pre> 2863 * 2864 * Protobuf type {@code google.devtools.cloudbuild.v1.BuildOptions} 2865 */ 2866 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 2867 implements 2868 // @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.BuildOptions) 2869 com.google.cloudbuild.v1.BuildOptionsOrBuilder { getDescriptor()2870 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 2871 return com.google.cloudbuild.v1.Cloudbuild 2872 .internal_static_google_devtools_cloudbuild_v1_BuildOptions_descriptor; 2873 } 2874 2875 @java.lang.Override 2876 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()2877 internalGetFieldAccessorTable() { 2878 return com.google.cloudbuild.v1.Cloudbuild 2879 .internal_static_google_devtools_cloudbuild_v1_BuildOptions_fieldAccessorTable 2880 .ensureFieldAccessorsInitialized( 2881 com.google.cloudbuild.v1.BuildOptions.class, 2882 com.google.cloudbuild.v1.BuildOptions.Builder.class); 2883 } 2884 2885 // Construct using com.google.cloudbuild.v1.BuildOptions.newBuilder() Builder()2886 private Builder() {} 2887 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2888 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 2889 super(parent); 2890 } 2891 2892 @java.lang.Override clear()2893 public Builder clear() { 2894 super.clear(); 2895 bitField0_ = 0; 2896 sourceProvenanceHash_ = java.util.Collections.emptyList(); 2897 bitField0_ = (bitField0_ & ~0x00000001); 2898 requestedVerifyOption_ = 0; 2899 machineType_ = 0; 2900 diskSizeGb_ = 0L; 2901 substitutionOption_ = 0; 2902 dynamicSubstitutions_ = false; 2903 logStreamingOption_ = 0; 2904 workerPool_ = ""; 2905 pool_ = null; 2906 if (poolBuilder_ != null) { 2907 poolBuilder_.dispose(); 2908 poolBuilder_ = null; 2909 } 2910 logging_ = 0; 2911 env_ = com.google.protobuf.LazyStringArrayList.EMPTY; 2912 bitField0_ = (bitField0_ & ~0x00000400); 2913 secretEnv_ = com.google.protobuf.LazyStringArrayList.EMPTY; 2914 bitField0_ = (bitField0_ & ~0x00000800); 2915 if (volumesBuilder_ == null) { 2916 volumes_ = java.util.Collections.emptyList(); 2917 } else { 2918 volumes_ = null; 2919 volumesBuilder_.clear(); 2920 } 2921 bitField0_ = (bitField0_ & ~0x00001000); 2922 defaultLogsBucketBehavior_ = 0; 2923 return this; 2924 } 2925 2926 @java.lang.Override getDescriptorForType()2927 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 2928 return com.google.cloudbuild.v1.Cloudbuild 2929 .internal_static_google_devtools_cloudbuild_v1_BuildOptions_descriptor; 2930 } 2931 2932 @java.lang.Override getDefaultInstanceForType()2933 public com.google.cloudbuild.v1.BuildOptions getDefaultInstanceForType() { 2934 return com.google.cloudbuild.v1.BuildOptions.getDefaultInstance(); 2935 } 2936 2937 @java.lang.Override build()2938 public com.google.cloudbuild.v1.BuildOptions build() { 2939 com.google.cloudbuild.v1.BuildOptions result = buildPartial(); 2940 if (!result.isInitialized()) { 2941 throw newUninitializedMessageException(result); 2942 } 2943 return result; 2944 } 2945 2946 @java.lang.Override buildPartial()2947 public com.google.cloudbuild.v1.BuildOptions buildPartial() { 2948 com.google.cloudbuild.v1.BuildOptions result = 2949 new com.google.cloudbuild.v1.BuildOptions(this); 2950 buildPartialRepeatedFields(result); 2951 if (bitField0_ != 0) { 2952 buildPartial0(result); 2953 } 2954 onBuilt(); 2955 return result; 2956 } 2957 buildPartialRepeatedFields(com.google.cloudbuild.v1.BuildOptions result)2958 private void buildPartialRepeatedFields(com.google.cloudbuild.v1.BuildOptions result) { 2959 if (((bitField0_ & 0x00000001) != 0)) { 2960 sourceProvenanceHash_ = java.util.Collections.unmodifiableList(sourceProvenanceHash_); 2961 bitField0_ = (bitField0_ & ~0x00000001); 2962 } 2963 result.sourceProvenanceHash_ = sourceProvenanceHash_; 2964 if (((bitField0_ & 0x00000400) != 0)) { 2965 env_ = env_.getUnmodifiableView(); 2966 bitField0_ = (bitField0_ & ~0x00000400); 2967 } 2968 result.env_ = env_; 2969 if (((bitField0_ & 0x00000800) != 0)) { 2970 secretEnv_ = secretEnv_.getUnmodifiableView(); 2971 bitField0_ = (bitField0_ & ~0x00000800); 2972 } 2973 result.secretEnv_ = secretEnv_; 2974 if (volumesBuilder_ == null) { 2975 if (((bitField0_ & 0x00001000) != 0)) { 2976 volumes_ = java.util.Collections.unmodifiableList(volumes_); 2977 bitField0_ = (bitField0_ & ~0x00001000); 2978 } 2979 result.volumes_ = volumes_; 2980 } else { 2981 result.volumes_ = volumesBuilder_.build(); 2982 } 2983 } 2984 buildPartial0(com.google.cloudbuild.v1.BuildOptions result)2985 private void buildPartial0(com.google.cloudbuild.v1.BuildOptions result) { 2986 int from_bitField0_ = bitField0_; 2987 if (((from_bitField0_ & 0x00000002) != 0)) { 2988 result.requestedVerifyOption_ = requestedVerifyOption_; 2989 } 2990 if (((from_bitField0_ & 0x00000004) != 0)) { 2991 result.machineType_ = machineType_; 2992 } 2993 if (((from_bitField0_ & 0x00000008) != 0)) { 2994 result.diskSizeGb_ = diskSizeGb_; 2995 } 2996 if (((from_bitField0_ & 0x00000010) != 0)) { 2997 result.substitutionOption_ = substitutionOption_; 2998 } 2999 if (((from_bitField0_ & 0x00000020) != 0)) { 3000 result.dynamicSubstitutions_ = dynamicSubstitutions_; 3001 } 3002 if (((from_bitField0_ & 0x00000040) != 0)) { 3003 result.logStreamingOption_ = logStreamingOption_; 3004 } 3005 if (((from_bitField0_ & 0x00000080) != 0)) { 3006 result.workerPool_ = workerPool_; 3007 } 3008 if (((from_bitField0_ & 0x00000100) != 0)) { 3009 result.pool_ = poolBuilder_ == null ? pool_ : poolBuilder_.build(); 3010 } 3011 if (((from_bitField0_ & 0x00000200) != 0)) { 3012 result.logging_ = logging_; 3013 } 3014 if (((from_bitField0_ & 0x00002000) != 0)) { 3015 result.defaultLogsBucketBehavior_ = defaultLogsBucketBehavior_; 3016 } 3017 } 3018 3019 @java.lang.Override clone()3020 public Builder clone() { 3021 return super.clone(); 3022 } 3023 3024 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)3025 public Builder setField( 3026 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 3027 return super.setField(field, value); 3028 } 3029 3030 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)3031 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 3032 return super.clearField(field); 3033 } 3034 3035 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)3036 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 3037 return super.clearOneof(oneof); 3038 } 3039 3040 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)3041 public Builder setRepeatedField( 3042 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 3043 return super.setRepeatedField(field, index, value); 3044 } 3045 3046 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)3047 public Builder addRepeatedField( 3048 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 3049 return super.addRepeatedField(field, value); 3050 } 3051 3052 @java.lang.Override mergeFrom(com.google.protobuf.Message other)3053 public Builder mergeFrom(com.google.protobuf.Message other) { 3054 if (other instanceof com.google.cloudbuild.v1.BuildOptions) { 3055 return mergeFrom((com.google.cloudbuild.v1.BuildOptions) other); 3056 } else { 3057 super.mergeFrom(other); 3058 return this; 3059 } 3060 } 3061 mergeFrom(com.google.cloudbuild.v1.BuildOptions other)3062 public Builder mergeFrom(com.google.cloudbuild.v1.BuildOptions other) { 3063 if (other == com.google.cloudbuild.v1.BuildOptions.getDefaultInstance()) return this; 3064 if (!other.sourceProvenanceHash_.isEmpty()) { 3065 if (sourceProvenanceHash_.isEmpty()) { 3066 sourceProvenanceHash_ = other.sourceProvenanceHash_; 3067 bitField0_ = (bitField0_ & ~0x00000001); 3068 } else { 3069 ensureSourceProvenanceHashIsMutable(); 3070 sourceProvenanceHash_.addAll(other.sourceProvenanceHash_); 3071 } 3072 onChanged(); 3073 } 3074 if (other.requestedVerifyOption_ != 0) { 3075 setRequestedVerifyOptionValue(other.getRequestedVerifyOptionValue()); 3076 } 3077 if (other.machineType_ != 0) { 3078 setMachineTypeValue(other.getMachineTypeValue()); 3079 } 3080 if (other.getDiskSizeGb() != 0L) { 3081 setDiskSizeGb(other.getDiskSizeGb()); 3082 } 3083 if (other.substitutionOption_ != 0) { 3084 setSubstitutionOptionValue(other.getSubstitutionOptionValue()); 3085 } 3086 if (other.getDynamicSubstitutions() != false) { 3087 setDynamicSubstitutions(other.getDynamicSubstitutions()); 3088 } 3089 if (other.logStreamingOption_ != 0) { 3090 setLogStreamingOptionValue(other.getLogStreamingOptionValue()); 3091 } 3092 if (!other.getWorkerPool().isEmpty()) { 3093 workerPool_ = other.workerPool_; 3094 bitField0_ |= 0x00000080; 3095 onChanged(); 3096 } 3097 if (other.hasPool()) { 3098 mergePool(other.getPool()); 3099 } 3100 if (other.logging_ != 0) { 3101 setLoggingValue(other.getLoggingValue()); 3102 } 3103 if (!other.env_.isEmpty()) { 3104 if (env_.isEmpty()) { 3105 env_ = other.env_; 3106 bitField0_ = (bitField0_ & ~0x00000400); 3107 } else { 3108 ensureEnvIsMutable(); 3109 env_.addAll(other.env_); 3110 } 3111 onChanged(); 3112 } 3113 if (!other.secretEnv_.isEmpty()) { 3114 if (secretEnv_.isEmpty()) { 3115 secretEnv_ = other.secretEnv_; 3116 bitField0_ = (bitField0_ & ~0x00000800); 3117 } else { 3118 ensureSecretEnvIsMutable(); 3119 secretEnv_.addAll(other.secretEnv_); 3120 } 3121 onChanged(); 3122 } 3123 if (volumesBuilder_ == null) { 3124 if (!other.volumes_.isEmpty()) { 3125 if (volumes_.isEmpty()) { 3126 volumes_ = other.volumes_; 3127 bitField0_ = (bitField0_ & ~0x00001000); 3128 } else { 3129 ensureVolumesIsMutable(); 3130 volumes_.addAll(other.volumes_); 3131 } 3132 onChanged(); 3133 } 3134 } else { 3135 if (!other.volumes_.isEmpty()) { 3136 if (volumesBuilder_.isEmpty()) { 3137 volumesBuilder_.dispose(); 3138 volumesBuilder_ = null; 3139 volumes_ = other.volumes_; 3140 bitField0_ = (bitField0_ & ~0x00001000); 3141 volumesBuilder_ = 3142 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 3143 ? getVolumesFieldBuilder() 3144 : null; 3145 } else { 3146 volumesBuilder_.addAllMessages(other.volumes_); 3147 } 3148 } 3149 } 3150 if (other.defaultLogsBucketBehavior_ != 0) { 3151 setDefaultLogsBucketBehaviorValue(other.getDefaultLogsBucketBehaviorValue()); 3152 } 3153 this.mergeUnknownFields(other.getUnknownFields()); 3154 onChanged(); 3155 return this; 3156 } 3157 3158 @java.lang.Override isInitialized()3159 public final boolean isInitialized() { 3160 return true; 3161 } 3162 3163 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3164 public Builder mergeFrom( 3165 com.google.protobuf.CodedInputStream input, 3166 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3167 throws java.io.IOException { 3168 if (extensionRegistry == null) { 3169 throw new java.lang.NullPointerException(); 3170 } 3171 try { 3172 boolean done = false; 3173 while (!done) { 3174 int tag = input.readTag(); 3175 switch (tag) { 3176 case 0: 3177 done = true; 3178 break; 3179 case 8: 3180 { 3181 int tmpRaw = input.readEnum(); 3182 ensureSourceProvenanceHashIsMutable(); 3183 sourceProvenanceHash_.add(tmpRaw); 3184 break; 3185 } // case 8 3186 case 10: 3187 { 3188 int length = input.readRawVarint32(); 3189 int oldLimit = input.pushLimit(length); 3190 while (input.getBytesUntilLimit() > 0) { 3191 int tmpRaw = input.readEnum(); 3192 ensureSourceProvenanceHashIsMutable(); 3193 sourceProvenanceHash_.add(tmpRaw); 3194 } 3195 input.popLimit(oldLimit); 3196 break; 3197 } // case 10 3198 case 16: 3199 { 3200 requestedVerifyOption_ = input.readEnum(); 3201 bitField0_ |= 0x00000002; 3202 break; 3203 } // case 16 3204 case 24: 3205 { 3206 machineType_ = input.readEnum(); 3207 bitField0_ |= 0x00000004; 3208 break; 3209 } // case 24 3210 case 32: 3211 { 3212 substitutionOption_ = input.readEnum(); 3213 bitField0_ |= 0x00000010; 3214 break; 3215 } // case 32 3216 case 40: 3217 { 3218 logStreamingOption_ = input.readEnum(); 3219 bitField0_ |= 0x00000040; 3220 break; 3221 } // case 40 3222 case 48: 3223 { 3224 diskSizeGb_ = input.readInt64(); 3225 bitField0_ |= 0x00000008; 3226 break; 3227 } // case 48 3228 case 58: 3229 { 3230 workerPool_ = input.readStringRequireUtf8(); 3231 bitField0_ |= 0x00000080; 3232 break; 3233 } // case 58 3234 case 88: 3235 { 3236 logging_ = input.readEnum(); 3237 bitField0_ |= 0x00000200; 3238 break; 3239 } // case 88 3240 case 98: 3241 { 3242 java.lang.String s = input.readStringRequireUtf8(); 3243 ensureEnvIsMutable(); 3244 env_.add(s); 3245 break; 3246 } // case 98 3247 case 106: 3248 { 3249 java.lang.String s = input.readStringRequireUtf8(); 3250 ensureSecretEnvIsMutable(); 3251 secretEnv_.add(s); 3252 break; 3253 } // case 106 3254 case 114: 3255 { 3256 com.google.cloudbuild.v1.Volume m = 3257 input.readMessage(com.google.cloudbuild.v1.Volume.parser(), extensionRegistry); 3258 if (volumesBuilder_ == null) { 3259 ensureVolumesIsMutable(); 3260 volumes_.add(m); 3261 } else { 3262 volumesBuilder_.addMessage(m); 3263 } 3264 break; 3265 } // case 114 3266 case 136: 3267 { 3268 dynamicSubstitutions_ = input.readBool(); 3269 bitField0_ |= 0x00000020; 3270 break; 3271 } // case 136 3272 case 154: 3273 { 3274 input.readMessage(getPoolFieldBuilder().getBuilder(), extensionRegistry); 3275 bitField0_ |= 0x00000100; 3276 break; 3277 } // case 154 3278 case 168: 3279 { 3280 defaultLogsBucketBehavior_ = input.readEnum(); 3281 bitField0_ |= 0x00002000; 3282 break; 3283 } // case 168 3284 default: 3285 { 3286 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 3287 done = true; // was an endgroup tag 3288 } 3289 break; 3290 } // default: 3291 } // switch (tag) 3292 } // while (!done) 3293 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3294 throw e.unwrapIOException(); 3295 } finally { 3296 onChanged(); 3297 } // finally 3298 return this; 3299 } 3300 3301 private int bitField0_; 3302 3303 private java.util.List<java.lang.Integer> sourceProvenanceHash_ = 3304 java.util.Collections.emptyList(); 3305 ensureSourceProvenanceHashIsMutable()3306 private void ensureSourceProvenanceHashIsMutable() { 3307 if (!((bitField0_ & 0x00000001) != 0)) { 3308 sourceProvenanceHash_ = new java.util.ArrayList<java.lang.Integer>(sourceProvenanceHash_); 3309 bitField0_ |= 0x00000001; 3310 } 3311 } 3312 /** 3313 * 3314 * 3315 * <pre> 3316 * Requested hash for SourceProvenance. 3317 * </pre> 3318 * 3319 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3320 * </code> 3321 * 3322 * @return A list containing the sourceProvenanceHash. 3323 */ getSourceProvenanceHashList()3324 public java.util.List<com.google.cloudbuild.v1.Hash.HashType> getSourceProvenanceHashList() { 3325 return new com.google.protobuf.Internal.ListAdapter< 3326 java.lang.Integer, com.google.cloudbuild.v1.Hash.HashType>( 3327 sourceProvenanceHash_, sourceProvenanceHash_converter_); 3328 } 3329 /** 3330 * 3331 * 3332 * <pre> 3333 * Requested hash for SourceProvenance. 3334 * </pre> 3335 * 3336 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3337 * </code> 3338 * 3339 * @return The count of sourceProvenanceHash. 3340 */ getSourceProvenanceHashCount()3341 public int getSourceProvenanceHashCount() { 3342 return sourceProvenanceHash_.size(); 3343 } 3344 /** 3345 * 3346 * 3347 * <pre> 3348 * Requested hash for SourceProvenance. 3349 * </pre> 3350 * 3351 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3352 * </code> 3353 * 3354 * @param index The index of the element to return. 3355 * @return The sourceProvenanceHash at the given index. 3356 */ getSourceProvenanceHash(int index)3357 public com.google.cloudbuild.v1.Hash.HashType getSourceProvenanceHash(int index) { 3358 return sourceProvenanceHash_converter_.convert(sourceProvenanceHash_.get(index)); 3359 } 3360 /** 3361 * 3362 * 3363 * <pre> 3364 * Requested hash for SourceProvenance. 3365 * </pre> 3366 * 3367 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3368 * </code> 3369 * 3370 * @param index The index to set the value at. 3371 * @param value The sourceProvenanceHash to set. 3372 * @return This builder for chaining. 3373 */ setSourceProvenanceHash( int index, com.google.cloudbuild.v1.Hash.HashType value)3374 public Builder setSourceProvenanceHash( 3375 int index, com.google.cloudbuild.v1.Hash.HashType value) { 3376 if (value == null) { 3377 throw new NullPointerException(); 3378 } 3379 ensureSourceProvenanceHashIsMutable(); 3380 sourceProvenanceHash_.set(index, value.getNumber()); 3381 onChanged(); 3382 return this; 3383 } 3384 /** 3385 * 3386 * 3387 * <pre> 3388 * Requested hash for SourceProvenance. 3389 * </pre> 3390 * 3391 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3392 * </code> 3393 * 3394 * @param value The sourceProvenanceHash to add. 3395 * @return This builder for chaining. 3396 */ addSourceProvenanceHash(com.google.cloudbuild.v1.Hash.HashType value)3397 public Builder addSourceProvenanceHash(com.google.cloudbuild.v1.Hash.HashType value) { 3398 if (value == null) { 3399 throw new NullPointerException(); 3400 } 3401 ensureSourceProvenanceHashIsMutable(); 3402 sourceProvenanceHash_.add(value.getNumber()); 3403 onChanged(); 3404 return this; 3405 } 3406 /** 3407 * 3408 * 3409 * <pre> 3410 * Requested hash for SourceProvenance. 3411 * </pre> 3412 * 3413 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3414 * </code> 3415 * 3416 * @param values The sourceProvenanceHash to add. 3417 * @return This builder for chaining. 3418 */ addAllSourceProvenanceHash( java.lang.Iterable<? extends com.google.cloudbuild.v1.Hash.HashType> values)3419 public Builder addAllSourceProvenanceHash( 3420 java.lang.Iterable<? extends com.google.cloudbuild.v1.Hash.HashType> values) { 3421 ensureSourceProvenanceHashIsMutable(); 3422 for (com.google.cloudbuild.v1.Hash.HashType value : values) { 3423 sourceProvenanceHash_.add(value.getNumber()); 3424 } 3425 onChanged(); 3426 return this; 3427 } 3428 /** 3429 * 3430 * 3431 * <pre> 3432 * Requested hash for SourceProvenance. 3433 * </pre> 3434 * 3435 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3436 * </code> 3437 * 3438 * @return This builder for chaining. 3439 */ clearSourceProvenanceHash()3440 public Builder clearSourceProvenanceHash() { 3441 sourceProvenanceHash_ = java.util.Collections.emptyList(); 3442 bitField0_ = (bitField0_ & ~0x00000001); 3443 onChanged(); 3444 return this; 3445 } 3446 /** 3447 * 3448 * 3449 * <pre> 3450 * Requested hash for SourceProvenance. 3451 * </pre> 3452 * 3453 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3454 * </code> 3455 * 3456 * @return A list containing the enum numeric values on the wire for sourceProvenanceHash. 3457 */ getSourceProvenanceHashValueList()3458 public java.util.List<java.lang.Integer> getSourceProvenanceHashValueList() { 3459 return java.util.Collections.unmodifiableList(sourceProvenanceHash_); 3460 } 3461 /** 3462 * 3463 * 3464 * <pre> 3465 * Requested hash for SourceProvenance. 3466 * </pre> 3467 * 3468 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3469 * </code> 3470 * 3471 * @param index The index of the value to return. 3472 * @return The enum numeric value on the wire of sourceProvenanceHash at the given index. 3473 */ getSourceProvenanceHashValue(int index)3474 public int getSourceProvenanceHashValue(int index) { 3475 return sourceProvenanceHash_.get(index); 3476 } 3477 /** 3478 * 3479 * 3480 * <pre> 3481 * Requested hash for SourceProvenance. 3482 * </pre> 3483 * 3484 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3485 * </code> 3486 * 3487 * @param index The index to set the value at. 3488 * @param value The enum numeric value on the wire for sourceProvenanceHash to set. 3489 * @return This builder for chaining. 3490 */ setSourceProvenanceHashValue(int index, int value)3491 public Builder setSourceProvenanceHashValue(int index, int value) { 3492 ensureSourceProvenanceHashIsMutable(); 3493 sourceProvenanceHash_.set(index, value); 3494 onChanged(); 3495 return this; 3496 } 3497 /** 3498 * 3499 * 3500 * <pre> 3501 * Requested hash for SourceProvenance. 3502 * </pre> 3503 * 3504 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3505 * </code> 3506 * 3507 * @param value The enum numeric value on the wire for sourceProvenanceHash to add. 3508 * @return This builder for chaining. 3509 */ addSourceProvenanceHashValue(int value)3510 public Builder addSourceProvenanceHashValue(int value) { 3511 ensureSourceProvenanceHashIsMutable(); 3512 sourceProvenanceHash_.add(value); 3513 onChanged(); 3514 return this; 3515 } 3516 /** 3517 * 3518 * 3519 * <pre> 3520 * Requested hash for SourceProvenance. 3521 * </pre> 3522 * 3523 * <code>repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1; 3524 * </code> 3525 * 3526 * @param values The enum numeric values on the wire for sourceProvenanceHash to add. 3527 * @return This builder for chaining. 3528 */ addAllSourceProvenanceHashValue(java.lang.Iterable<java.lang.Integer> values)3529 public Builder addAllSourceProvenanceHashValue(java.lang.Iterable<java.lang.Integer> values) { 3530 ensureSourceProvenanceHashIsMutable(); 3531 for (int value : values) { 3532 sourceProvenanceHash_.add(value); 3533 } 3534 onChanged(); 3535 return this; 3536 } 3537 3538 private int requestedVerifyOption_ = 0; 3539 /** 3540 * 3541 * 3542 * <pre> 3543 * Requested verifiability options. 3544 * </pre> 3545 * 3546 * <code>.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2; 3547 * </code> 3548 * 3549 * @return The enum numeric value on the wire for requestedVerifyOption. 3550 */ 3551 @java.lang.Override getRequestedVerifyOptionValue()3552 public int getRequestedVerifyOptionValue() { 3553 return requestedVerifyOption_; 3554 } 3555 /** 3556 * 3557 * 3558 * <pre> 3559 * Requested verifiability options. 3560 * </pre> 3561 * 3562 * <code>.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2; 3563 * </code> 3564 * 3565 * @param value The enum numeric value on the wire for requestedVerifyOption to set. 3566 * @return This builder for chaining. 3567 */ setRequestedVerifyOptionValue(int value)3568 public Builder setRequestedVerifyOptionValue(int value) { 3569 requestedVerifyOption_ = value; 3570 bitField0_ |= 0x00000002; 3571 onChanged(); 3572 return this; 3573 } 3574 /** 3575 * 3576 * 3577 * <pre> 3578 * Requested verifiability options. 3579 * </pre> 3580 * 3581 * <code>.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2; 3582 * </code> 3583 * 3584 * @return The requestedVerifyOption. 3585 */ 3586 @java.lang.Override getRequestedVerifyOption()3587 public com.google.cloudbuild.v1.BuildOptions.VerifyOption getRequestedVerifyOption() { 3588 com.google.cloudbuild.v1.BuildOptions.VerifyOption result = 3589 com.google.cloudbuild.v1.BuildOptions.VerifyOption.forNumber(requestedVerifyOption_); 3590 return result == null 3591 ? com.google.cloudbuild.v1.BuildOptions.VerifyOption.UNRECOGNIZED 3592 : result; 3593 } 3594 /** 3595 * 3596 * 3597 * <pre> 3598 * Requested verifiability options. 3599 * </pre> 3600 * 3601 * <code>.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2; 3602 * </code> 3603 * 3604 * @param value The requestedVerifyOption to set. 3605 * @return This builder for chaining. 3606 */ setRequestedVerifyOption( com.google.cloudbuild.v1.BuildOptions.VerifyOption value)3607 public Builder setRequestedVerifyOption( 3608 com.google.cloudbuild.v1.BuildOptions.VerifyOption value) { 3609 if (value == null) { 3610 throw new NullPointerException(); 3611 } 3612 bitField0_ |= 0x00000002; 3613 requestedVerifyOption_ = value.getNumber(); 3614 onChanged(); 3615 return this; 3616 } 3617 /** 3618 * 3619 * 3620 * <pre> 3621 * Requested verifiability options. 3622 * </pre> 3623 * 3624 * <code>.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2; 3625 * </code> 3626 * 3627 * @return This builder for chaining. 3628 */ clearRequestedVerifyOption()3629 public Builder clearRequestedVerifyOption() { 3630 bitField0_ = (bitField0_ & ~0x00000002); 3631 requestedVerifyOption_ = 0; 3632 onChanged(); 3633 return this; 3634 } 3635 3636 private int machineType_ = 0; 3637 /** 3638 * 3639 * 3640 * <pre> 3641 * Compute Engine machine type on which to run the build. 3642 * </pre> 3643 * 3644 * <code>.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;</code> 3645 * 3646 * @return The enum numeric value on the wire for machineType. 3647 */ 3648 @java.lang.Override getMachineTypeValue()3649 public int getMachineTypeValue() { 3650 return machineType_; 3651 } 3652 /** 3653 * 3654 * 3655 * <pre> 3656 * Compute Engine machine type on which to run the build. 3657 * </pre> 3658 * 3659 * <code>.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;</code> 3660 * 3661 * @param value The enum numeric value on the wire for machineType to set. 3662 * @return This builder for chaining. 3663 */ setMachineTypeValue(int value)3664 public Builder setMachineTypeValue(int value) { 3665 machineType_ = value; 3666 bitField0_ |= 0x00000004; 3667 onChanged(); 3668 return this; 3669 } 3670 /** 3671 * 3672 * 3673 * <pre> 3674 * Compute Engine machine type on which to run the build. 3675 * </pre> 3676 * 3677 * <code>.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;</code> 3678 * 3679 * @return The machineType. 3680 */ 3681 @java.lang.Override getMachineType()3682 public com.google.cloudbuild.v1.BuildOptions.MachineType getMachineType() { 3683 com.google.cloudbuild.v1.BuildOptions.MachineType result = 3684 com.google.cloudbuild.v1.BuildOptions.MachineType.forNumber(machineType_); 3685 return result == null 3686 ? com.google.cloudbuild.v1.BuildOptions.MachineType.UNRECOGNIZED 3687 : result; 3688 } 3689 /** 3690 * 3691 * 3692 * <pre> 3693 * Compute Engine machine type on which to run the build. 3694 * </pre> 3695 * 3696 * <code>.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;</code> 3697 * 3698 * @param value The machineType to set. 3699 * @return This builder for chaining. 3700 */ setMachineType(com.google.cloudbuild.v1.BuildOptions.MachineType value)3701 public Builder setMachineType(com.google.cloudbuild.v1.BuildOptions.MachineType value) { 3702 if (value == null) { 3703 throw new NullPointerException(); 3704 } 3705 bitField0_ |= 0x00000004; 3706 machineType_ = value.getNumber(); 3707 onChanged(); 3708 return this; 3709 } 3710 /** 3711 * 3712 * 3713 * <pre> 3714 * Compute Engine machine type on which to run the build. 3715 * </pre> 3716 * 3717 * <code>.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;</code> 3718 * 3719 * @return This builder for chaining. 3720 */ clearMachineType()3721 public Builder clearMachineType() { 3722 bitField0_ = (bitField0_ & ~0x00000004); 3723 machineType_ = 0; 3724 onChanged(); 3725 return this; 3726 } 3727 3728 private long diskSizeGb_; 3729 /** 3730 * 3731 * 3732 * <pre> 3733 * Requested disk size for the VM that runs the build. Note that this is *NOT* 3734 * "disk free"; some of the space will be used by the operating system and 3735 * build utilities. Also note that this is the minimum disk size that will be 3736 * allocated for the build -- the build may run with a larger disk than 3737 * requested. At present, the maximum disk size is 2000GB; builds that request 3738 * more than the maximum are rejected with an error. 3739 * </pre> 3740 * 3741 * <code>int64 disk_size_gb = 6;</code> 3742 * 3743 * @return The diskSizeGb. 3744 */ 3745 @java.lang.Override getDiskSizeGb()3746 public long getDiskSizeGb() { 3747 return diskSizeGb_; 3748 } 3749 /** 3750 * 3751 * 3752 * <pre> 3753 * Requested disk size for the VM that runs the build. Note that this is *NOT* 3754 * "disk free"; some of the space will be used by the operating system and 3755 * build utilities. Also note that this is the minimum disk size that will be 3756 * allocated for the build -- the build may run with a larger disk than 3757 * requested. At present, the maximum disk size is 2000GB; builds that request 3758 * more than the maximum are rejected with an error. 3759 * </pre> 3760 * 3761 * <code>int64 disk_size_gb = 6;</code> 3762 * 3763 * @param value The diskSizeGb to set. 3764 * @return This builder for chaining. 3765 */ setDiskSizeGb(long value)3766 public Builder setDiskSizeGb(long value) { 3767 3768 diskSizeGb_ = value; 3769 bitField0_ |= 0x00000008; 3770 onChanged(); 3771 return this; 3772 } 3773 /** 3774 * 3775 * 3776 * <pre> 3777 * Requested disk size for the VM that runs the build. Note that this is *NOT* 3778 * "disk free"; some of the space will be used by the operating system and 3779 * build utilities. Also note that this is the minimum disk size that will be 3780 * allocated for the build -- the build may run with a larger disk than 3781 * requested. At present, the maximum disk size is 2000GB; builds that request 3782 * more than the maximum are rejected with an error. 3783 * </pre> 3784 * 3785 * <code>int64 disk_size_gb = 6;</code> 3786 * 3787 * @return This builder for chaining. 3788 */ clearDiskSizeGb()3789 public Builder clearDiskSizeGb() { 3790 bitField0_ = (bitField0_ & ~0x00000008); 3791 diskSizeGb_ = 0L; 3792 onChanged(); 3793 return this; 3794 } 3795 3796 private int substitutionOption_ = 0; 3797 /** 3798 * 3799 * 3800 * <pre> 3801 * Option to specify behavior when there is an error in the substitution 3802 * checks. 3803 * NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot 3804 * be overridden in the build configuration file. 3805 * </pre> 3806 * 3807 * <code>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4; 3808 * </code> 3809 * 3810 * @return The enum numeric value on the wire for substitutionOption. 3811 */ 3812 @java.lang.Override getSubstitutionOptionValue()3813 public int getSubstitutionOptionValue() { 3814 return substitutionOption_; 3815 } 3816 /** 3817 * 3818 * 3819 * <pre> 3820 * Option to specify behavior when there is an error in the substitution 3821 * checks. 3822 * NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot 3823 * be overridden in the build configuration file. 3824 * </pre> 3825 * 3826 * <code>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4; 3827 * </code> 3828 * 3829 * @param value The enum numeric value on the wire for substitutionOption to set. 3830 * @return This builder for chaining. 3831 */ setSubstitutionOptionValue(int value)3832 public Builder setSubstitutionOptionValue(int value) { 3833 substitutionOption_ = value; 3834 bitField0_ |= 0x00000010; 3835 onChanged(); 3836 return this; 3837 } 3838 /** 3839 * 3840 * 3841 * <pre> 3842 * Option to specify behavior when there is an error in the substitution 3843 * checks. 3844 * NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot 3845 * be overridden in the build configuration file. 3846 * </pre> 3847 * 3848 * <code>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4; 3849 * </code> 3850 * 3851 * @return The substitutionOption. 3852 */ 3853 @java.lang.Override getSubstitutionOption()3854 public com.google.cloudbuild.v1.BuildOptions.SubstitutionOption getSubstitutionOption() { 3855 com.google.cloudbuild.v1.BuildOptions.SubstitutionOption result = 3856 com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.forNumber(substitutionOption_); 3857 return result == null 3858 ? com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.UNRECOGNIZED 3859 : result; 3860 } 3861 /** 3862 * 3863 * 3864 * <pre> 3865 * Option to specify behavior when there is an error in the substitution 3866 * checks. 3867 * NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot 3868 * be overridden in the build configuration file. 3869 * </pre> 3870 * 3871 * <code>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4; 3872 * </code> 3873 * 3874 * @param value The substitutionOption to set. 3875 * @return This builder for chaining. 3876 */ setSubstitutionOption( com.google.cloudbuild.v1.BuildOptions.SubstitutionOption value)3877 public Builder setSubstitutionOption( 3878 com.google.cloudbuild.v1.BuildOptions.SubstitutionOption value) { 3879 if (value == null) { 3880 throw new NullPointerException(); 3881 } 3882 bitField0_ |= 0x00000010; 3883 substitutionOption_ = value.getNumber(); 3884 onChanged(); 3885 return this; 3886 } 3887 /** 3888 * 3889 * 3890 * <pre> 3891 * Option to specify behavior when there is an error in the substitution 3892 * checks. 3893 * NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot 3894 * be overridden in the build configuration file. 3895 * </pre> 3896 * 3897 * <code>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4; 3898 * </code> 3899 * 3900 * @return This builder for chaining. 3901 */ clearSubstitutionOption()3902 public Builder clearSubstitutionOption() { 3903 bitField0_ = (bitField0_ & ~0x00000010); 3904 substitutionOption_ = 0; 3905 onChanged(); 3906 return this; 3907 } 3908 3909 private boolean dynamicSubstitutions_; 3910 /** 3911 * 3912 * 3913 * <pre> 3914 * Option to specify whether or not to apply bash style string 3915 * operations to the substitutions. 3916 * NOTE: this is always enabled for triggered builds and cannot be 3917 * overridden in the build configuration file. 3918 * </pre> 3919 * 3920 * <code>bool dynamic_substitutions = 17;</code> 3921 * 3922 * @return The dynamicSubstitutions. 3923 */ 3924 @java.lang.Override getDynamicSubstitutions()3925 public boolean getDynamicSubstitutions() { 3926 return dynamicSubstitutions_; 3927 } 3928 /** 3929 * 3930 * 3931 * <pre> 3932 * Option to specify whether or not to apply bash style string 3933 * operations to the substitutions. 3934 * NOTE: this is always enabled for triggered builds and cannot be 3935 * overridden in the build configuration file. 3936 * </pre> 3937 * 3938 * <code>bool dynamic_substitutions = 17;</code> 3939 * 3940 * @param value The dynamicSubstitutions to set. 3941 * @return This builder for chaining. 3942 */ setDynamicSubstitutions(boolean value)3943 public Builder setDynamicSubstitutions(boolean value) { 3944 3945 dynamicSubstitutions_ = value; 3946 bitField0_ |= 0x00000020; 3947 onChanged(); 3948 return this; 3949 } 3950 /** 3951 * 3952 * 3953 * <pre> 3954 * Option to specify whether or not to apply bash style string 3955 * operations to the substitutions. 3956 * NOTE: this is always enabled for triggered builds and cannot be 3957 * overridden in the build configuration file. 3958 * </pre> 3959 * 3960 * <code>bool dynamic_substitutions = 17;</code> 3961 * 3962 * @return This builder for chaining. 3963 */ clearDynamicSubstitutions()3964 public Builder clearDynamicSubstitutions() { 3965 bitField0_ = (bitField0_ & ~0x00000020); 3966 dynamicSubstitutions_ = false; 3967 onChanged(); 3968 return this; 3969 } 3970 3971 private int logStreamingOption_ = 0; 3972 /** 3973 * 3974 * 3975 * <pre> 3976 * Option to define build log streaming behavior to Google Cloud 3977 * Storage. 3978 * </pre> 3979 * 3980 * <code> 3981 * .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5; 3982 * </code> 3983 * 3984 * @return The enum numeric value on the wire for logStreamingOption. 3985 */ 3986 @java.lang.Override getLogStreamingOptionValue()3987 public int getLogStreamingOptionValue() { 3988 return logStreamingOption_; 3989 } 3990 /** 3991 * 3992 * 3993 * <pre> 3994 * Option to define build log streaming behavior to Google Cloud 3995 * Storage. 3996 * </pre> 3997 * 3998 * <code> 3999 * .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5; 4000 * </code> 4001 * 4002 * @param value The enum numeric value on the wire for logStreamingOption to set. 4003 * @return This builder for chaining. 4004 */ setLogStreamingOptionValue(int value)4005 public Builder setLogStreamingOptionValue(int value) { 4006 logStreamingOption_ = value; 4007 bitField0_ |= 0x00000040; 4008 onChanged(); 4009 return this; 4010 } 4011 /** 4012 * 4013 * 4014 * <pre> 4015 * Option to define build log streaming behavior to Google Cloud 4016 * Storage. 4017 * </pre> 4018 * 4019 * <code> 4020 * .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5; 4021 * </code> 4022 * 4023 * @return The logStreamingOption. 4024 */ 4025 @java.lang.Override getLogStreamingOption()4026 public com.google.cloudbuild.v1.BuildOptions.LogStreamingOption getLogStreamingOption() { 4027 com.google.cloudbuild.v1.BuildOptions.LogStreamingOption result = 4028 com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.forNumber(logStreamingOption_); 4029 return result == null 4030 ? com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.UNRECOGNIZED 4031 : result; 4032 } 4033 /** 4034 * 4035 * 4036 * <pre> 4037 * Option to define build log streaming behavior to Google Cloud 4038 * Storage. 4039 * </pre> 4040 * 4041 * <code> 4042 * .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5; 4043 * </code> 4044 * 4045 * @param value The logStreamingOption to set. 4046 * @return This builder for chaining. 4047 */ setLogStreamingOption( com.google.cloudbuild.v1.BuildOptions.LogStreamingOption value)4048 public Builder setLogStreamingOption( 4049 com.google.cloudbuild.v1.BuildOptions.LogStreamingOption value) { 4050 if (value == null) { 4051 throw new NullPointerException(); 4052 } 4053 bitField0_ |= 0x00000040; 4054 logStreamingOption_ = value.getNumber(); 4055 onChanged(); 4056 return this; 4057 } 4058 /** 4059 * 4060 * 4061 * <pre> 4062 * Option to define build log streaming behavior to Google Cloud 4063 * Storage. 4064 * </pre> 4065 * 4066 * <code> 4067 * .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5; 4068 * </code> 4069 * 4070 * @return This builder for chaining. 4071 */ clearLogStreamingOption()4072 public Builder clearLogStreamingOption() { 4073 bitField0_ = (bitField0_ & ~0x00000040); 4074 logStreamingOption_ = 0; 4075 onChanged(); 4076 return this; 4077 } 4078 4079 private java.lang.Object workerPool_ = ""; 4080 /** 4081 * 4082 * 4083 * <pre> 4084 * This field deprecated; please use `pool.name` instead. 4085 * </pre> 4086 * 4087 * <code>string worker_pool = 7 [deprecated = true];</code> 4088 * 4089 * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See 4090 * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1969 4091 * @return The workerPool. 4092 */ 4093 @java.lang.Deprecated getWorkerPool()4094 public java.lang.String getWorkerPool() { 4095 java.lang.Object ref = workerPool_; 4096 if (!(ref instanceof java.lang.String)) { 4097 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 4098 java.lang.String s = bs.toStringUtf8(); 4099 workerPool_ = s; 4100 return s; 4101 } else { 4102 return (java.lang.String) ref; 4103 } 4104 } 4105 /** 4106 * 4107 * 4108 * <pre> 4109 * This field deprecated; please use `pool.name` instead. 4110 * </pre> 4111 * 4112 * <code>string worker_pool = 7 [deprecated = true];</code> 4113 * 4114 * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See 4115 * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1969 4116 * @return The bytes for workerPool. 4117 */ 4118 @java.lang.Deprecated getWorkerPoolBytes()4119 public com.google.protobuf.ByteString getWorkerPoolBytes() { 4120 java.lang.Object ref = workerPool_; 4121 if (ref instanceof String) { 4122 com.google.protobuf.ByteString b = 4123 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4124 workerPool_ = b; 4125 return b; 4126 } else { 4127 return (com.google.protobuf.ByteString) ref; 4128 } 4129 } 4130 /** 4131 * 4132 * 4133 * <pre> 4134 * This field deprecated; please use `pool.name` instead. 4135 * </pre> 4136 * 4137 * <code>string worker_pool = 7 [deprecated = true];</code> 4138 * 4139 * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See 4140 * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1969 4141 * @param value The workerPool to set. 4142 * @return This builder for chaining. 4143 */ 4144 @java.lang.Deprecated setWorkerPool(java.lang.String value)4145 public Builder setWorkerPool(java.lang.String value) { 4146 if (value == null) { 4147 throw new NullPointerException(); 4148 } 4149 workerPool_ = value; 4150 bitField0_ |= 0x00000080; 4151 onChanged(); 4152 return this; 4153 } 4154 /** 4155 * 4156 * 4157 * <pre> 4158 * This field deprecated; please use `pool.name` instead. 4159 * </pre> 4160 * 4161 * <code>string worker_pool = 7 [deprecated = true];</code> 4162 * 4163 * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See 4164 * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1969 4165 * @return This builder for chaining. 4166 */ 4167 @java.lang.Deprecated clearWorkerPool()4168 public Builder clearWorkerPool() { 4169 workerPool_ = getDefaultInstance().getWorkerPool(); 4170 bitField0_ = (bitField0_ & ~0x00000080); 4171 onChanged(); 4172 return this; 4173 } 4174 /** 4175 * 4176 * 4177 * <pre> 4178 * This field deprecated; please use `pool.name` instead. 4179 * </pre> 4180 * 4181 * <code>string worker_pool = 7 [deprecated = true];</code> 4182 * 4183 * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See 4184 * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1969 4185 * @param value The bytes for workerPool to set. 4186 * @return This builder for chaining. 4187 */ 4188 @java.lang.Deprecated setWorkerPoolBytes(com.google.protobuf.ByteString value)4189 public Builder setWorkerPoolBytes(com.google.protobuf.ByteString value) { 4190 if (value == null) { 4191 throw new NullPointerException(); 4192 } 4193 checkByteStringIsUtf8(value); 4194 workerPool_ = value; 4195 bitField0_ |= 0x00000080; 4196 onChanged(); 4197 return this; 4198 } 4199 4200 private com.google.cloudbuild.v1.BuildOptions.PoolOption pool_; 4201 private com.google.protobuf.SingleFieldBuilderV3< 4202 com.google.cloudbuild.v1.BuildOptions.PoolOption, 4203 com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder, 4204 com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder> 4205 poolBuilder_; 4206 /** 4207 * 4208 * 4209 * <pre> 4210 * Optional. Specification for execution on a `WorkerPool`. 4211 * See [running builds in a private 4212 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 4213 * for more information. 4214 * </pre> 4215 * 4216 * <code> 4217 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 4218 * </code> 4219 * 4220 * @return Whether the pool field is set. 4221 */ hasPool()4222 public boolean hasPool() { 4223 return ((bitField0_ & 0x00000100) != 0); 4224 } 4225 /** 4226 * 4227 * 4228 * <pre> 4229 * Optional. Specification for execution on a `WorkerPool`. 4230 * See [running builds in a private 4231 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 4232 * for more information. 4233 * </pre> 4234 * 4235 * <code> 4236 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 4237 * </code> 4238 * 4239 * @return The pool. 4240 */ getPool()4241 public com.google.cloudbuild.v1.BuildOptions.PoolOption getPool() { 4242 if (poolBuilder_ == null) { 4243 return pool_ == null 4244 ? com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance() 4245 : pool_; 4246 } else { 4247 return poolBuilder_.getMessage(); 4248 } 4249 } 4250 /** 4251 * 4252 * 4253 * <pre> 4254 * Optional. Specification for execution on a `WorkerPool`. 4255 * See [running builds in a private 4256 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 4257 * for more information. 4258 * </pre> 4259 * 4260 * <code> 4261 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 4262 * </code> 4263 */ setPool(com.google.cloudbuild.v1.BuildOptions.PoolOption value)4264 public Builder setPool(com.google.cloudbuild.v1.BuildOptions.PoolOption value) { 4265 if (poolBuilder_ == null) { 4266 if (value == null) { 4267 throw new NullPointerException(); 4268 } 4269 pool_ = value; 4270 } else { 4271 poolBuilder_.setMessage(value); 4272 } 4273 bitField0_ |= 0x00000100; 4274 onChanged(); 4275 return this; 4276 } 4277 /** 4278 * 4279 * 4280 * <pre> 4281 * Optional. Specification for execution on a `WorkerPool`. 4282 * See [running builds in a private 4283 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 4284 * for more information. 4285 * </pre> 4286 * 4287 * <code> 4288 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 4289 * </code> 4290 */ setPool( com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder builderForValue)4291 public Builder setPool( 4292 com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder builderForValue) { 4293 if (poolBuilder_ == null) { 4294 pool_ = builderForValue.build(); 4295 } else { 4296 poolBuilder_.setMessage(builderForValue.build()); 4297 } 4298 bitField0_ |= 0x00000100; 4299 onChanged(); 4300 return this; 4301 } 4302 /** 4303 * 4304 * 4305 * <pre> 4306 * Optional. Specification for execution on a `WorkerPool`. 4307 * See [running builds in a private 4308 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 4309 * for more information. 4310 * </pre> 4311 * 4312 * <code> 4313 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 4314 * </code> 4315 */ mergePool(com.google.cloudbuild.v1.BuildOptions.PoolOption value)4316 public Builder mergePool(com.google.cloudbuild.v1.BuildOptions.PoolOption value) { 4317 if (poolBuilder_ == null) { 4318 if (((bitField0_ & 0x00000100) != 0) 4319 && pool_ != null 4320 && pool_ != com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance()) { 4321 getPoolBuilder().mergeFrom(value); 4322 } else { 4323 pool_ = value; 4324 } 4325 } else { 4326 poolBuilder_.mergeFrom(value); 4327 } 4328 bitField0_ |= 0x00000100; 4329 onChanged(); 4330 return this; 4331 } 4332 /** 4333 * 4334 * 4335 * <pre> 4336 * Optional. Specification for execution on a `WorkerPool`. 4337 * See [running builds in a private 4338 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 4339 * for more information. 4340 * </pre> 4341 * 4342 * <code> 4343 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 4344 * </code> 4345 */ clearPool()4346 public Builder clearPool() { 4347 bitField0_ = (bitField0_ & ~0x00000100); 4348 pool_ = null; 4349 if (poolBuilder_ != null) { 4350 poolBuilder_.dispose(); 4351 poolBuilder_ = null; 4352 } 4353 onChanged(); 4354 return this; 4355 } 4356 /** 4357 * 4358 * 4359 * <pre> 4360 * Optional. Specification for execution on a `WorkerPool`. 4361 * See [running builds in a private 4362 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 4363 * for more information. 4364 * </pre> 4365 * 4366 * <code> 4367 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 4368 * </code> 4369 */ getPoolBuilder()4370 public com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder getPoolBuilder() { 4371 bitField0_ |= 0x00000100; 4372 onChanged(); 4373 return getPoolFieldBuilder().getBuilder(); 4374 } 4375 /** 4376 * 4377 * 4378 * <pre> 4379 * Optional. Specification for execution on a `WorkerPool`. 4380 * See [running builds in a private 4381 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 4382 * for more information. 4383 * </pre> 4384 * 4385 * <code> 4386 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 4387 * </code> 4388 */ getPoolOrBuilder()4389 public com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder getPoolOrBuilder() { 4390 if (poolBuilder_ != null) { 4391 return poolBuilder_.getMessageOrBuilder(); 4392 } else { 4393 return pool_ == null 4394 ? com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance() 4395 : pool_; 4396 } 4397 } 4398 /** 4399 * 4400 * 4401 * <pre> 4402 * Optional. Specification for execution on a `WorkerPool`. 4403 * See [running builds in a private 4404 * pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 4405 * for more information. 4406 * </pre> 4407 * 4408 * <code> 4409 * .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL]; 4410 * </code> 4411 */ 4412 private com.google.protobuf.SingleFieldBuilderV3< 4413 com.google.cloudbuild.v1.BuildOptions.PoolOption, 4414 com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder, 4415 com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder> getPoolFieldBuilder()4416 getPoolFieldBuilder() { 4417 if (poolBuilder_ == null) { 4418 poolBuilder_ = 4419 new com.google.protobuf.SingleFieldBuilderV3< 4420 com.google.cloudbuild.v1.BuildOptions.PoolOption, 4421 com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder, 4422 com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder>( 4423 getPool(), getParentForChildren(), isClean()); 4424 pool_ = null; 4425 } 4426 return poolBuilder_; 4427 } 4428 4429 private int logging_ = 0; 4430 /** 4431 * 4432 * 4433 * <pre> 4434 * Option to specify the logging mode, which determines if and where build 4435 * logs are stored. 4436 * </pre> 4437 * 4438 * <code>.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;</code> 4439 * 4440 * @return The enum numeric value on the wire for logging. 4441 */ 4442 @java.lang.Override getLoggingValue()4443 public int getLoggingValue() { 4444 return logging_; 4445 } 4446 /** 4447 * 4448 * 4449 * <pre> 4450 * Option to specify the logging mode, which determines if and where build 4451 * logs are stored. 4452 * </pre> 4453 * 4454 * <code>.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;</code> 4455 * 4456 * @param value The enum numeric value on the wire for logging to set. 4457 * @return This builder for chaining. 4458 */ setLoggingValue(int value)4459 public Builder setLoggingValue(int value) { 4460 logging_ = value; 4461 bitField0_ |= 0x00000200; 4462 onChanged(); 4463 return this; 4464 } 4465 /** 4466 * 4467 * 4468 * <pre> 4469 * Option to specify the logging mode, which determines if and where build 4470 * logs are stored. 4471 * </pre> 4472 * 4473 * <code>.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;</code> 4474 * 4475 * @return The logging. 4476 */ 4477 @java.lang.Override getLogging()4478 public com.google.cloudbuild.v1.BuildOptions.LoggingMode getLogging() { 4479 com.google.cloudbuild.v1.BuildOptions.LoggingMode result = 4480 com.google.cloudbuild.v1.BuildOptions.LoggingMode.forNumber(logging_); 4481 return result == null 4482 ? com.google.cloudbuild.v1.BuildOptions.LoggingMode.UNRECOGNIZED 4483 : result; 4484 } 4485 /** 4486 * 4487 * 4488 * <pre> 4489 * Option to specify the logging mode, which determines if and where build 4490 * logs are stored. 4491 * </pre> 4492 * 4493 * <code>.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;</code> 4494 * 4495 * @param value The logging to set. 4496 * @return This builder for chaining. 4497 */ setLogging(com.google.cloudbuild.v1.BuildOptions.LoggingMode value)4498 public Builder setLogging(com.google.cloudbuild.v1.BuildOptions.LoggingMode value) { 4499 if (value == null) { 4500 throw new NullPointerException(); 4501 } 4502 bitField0_ |= 0x00000200; 4503 logging_ = value.getNumber(); 4504 onChanged(); 4505 return this; 4506 } 4507 /** 4508 * 4509 * 4510 * <pre> 4511 * Option to specify the logging mode, which determines if and where build 4512 * logs are stored. 4513 * </pre> 4514 * 4515 * <code>.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;</code> 4516 * 4517 * @return This builder for chaining. 4518 */ clearLogging()4519 public Builder clearLogging() { 4520 bitField0_ = (bitField0_ & ~0x00000200); 4521 logging_ = 0; 4522 onChanged(); 4523 return this; 4524 } 4525 4526 private com.google.protobuf.LazyStringList env_ = com.google.protobuf.LazyStringArrayList.EMPTY; 4527 ensureEnvIsMutable()4528 private void ensureEnvIsMutable() { 4529 if (!((bitField0_ & 0x00000400) != 0)) { 4530 env_ = new com.google.protobuf.LazyStringArrayList(env_); 4531 bitField0_ |= 0x00000400; 4532 } 4533 } 4534 /** 4535 * 4536 * 4537 * <pre> 4538 * A list of global environment variable definitions that will exist for all 4539 * build steps in this build. If a variable is defined in both globally and in 4540 * a build step, the variable will use the build step value. 4541 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 4542 * being given the value "VALUE". 4543 * </pre> 4544 * 4545 * <code>repeated string env = 12;</code> 4546 * 4547 * @return A list containing the env. 4548 */ getEnvList()4549 public com.google.protobuf.ProtocolStringList getEnvList() { 4550 return env_.getUnmodifiableView(); 4551 } 4552 /** 4553 * 4554 * 4555 * <pre> 4556 * A list of global environment variable definitions that will exist for all 4557 * build steps in this build. If a variable is defined in both globally and in 4558 * a build step, the variable will use the build step value. 4559 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 4560 * being given the value "VALUE". 4561 * </pre> 4562 * 4563 * <code>repeated string env = 12;</code> 4564 * 4565 * @return The count of env. 4566 */ getEnvCount()4567 public int getEnvCount() { 4568 return env_.size(); 4569 } 4570 /** 4571 * 4572 * 4573 * <pre> 4574 * A list of global environment variable definitions that will exist for all 4575 * build steps in this build. If a variable is defined in both globally and in 4576 * a build step, the variable will use the build step value. 4577 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 4578 * being given the value "VALUE". 4579 * </pre> 4580 * 4581 * <code>repeated string env = 12;</code> 4582 * 4583 * @param index The index of the element to return. 4584 * @return The env at the given index. 4585 */ getEnv(int index)4586 public java.lang.String getEnv(int index) { 4587 return env_.get(index); 4588 } 4589 /** 4590 * 4591 * 4592 * <pre> 4593 * A list of global environment variable definitions that will exist for all 4594 * build steps in this build. If a variable is defined in both globally and in 4595 * a build step, the variable will use the build step value. 4596 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 4597 * being given the value "VALUE". 4598 * </pre> 4599 * 4600 * <code>repeated string env = 12;</code> 4601 * 4602 * @param index The index of the value to return. 4603 * @return The bytes of the env at the given index. 4604 */ getEnvBytes(int index)4605 public com.google.protobuf.ByteString getEnvBytes(int index) { 4606 return env_.getByteString(index); 4607 } 4608 /** 4609 * 4610 * 4611 * <pre> 4612 * A list of global environment variable definitions that will exist for all 4613 * build steps in this build. If a variable is defined in both globally and in 4614 * a build step, the variable will use the build step value. 4615 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 4616 * being given the value "VALUE". 4617 * </pre> 4618 * 4619 * <code>repeated string env = 12;</code> 4620 * 4621 * @param index The index to set the value at. 4622 * @param value The env to set. 4623 * @return This builder for chaining. 4624 */ setEnv(int index, java.lang.String value)4625 public Builder setEnv(int index, java.lang.String value) { 4626 if (value == null) { 4627 throw new NullPointerException(); 4628 } 4629 ensureEnvIsMutable(); 4630 env_.set(index, value); 4631 onChanged(); 4632 return this; 4633 } 4634 /** 4635 * 4636 * 4637 * <pre> 4638 * A list of global environment variable definitions that will exist for all 4639 * build steps in this build. If a variable is defined in both globally and in 4640 * a build step, the variable will use the build step value. 4641 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 4642 * being given the value "VALUE". 4643 * </pre> 4644 * 4645 * <code>repeated string env = 12;</code> 4646 * 4647 * @param value The env to add. 4648 * @return This builder for chaining. 4649 */ addEnv(java.lang.String value)4650 public Builder addEnv(java.lang.String value) { 4651 if (value == null) { 4652 throw new NullPointerException(); 4653 } 4654 ensureEnvIsMutable(); 4655 env_.add(value); 4656 onChanged(); 4657 return this; 4658 } 4659 /** 4660 * 4661 * 4662 * <pre> 4663 * A list of global environment variable definitions that will exist for all 4664 * build steps in this build. If a variable is defined in both globally and in 4665 * a build step, the variable will use the build step value. 4666 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 4667 * being given the value "VALUE". 4668 * </pre> 4669 * 4670 * <code>repeated string env = 12;</code> 4671 * 4672 * @param values The env to add. 4673 * @return This builder for chaining. 4674 */ addAllEnv(java.lang.Iterable<java.lang.String> values)4675 public Builder addAllEnv(java.lang.Iterable<java.lang.String> values) { 4676 ensureEnvIsMutable(); 4677 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, env_); 4678 onChanged(); 4679 return this; 4680 } 4681 /** 4682 * 4683 * 4684 * <pre> 4685 * A list of global environment variable definitions that will exist for all 4686 * build steps in this build. If a variable is defined in both globally and in 4687 * a build step, the variable will use the build step value. 4688 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 4689 * being given the value "VALUE". 4690 * </pre> 4691 * 4692 * <code>repeated string env = 12;</code> 4693 * 4694 * @return This builder for chaining. 4695 */ clearEnv()4696 public Builder clearEnv() { 4697 env_ = com.google.protobuf.LazyStringArrayList.EMPTY; 4698 bitField0_ = (bitField0_ & ~0x00000400); 4699 onChanged(); 4700 return this; 4701 } 4702 /** 4703 * 4704 * 4705 * <pre> 4706 * A list of global environment variable definitions that will exist for all 4707 * build steps in this build. If a variable is defined in both globally and in 4708 * a build step, the variable will use the build step value. 4709 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" 4710 * being given the value "VALUE". 4711 * </pre> 4712 * 4713 * <code>repeated string env = 12;</code> 4714 * 4715 * @param value The bytes of the env to add. 4716 * @return This builder for chaining. 4717 */ addEnvBytes(com.google.protobuf.ByteString value)4718 public Builder addEnvBytes(com.google.protobuf.ByteString value) { 4719 if (value == null) { 4720 throw new NullPointerException(); 4721 } 4722 checkByteStringIsUtf8(value); 4723 ensureEnvIsMutable(); 4724 env_.add(value); 4725 onChanged(); 4726 return this; 4727 } 4728 4729 private com.google.protobuf.LazyStringList secretEnv_ = 4730 com.google.protobuf.LazyStringArrayList.EMPTY; 4731 ensureSecretEnvIsMutable()4732 private void ensureSecretEnvIsMutable() { 4733 if (!((bitField0_ & 0x00000800) != 0)) { 4734 secretEnv_ = new com.google.protobuf.LazyStringArrayList(secretEnv_); 4735 bitField0_ |= 0x00000800; 4736 } 4737 } 4738 /** 4739 * 4740 * 4741 * <pre> 4742 * A list of global environment variables, which are encrypted using a Cloud 4743 * Key Management Service crypto key. These values must be specified in the 4744 * build's `Secret`. These variables will be available to all build steps 4745 * in this build. 4746 * </pre> 4747 * 4748 * <code>repeated string secret_env = 13;</code> 4749 * 4750 * @return A list containing the secretEnv. 4751 */ getSecretEnvList()4752 public com.google.protobuf.ProtocolStringList getSecretEnvList() { 4753 return secretEnv_.getUnmodifiableView(); 4754 } 4755 /** 4756 * 4757 * 4758 * <pre> 4759 * A list of global environment variables, which are encrypted using a Cloud 4760 * Key Management Service crypto key. These values must be specified in the 4761 * build's `Secret`. These variables will be available to all build steps 4762 * in this build. 4763 * </pre> 4764 * 4765 * <code>repeated string secret_env = 13;</code> 4766 * 4767 * @return The count of secretEnv. 4768 */ getSecretEnvCount()4769 public int getSecretEnvCount() { 4770 return secretEnv_.size(); 4771 } 4772 /** 4773 * 4774 * 4775 * <pre> 4776 * A list of global environment variables, which are encrypted using a Cloud 4777 * Key Management Service crypto key. These values must be specified in the 4778 * build's `Secret`. These variables will be available to all build steps 4779 * in this build. 4780 * </pre> 4781 * 4782 * <code>repeated string secret_env = 13;</code> 4783 * 4784 * @param index The index of the element to return. 4785 * @return The secretEnv at the given index. 4786 */ getSecretEnv(int index)4787 public java.lang.String getSecretEnv(int index) { 4788 return secretEnv_.get(index); 4789 } 4790 /** 4791 * 4792 * 4793 * <pre> 4794 * A list of global environment variables, which are encrypted using a Cloud 4795 * Key Management Service crypto key. These values must be specified in the 4796 * build's `Secret`. These variables will be available to all build steps 4797 * in this build. 4798 * </pre> 4799 * 4800 * <code>repeated string secret_env = 13;</code> 4801 * 4802 * @param index The index of the value to return. 4803 * @return The bytes of the secretEnv at the given index. 4804 */ getSecretEnvBytes(int index)4805 public com.google.protobuf.ByteString getSecretEnvBytes(int index) { 4806 return secretEnv_.getByteString(index); 4807 } 4808 /** 4809 * 4810 * 4811 * <pre> 4812 * A list of global environment variables, which are encrypted using a Cloud 4813 * Key Management Service crypto key. These values must be specified in the 4814 * build's `Secret`. These variables will be available to all build steps 4815 * in this build. 4816 * </pre> 4817 * 4818 * <code>repeated string secret_env = 13;</code> 4819 * 4820 * @param index The index to set the value at. 4821 * @param value The secretEnv to set. 4822 * @return This builder for chaining. 4823 */ setSecretEnv(int index, java.lang.String value)4824 public Builder setSecretEnv(int index, java.lang.String value) { 4825 if (value == null) { 4826 throw new NullPointerException(); 4827 } 4828 ensureSecretEnvIsMutable(); 4829 secretEnv_.set(index, value); 4830 onChanged(); 4831 return this; 4832 } 4833 /** 4834 * 4835 * 4836 * <pre> 4837 * A list of global environment variables, which are encrypted using a Cloud 4838 * Key Management Service crypto key. These values must be specified in the 4839 * build's `Secret`. These variables will be available to all build steps 4840 * in this build. 4841 * </pre> 4842 * 4843 * <code>repeated string secret_env = 13;</code> 4844 * 4845 * @param value The secretEnv to add. 4846 * @return This builder for chaining. 4847 */ addSecretEnv(java.lang.String value)4848 public Builder addSecretEnv(java.lang.String value) { 4849 if (value == null) { 4850 throw new NullPointerException(); 4851 } 4852 ensureSecretEnvIsMutable(); 4853 secretEnv_.add(value); 4854 onChanged(); 4855 return this; 4856 } 4857 /** 4858 * 4859 * 4860 * <pre> 4861 * A list of global environment variables, which are encrypted using a Cloud 4862 * Key Management Service crypto key. These values must be specified in the 4863 * build's `Secret`. These variables will be available to all build steps 4864 * in this build. 4865 * </pre> 4866 * 4867 * <code>repeated string secret_env = 13;</code> 4868 * 4869 * @param values The secretEnv to add. 4870 * @return This builder for chaining. 4871 */ addAllSecretEnv(java.lang.Iterable<java.lang.String> values)4872 public Builder addAllSecretEnv(java.lang.Iterable<java.lang.String> values) { 4873 ensureSecretEnvIsMutable(); 4874 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, secretEnv_); 4875 onChanged(); 4876 return this; 4877 } 4878 /** 4879 * 4880 * 4881 * <pre> 4882 * A list of global environment variables, which are encrypted using a Cloud 4883 * Key Management Service crypto key. These values must be specified in the 4884 * build's `Secret`. These variables will be available to all build steps 4885 * in this build. 4886 * </pre> 4887 * 4888 * <code>repeated string secret_env = 13;</code> 4889 * 4890 * @return This builder for chaining. 4891 */ clearSecretEnv()4892 public Builder clearSecretEnv() { 4893 secretEnv_ = com.google.protobuf.LazyStringArrayList.EMPTY; 4894 bitField0_ = (bitField0_ & ~0x00000800); 4895 onChanged(); 4896 return this; 4897 } 4898 /** 4899 * 4900 * 4901 * <pre> 4902 * A list of global environment variables, which are encrypted using a Cloud 4903 * Key Management Service crypto key. These values must be specified in the 4904 * build's `Secret`. These variables will be available to all build steps 4905 * in this build. 4906 * </pre> 4907 * 4908 * <code>repeated string secret_env = 13;</code> 4909 * 4910 * @param value The bytes of the secretEnv to add. 4911 * @return This builder for chaining. 4912 */ addSecretEnvBytes(com.google.protobuf.ByteString value)4913 public Builder addSecretEnvBytes(com.google.protobuf.ByteString value) { 4914 if (value == null) { 4915 throw new NullPointerException(); 4916 } 4917 checkByteStringIsUtf8(value); 4918 ensureSecretEnvIsMutable(); 4919 secretEnv_.add(value); 4920 onChanged(); 4921 return this; 4922 } 4923 4924 private java.util.List<com.google.cloudbuild.v1.Volume> volumes_ = 4925 java.util.Collections.emptyList(); 4926 ensureVolumesIsMutable()4927 private void ensureVolumesIsMutable() { 4928 if (!((bitField0_ & 0x00001000) != 0)) { 4929 volumes_ = new java.util.ArrayList<com.google.cloudbuild.v1.Volume>(volumes_); 4930 bitField0_ |= 0x00001000; 4931 } 4932 } 4933 4934 private com.google.protobuf.RepeatedFieldBuilderV3< 4935 com.google.cloudbuild.v1.Volume, 4936 com.google.cloudbuild.v1.Volume.Builder, 4937 com.google.cloudbuild.v1.VolumeOrBuilder> 4938 volumesBuilder_; 4939 4940 /** 4941 * 4942 * 4943 * <pre> 4944 * Global list of volumes to mount for ALL build steps 4945 * Each volume is created as an empty volume prior to starting the build 4946 * process. Upon completion of the build, volumes and their contents are 4947 * discarded. Global volume names and paths cannot conflict with the volumes 4948 * defined a build step. 4949 * Using a global volume in a build with only one step is not valid as 4950 * it is indicative of a build request with an incorrect configuration. 4951 * </pre> 4952 * 4953 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 4954 */ getVolumesList()4955 public java.util.List<com.google.cloudbuild.v1.Volume> getVolumesList() { 4956 if (volumesBuilder_ == null) { 4957 return java.util.Collections.unmodifiableList(volumes_); 4958 } else { 4959 return volumesBuilder_.getMessageList(); 4960 } 4961 } 4962 /** 4963 * 4964 * 4965 * <pre> 4966 * Global list of volumes to mount for ALL build steps 4967 * Each volume is created as an empty volume prior to starting the build 4968 * process. Upon completion of the build, volumes and their contents are 4969 * discarded. Global volume names and paths cannot conflict with the volumes 4970 * defined a build step. 4971 * Using a global volume in a build with only one step is not valid as 4972 * it is indicative of a build request with an incorrect configuration. 4973 * </pre> 4974 * 4975 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 4976 */ getVolumesCount()4977 public int getVolumesCount() { 4978 if (volumesBuilder_ == null) { 4979 return volumes_.size(); 4980 } else { 4981 return volumesBuilder_.getCount(); 4982 } 4983 } 4984 /** 4985 * 4986 * 4987 * <pre> 4988 * Global list of volumes to mount for ALL build steps 4989 * Each volume is created as an empty volume prior to starting the build 4990 * process. Upon completion of the build, volumes and their contents are 4991 * discarded. Global volume names and paths cannot conflict with the volumes 4992 * defined a build step. 4993 * Using a global volume in a build with only one step is not valid as 4994 * it is indicative of a build request with an incorrect configuration. 4995 * </pre> 4996 * 4997 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 4998 */ getVolumes(int index)4999 public com.google.cloudbuild.v1.Volume getVolumes(int index) { 5000 if (volumesBuilder_ == null) { 5001 return volumes_.get(index); 5002 } else { 5003 return volumesBuilder_.getMessage(index); 5004 } 5005 } 5006 /** 5007 * 5008 * 5009 * <pre> 5010 * Global list of volumes to mount for ALL build steps 5011 * Each volume is created as an empty volume prior to starting the build 5012 * process. Upon completion of the build, volumes and their contents are 5013 * discarded. Global volume names and paths cannot conflict with the volumes 5014 * defined a build step. 5015 * Using a global volume in a build with only one step is not valid as 5016 * it is indicative of a build request with an incorrect configuration. 5017 * </pre> 5018 * 5019 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5020 */ setVolumes(int index, com.google.cloudbuild.v1.Volume value)5021 public Builder setVolumes(int index, com.google.cloudbuild.v1.Volume value) { 5022 if (volumesBuilder_ == null) { 5023 if (value == null) { 5024 throw new NullPointerException(); 5025 } 5026 ensureVolumesIsMutable(); 5027 volumes_.set(index, value); 5028 onChanged(); 5029 } else { 5030 volumesBuilder_.setMessage(index, value); 5031 } 5032 return this; 5033 } 5034 /** 5035 * 5036 * 5037 * <pre> 5038 * Global list of volumes to mount for ALL build steps 5039 * Each volume is created as an empty volume prior to starting the build 5040 * process. Upon completion of the build, volumes and their contents are 5041 * discarded. Global volume names and paths cannot conflict with the volumes 5042 * defined a build step. 5043 * Using a global volume in a build with only one step is not valid as 5044 * it is indicative of a build request with an incorrect configuration. 5045 * </pre> 5046 * 5047 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5048 */ setVolumes(int index, com.google.cloudbuild.v1.Volume.Builder builderForValue)5049 public Builder setVolumes(int index, com.google.cloudbuild.v1.Volume.Builder builderForValue) { 5050 if (volumesBuilder_ == null) { 5051 ensureVolumesIsMutable(); 5052 volumes_.set(index, builderForValue.build()); 5053 onChanged(); 5054 } else { 5055 volumesBuilder_.setMessage(index, builderForValue.build()); 5056 } 5057 return this; 5058 } 5059 /** 5060 * 5061 * 5062 * <pre> 5063 * Global list of volumes to mount for ALL build steps 5064 * Each volume is created as an empty volume prior to starting the build 5065 * process. Upon completion of the build, volumes and their contents are 5066 * discarded. Global volume names and paths cannot conflict with the volumes 5067 * defined a build step. 5068 * Using a global volume in a build with only one step is not valid as 5069 * it is indicative of a build request with an incorrect configuration. 5070 * </pre> 5071 * 5072 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5073 */ addVolumes(com.google.cloudbuild.v1.Volume value)5074 public Builder addVolumes(com.google.cloudbuild.v1.Volume value) { 5075 if (volumesBuilder_ == null) { 5076 if (value == null) { 5077 throw new NullPointerException(); 5078 } 5079 ensureVolumesIsMutable(); 5080 volumes_.add(value); 5081 onChanged(); 5082 } else { 5083 volumesBuilder_.addMessage(value); 5084 } 5085 return this; 5086 } 5087 /** 5088 * 5089 * 5090 * <pre> 5091 * Global list of volumes to mount for ALL build steps 5092 * Each volume is created as an empty volume prior to starting the build 5093 * process. Upon completion of the build, volumes and their contents are 5094 * discarded. Global volume names and paths cannot conflict with the volumes 5095 * defined a build step. 5096 * Using a global volume in a build with only one step is not valid as 5097 * it is indicative of a build request with an incorrect configuration. 5098 * </pre> 5099 * 5100 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5101 */ addVolumes(int index, com.google.cloudbuild.v1.Volume value)5102 public Builder addVolumes(int index, com.google.cloudbuild.v1.Volume value) { 5103 if (volumesBuilder_ == null) { 5104 if (value == null) { 5105 throw new NullPointerException(); 5106 } 5107 ensureVolumesIsMutable(); 5108 volumes_.add(index, value); 5109 onChanged(); 5110 } else { 5111 volumesBuilder_.addMessage(index, value); 5112 } 5113 return this; 5114 } 5115 /** 5116 * 5117 * 5118 * <pre> 5119 * Global list of volumes to mount for ALL build steps 5120 * Each volume is created as an empty volume prior to starting the build 5121 * process. Upon completion of the build, volumes and their contents are 5122 * discarded. Global volume names and paths cannot conflict with the volumes 5123 * defined a build step. 5124 * Using a global volume in a build with only one step is not valid as 5125 * it is indicative of a build request with an incorrect configuration. 5126 * </pre> 5127 * 5128 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5129 */ addVolumes(com.google.cloudbuild.v1.Volume.Builder builderForValue)5130 public Builder addVolumes(com.google.cloudbuild.v1.Volume.Builder builderForValue) { 5131 if (volumesBuilder_ == null) { 5132 ensureVolumesIsMutable(); 5133 volumes_.add(builderForValue.build()); 5134 onChanged(); 5135 } else { 5136 volumesBuilder_.addMessage(builderForValue.build()); 5137 } 5138 return this; 5139 } 5140 /** 5141 * 5142 * 5143 * <pre> 5144 * Global list of volumes to mount for ALL build steps 5145 * Each volume is created as an empty volume prior to starting the build 5146 * process. Upon completion of the build, volumes and their contents are 5147 * discarded. Global volume names and paths cannot conflict with the volumes 5148 * defined a build step. 5149 * Using a global volume in a build with only one step is not valid as 5150 * it is indicative of a build request with an incorrect configuration. 5151 * </pre> 5152 * 5153 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5154 */ addVolumes(int index, com.google.cloudbuild.v1.Volume.Builder builderForValue)5155 public Builder addVolumes(int index, com.google.cloudbuild.v1.Volume.Builder builderForValue) { 5156 if (volumesBuilder_ == null) { 5157 ensureVolumesIsMutable(); 5158 volumes_.add(index, builderForValue.build()); 5159 onChanged(); 5160 } else { 5161 volumesBuilder_.addMessage(index, builderForValue.build()); 5162 } 5163 return this; 5164 } 5165 /** 5166 * 5167 * 5168 * <pre> 5169 * Global list of volumes to mount for ALL build steps 5170 * Each volume is created as an empty volume prior to starting the build 5171 * process. Upon completion of the build, volumes and their contents are 5172 * discarded. Global volume names and paths cannot conflict with the volumes 5173 * defined a build step. 5174 * Using a global volume in a build with only one step is not valid as 5175 * it is indicative of a build request with an incorrect configuration. 5176 * </pre> 5177 * 5178 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5179 */ addAllVolumes( java.lang.Iterable<? extends com.google.cloudbuild.v1.Volume> values)5180 public Builder addAllVolumes( 5181 java.lang.Iterable<? extends com.google.cloudbuild.v1.Volume> values) { 5182 if (volumesBuilder_ == null) { 5183 ensureVolumesIsMutable(); 5184 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, volumes_); 5185 onChanged(); 5186 } else { 5187 volumesBuilder_.addAllMessages(values); 5188 } 5189 return this; 5190 } 5191 /** 5192 * 5193 * 5194 * <pre> 5195 * Global list of volumes to mount for ALL build steps 5196 * Each volume is created as an empty volume prior to starting the build 5197 * process. Upon completion of the build, volumes and their contents are 5198 * discarded. Global volume names and paths cannot conflict with the volumes 5199 * defined a build step. 5200 * Using a global volume in a build with only one step is not valid as 5201 * it is indicative of a build request with an incorrect configuration. 5202 * </pre> 5203 * 5204 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5205 */ clearVolumes()5206 public Builder clearVolumes() { 5207 if (volumesBuilder_ == null) { 5208 volumes_ = java.util.Collections.emptyList(); 5209 bitField0_ = (bitField0_ & ~0x00001000); 5210 onChanged(); 5211 } else { 5212 volumesBuilder_.clear(); 5213 } 5214 return this; 5215 } 5216 /** 5217 * 5218 * 5219 * <pre> 5220 * Global list of volumes to mount for ALL build steps 5221 * Each volume is created as an empty volume prior to starting the build 5222 * process. Upon completion of the build, volumes and their contents are 5223 * discarded. Global volume names and paths cannot conflict with the volumes 5224 * defined a build step. 5225 * Using a global volume in a build with only one step is not valid as 5226 * it is indicative of a build request with an incorrect configuration. 5227 * </pre> 5228 * 5229 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5230 */ removeVolumes(int index)5231 public Builder removeVolumes(int index) { 5232 if (volumesBuilder_ == null) { 5233 ensureVolumesIsMutable(); 5234 volumes_.remove(index); 5235 onChanged(); 5236 } else { 5237 volumesBuilder_.remove(index); 5238 } 5239 return this; 5240 } 5241 /** 5242 * 5243 * 5244 * <pre> 5245 * Global list of volumes to mount for ALL build steps 5246 * Each volume is created as an empty volume prior to starting the build 5247 * process. Upon completion of the build, volumes and their contents are 5248 * discarded. Global volume names and paths cannot conflict with the volumes 5249 * defined a build step. 5250 * Using a global volume in a build with only one step is not valid as 5251 * it is indicative of a build request with an incorrect configuration. 5252 * </pre> 5253 * 5254 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5255 */ getVolumesBuilder(int index)5256 public com.google.cloudbuild.v1.Volume.Builder getVolumesBuilder(int index) { 5257 return getVolumesFieldBuilder().getBuilder(index); 5258 } 5259 /** 5260 * 5261 * 5262 * <pre> 5263 * Global list of volumes to mount for ALL build steps 5264 * Each volume is created as an empty volume prior to starting the build 5265 * process. Upon completion of the build, volumes and their contents are 5266 * discarded. Global volume names and paths cannot conflict with the volumes 5267 * defined a build step. 5268 * Using a global volume in a build with only one step is not valid as 5269 * it is indicative of a build request with an incorrect configuration. 5270 * </pre> 5271 * 5272 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5273 */ getVolumesOrBuilder(int index)5274 public com.google.cloudbuild.v1.VolumeOrBuilder getVolumesOrBuilder(int index) { 5275 if (volumesBuilder_ == null) { 5276 return volumes_.get(index); 5277 } else { 5278 return volumesBuilder_.getMessageOrBuilder(index); 5279 } 5280 } 5281 /** 5282 * 5283 * 5284 * <pre> 5285 * Global list of volumes to mount for ALL build steps 5286 * Each volume is created as an empty volume prior to starting the build 5287 * process. Upon completion of the build, volumes and their contents are 5288 * discarded. Global volume names and paths cannot conflict with the volumes 5289 * defined a build step. 5290 * Using a global volume in a build with only one step is not valid as 5291 * it is indicative of a build request with an incorrect configuration. 5292 * </pre> 5293 * 5294 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5295 */ 5296 public java.util.List<? extends com.google.cloudbuild.v1.VolumeOrBuilder> getVolumesOrBuilderList()5297 getVolumesOrBuilderList() { 5298 if (volumesBuilder_ != null) { 5299 return volumesBuilder_.getMessageOrBuilderList(); 5300 } else { 5301 return java.util.Collections.unmodifiableList(volumes_); 5302 } 5303 } 5304 /** 5305 * 5306 * 5307 * <pre> 5308 * Global list of volumes to mount for ALL build steps 5309 * Each volume is created as an empty volume prior to starting the build 5310 * process. Upon completion of the build, volumes and their contents are 5311 * discarded. Global volume names and paths cannot conflict with the volumes 5312 * defined a build step. 5313 * Using a global volume in a build with only one step is not valid as 5314 * it is indicative of a build request with an incorrect configuration. 5315 * </pre> 5316 * 5317 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5318 */ addVolumesBuilder()5319 public com.google.cloudbuild.v1.Volume.Builder addVolumesBuilder() { 5320 return getVolumesFieldBuilder() 5321 .addBuilder(com.google.cloudbuild.v1.Volume.getDefaultInstance()); 5322 } 5323 /** 5324 * 5325 * 5326 * <pre> 5327 * Global list of volumes to mount for ALL build steps 5328 * Each volume is created as an empty volume prior to starting the build 5329 * process. Upon completion of the build, volumes and their contents are 5330 * discarded. Global volume names and paths cannot conflict with the volumes 5331 * defined a build step. 5332 * Using a global volume in a build with only one step is not valid as 5333 * it is indicative of a build request with an incorrect configuration. 5334 * </pre> 5335 * 5336 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5337 */ addVolumesBuilder(int index)5338 public com.google.cloudbuild.v1.Volume.Builder addVolumesBuilder(int index) { 5339 return getVolumesFieldBuilder() 5340 .addBuilder(index, com.google.cloudbuild.v1.Volume.getDefaultInstance()); 5341 } 5342 /** 5343 * 5344 * 5345 * <pre> 5346 * Global list of volumes to mount for ALL build steps 5347 * Each volume is created as an empty volume prior to starting the build 5348 * process. Upon completion of the build, volumes and their contents are 5349 * discarded. Global volume names and paths cannot conflict with the volumes 5350 * defined a build step. 5351 * Using a global volume in a build with only one step is not valid as 5352 * it is indicative of a build request with an incorrect configuration. 5353 * </pre> 5354 * 5355 * <code>repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;</code> 5356 */ getVolumesBuilderList()5357 public java.util.List<com.google.cloudbuild.v1.Volume.Builder> getVolumesBuilderList() { 5358 return getVolumesFieldBuilder().getBuilderList(); 5359 } 5360 5361 private com.google.protobuf.RepeatedFieldBuilderV3< 5362 com.google.cloudbuild.v1.Volume, 5363 com.google.cloudbuild.v1.Volume.Builder, 5364 com.google.cloudbuild.v1.VolumeOrBuilder> getVolumesFieldBuilder()5365 getVolumesFieldBuilder() { 5366 if (volumesBuilder_ == null) { 5367 volumesBuilder_ = 5368 new com.google.protobuf.RepeatedFieldBuilderV3< 5369 com.google.cloudbuild.v1.Volume, 5370 com.google.cloudbuild.v1.Volume.Builder, 5371 com.google.cloudbuild.v1.VolumeOrBuilder>( 5372 volumes_, ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); 5373 volumes_ = null; 5374 } 5375 return volumesBuilder_; 5376 } 5377 5378 private int defaultLogsBucketBehavior_ = 0; 5379 /** 5380 * 5381 * 5382 * <pre> 5383 * Optional. Option to specify how default logs buckets are setup. 5384 * </pre> 5385 * 5386 * <code> 5387 * .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL]; 5388 * </code> 5389 * 5390 * @return The enum numeric value on the wire for defaultLogsBucketBehavior. 5391 */ 5392 @java.lang.Override getDefaultLogsBucketBehaviorValue()5393 public int getDefaultLogsBucketBehaviorValue() { 5394 return defaultLogsBucketBehavior_; 5395 } 5396 /** 5397 * 5398 * 5399 * <pre> 5400 * Optional. Option to specify how default logs buckets are setup. 5401 * </pre> 5402 * 5403 * <code> 5404 * .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL]; 5405 * </code> 5406 * 5407 * @param value The enum numeric value on the wire for defaultLogsBucketBehavior to set. 5408 * @return This builder for chaining. 5409 */ setDefaultLogsBucketBehaviorValue(int value)5410 public Builder setDefaultLogsBucketBehaviorValue(int value) { 5411 defaultLogsBucketBehavior_ = value; 5412 bitField0_ |= 0x00002000; 5413 onChanged(); 5414 return this; 5415 } 5416 /** 5417 * 5418 * 5419 * <pre> 5420 * Optional. Option to specify how default logs buckets are setup. 5421 * </pre> 5422 * 5423 * <code> 5424 * .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL]; 5425 * </code> 5426 * 5427 * @return The defaultLogsBucketBehavior. 5428 */ 5429 @java.lang.Override 5430 public com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior getDefaultLogsBucketBehavior()5431 getDefaultLogsBucketBehavior() { 5432 com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior result = 5433 com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior.forNumber( 5434 defaultLogsBucketBehavior_); 5435 return result == null 5436 ? com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior.UNRECOGNIZED 5437 : result; 5438 } 5439 /** 5440 * 5441 * 5442 * <pre> 5443 * Optional. Option to specify how default logs buckets are setup. 5444 * </pre> 5445 * 5446 * <code> 5447 * .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL]; 5448 * </code> 5449 * 5450 * @param value The defaultLogsBucketBehavior to set. 5451 * @return This builder for chaining. 5452 */ setDefaultLogsBucketBehavior( com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior value)5453 public Builder setDefaultLogsBucketBehavior( 5454 com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior value) { 5455 if (value == null) { 5456 throw new NullPointerException(); 5457 } 5458 bitField0_ |= 0x00002000; 5459 defaultLogsBucketBehavior_ = value.getNumber(); 5460 onChanged(); 5461 return this; 5462 } 5463 /** 5464 * 5465 * 5466 * <pre> 5467 * Optional. Option to specify how default logs buckets are setup. 5468 * </pre> 5469 * 5470 * <code> 5471 * .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL]; 5472 * </code> 5473 * 5474 * @return This builder for chaining. 5475 */ clearDefaultLogsBucketBehavior()5476 public Builder clearDefaultLogsBucketBehavior() { 5477 bitField0_ = (bitField0_ & ~0x00002000); 5478 defaultLogsBucketBehavior_ = 0; 5479 onChanged(); 5480 return this; 5481 } 5482 5483 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)5484 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 5485 return super.setUnknownFields(unknownFields); 5486 } 5487 5488 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5489 public final Builder mergeUnknownFields( 5490 final com.google.protobuf.UnknownFieldSet unknownFields) { 5491 return super.mergeUnknownFields(unknownFields); 5492 } 5493 5494 // @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.BuildOptions) 5495 } 5496 5497 // @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuildOptions) 5498 private static final com.google.cloudbuild.v1.BuildOptions DEFAULT_INSTANCE; 5499 5500 static { 5501 DEFAULT_INSTANCE = new com.google.cloudbuild.v1.BuildOptions(); 5502 } 5503 getDefaultInstance()5504 public static com.google.cloudbuild.v1.BuildOptions getDefaultInstance() { 5505 return DEFAULT_INSTANCE; 5506 } 5507 5508 private static final com.google.protobuf.Parser<BuildOptions> PARSER = 5509 new com.google.protobuf.AbstractParser<BuildOptions>() { 5510 @java.lang.Override 5511 public BuildOptions parsePartialFrom( 5512 com.google.protobuf.CodedInputStream input, 5513 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5514 throws com.google.protobuf.InvalidProtocolBufferException { 5515 Builder builder = newBuilder(); 5516 try { 5517 builder.mergeFrom(input, extensionRegistry); 5518 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 5519 throw e.setUnfinishedMessage(builder.buildPartial()); 5520 } catch (com.google.protobuf.UninitializedMessageException e) { 5521 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 5522 } catch (java.io.IOException e) { 5523 throw new com.google.protobuf.InvalidProtocolBufferException(e) 5524 .setUnfinishedMessage(builder.buildPartial()); 5525 } 5526 return builder.buildPartial(); 5527 } 5528 }; 5529 parser()5530 public static com.google.protobuf.Parser<BuildOptions> parser() { 5531 return PARSER; 5532 } 5533 5534 @java.lang.Override getParserForType()5535 public com.google.protobuf.Parser<BuildOptions> getParserForType() { 5536 return PARSER; 5537 } 5538 5539 @java.lang.Override getDefaultInstanceForType()5540 public com.google.cloudbuild.v1.BuildOptions getDefaultInstanceForType() { 5541 return DEFAULT_INSTANCE; 5542 } 5543 } 5544