1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/compute/v1/compute.proto 18 19 package com.google.cloud.compute.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Represents a Resource Policy resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can use them to schedule persistent disk snapshots. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.ResourcePolicy} 29 */ 30 public final class ResourcePolicy extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.ResourcePolicy) 33 ResourcePolicyOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ResourcePolicy.newBuilder() to construct. ResourcePolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ResourcePolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ResourcePolicy()40 private ResourcePolicy() { 41 creationTimestamp_ = ""; 42 description_ = ""; 43 kind_ = ""; 44 name_ = ""; 45 region_ = ""; 46 selfLink_ = ""; 47 status_ = ""; 48 } 49 50 @java.lang.Override 51 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)52 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 53 return new ResourcePolicy(); 54 } 55 56 @java.lang.Override getUnknownFields()57 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 58 return this.unknownFields; 59 } 60 getDescriptor()61 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 62 return com.google.cloud.compute.v1.Compute 63 .internal_static_google_cloud_compute_v1_ResourcePolicy_descriptor; 64 } 65 66 @java.lang.Override 67 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()68 internalGetFieldAccessorTable() { 69 return com.google.cloud.compute.v1.Compute 70 .internal_static_google_cloud_compute_v1_ResourcePolicy_fieldAccessorTable 71 .ensureFieldAccessorsInitialized( 72 com.google.cloud.compute.v1.ResourcePolicy.class, 73 com.google.cloud.compute.v1.ResourcePolicy.Builder.class); 74 } 75 76 /** 77 * 78 * 79 * <pre> 80 * [Output Only] The status of resource policy creation. 81 * </pre> 82 * 83 * Protobuf enum {@code google.cloud.compute.v1.ResourcePolicy.Status} 84 */ 85 public enum Status implements com.google.protobuf.ProtocolMessageEnum { 86 /** 87 * 88 * 89 * <pre> 90 * A value indicating that the enum field is not set. 91 * </pre> 92 * 93 * <code>UNDEFINED_STATUS = 0;</code> 94 */ 95 UNDEFINED_STATUS(0), 96 /** 97 * 98 * 99 * <pre> 100 * Resource policy is being created. 101 * </pre> 102 * 103 * <code>CREATING = 455564985;</code> 104 */ 105 CREATING(455564985), 106 /** 107 * 108 * 109 * <pre> 110 * Resource policy is being deleted. 111 * </pre> 112 * 113 * <code>DELETING = 528602024;</code> 114 */ 115 DELETING(528602024), 116 /** 117 * 118 * 119 * <pre> 120 * Resource policy is expired and will not run again. 121 * </pre> 122 * 123 * <code>EXPIRED = 482489093;</code> 124 */ 125 EXPIRED(482489093), 126 /** <code>INVALID = 530283991;</code> */ 127 INVALID(530283991), 128 /** 129 * 130 * 131 * <pre> 132 * Resource policy is ready to be used. 133 * </pre> 134 * 135 * <code>READY = 77848963;</code> 136 */ 137 READY(77848963), 138 UNRECOGNIZED(-1), 139 ; 140 141 /** 142 * 143 * 144 * <pre> 145 * A value indicating that the enum field is not set. 146 * </pre> 147 * 148 * <code>UNDEFINED_STATUS = 0;</code> 149 */ 150 public static final int UNDEFINED_STATUS_VALUE = 0; 151 /** 152 * 153 * 154 * <pre> 155 * Resource policy is being created. 156 * </pre> 157 * 158 * <code>CREATING = 455564985;</code> 159 */ 160 public static final int CREATING_VALUE = 455564985; 161 /** 162 * 163 * 164 * <pre> 165 * Resource policy is being deleted. 166 * </pre> 167 * 168 * <code>DELETING = 528602024;</code> 169 */ 170 public static final int DELETING_VALUE = 528602024; 171 /** 172 * 173 * 174 * <pre> 175 * Resource policy is expired and will not run again. 176 * </pre> 177 * 178 * <code>EXPIRED = 482489093;</code> 179 */ 180 public static final int EXPIRED_VALUE = 482489093; 181 /** <code>INVALID = 530283991;</code> */ 182 public static final int INVALID_VALUE = 530283991; 183 /** 184 * 185 * 186 * <pre> 187 * Resource policy is ready to be used. 188 * </pre> 189 * 190 * <code>READY = 77848963;</code> 191 */ 192 public static final int READY_VALUE = 77848963; 193 getNumber()194 public final int getNumber() { 195 if (this == UNRECOGNIZED) { 196 throw new java.lang.IllegalArgumentException( 197 "Can't get the number of an unknown enum value."); 198 } 199 return value; 200 } 201 202 /** 203 * @param value The numeric wire value of the corresponding enum entry. 204 * @return The enum associated with the given numeric wire value. 205 * @deprecated Use {@link #forNumber(int)} instead. 206 */ 207 @java.lang.Deprecated valueOf(int value)208 public static Status valueOf(int value) { 209 return forNumber(value); 210 } 211 212 /** 213 * @param value The numeric wire value of the corresponding enum entry. 214 * @return The enum associated with the given numeric wire value. 215 */ forNumber(int value)216 public static Status forNumber(int value) { 217 switch (value) { 218 case 0: 219 return UNDEFINED_STATUS; 220 case 455564985: 221 return CREATING; 222 case 528602024: 223 return DELETING; 224 case 482489093: 225 return EXPIRED; 226 case 530283991: 227 return INVALID; 228 case 77848963: 229 return READY; 230 default: 231 return null; 232 } 233 } 234 internalGetValueMap()235 public static com.google.protobuf.Internal.EnumLiteMap<Status> internalGetValueMap() { 236 return internalValueMap; 237 } 238 239 private static final com.google.protobuf.Internal.EnumLiteMap<Status> internalValueMap = 240 new com.google.protobuf.Internal.EnumLiteMap<Status>() { 241 public Status findValueByNumber(int number) { 242 return Status.forNumber(number); 243 } 244 }; 245 getValueDescriptor()246 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 247 if (this == UNRECOGNIZED) { 248 throw new java.lang.IllegalStateException( 249 "Can't get the descriptor of an unrecognized enum value."); 250 } 251 return getDescriptor().getValues().get(ordinal()); 252 } 253 getDescriptorForType()254 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 255 return getDescriptor(); 256 } 257 getDescriptor()258 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 259 return com.google.cloud.compute.v1.ResourcePolicy.getDescriptor().getEnumTypes().get(0); 260 } 261 262 private static final Status[] VALUES = values(); 263 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)264 public static Status valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 265 if (desc.getType() != getDescriptor()) { 266 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 267 } 268 if (desc.getIndex() == -1) { 269 return UNRECOGNIZED; 270 } 271 return VALUES[desc.getIndex()]; 272 } 273 274 private final int value; 275 Status(int value)276 private Status(int value) { 277 this.value = value; 278 } 279 280 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.ResourcePolicy.Status) 281 } 282 283 private int bitField0_; 284 public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366; 285 286 @SuppressWarnings("serial") 287 private volatile java.lang.Object creationTimestamp_ = ""; 288 /** 289 * 290 * 291 * <pre> 292 * [Output Only] Creation timestamp in RFC3339 text format. 293 * </pre> 294 * 295 * <code>optional string creation_timestamp = 30525366;</code> 296 * 297 * @return Whether the creationTimestamp field is set. 298 */ 299 @java.lang.Override hasCreationTimestamp()300 public boolean hasCreationTimestamp() { 301 return ((bitField0_ & 0x00000001) != 0); 302 } 303 /** 304 * 305 * 306 * <pre> 307 * [Output Only] Creation timestamp in RFC3339 text format. 308 * </pre> 309 * 310 * <code>optional string creation_timestamp = 30525366;</code> 311 * 312 * @return The creationTimestamp. 313 */ 314 @java.lang.Override getCreationTimestamp()315 public java.lang.String getCreationTimestamp() { 316 java.lang.Object ref = creationTimestamp_; 317 if (ref instanceof java.lang.String) { 318 return (java.lang.String) ref; 319 } else { 320 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 321 java.lang.String s = bs.toStringUtf8(); 322 creationTimestamp_ = s; 323 return s; 324 } 325 } 326 /** 327 * 328 * 329 * <pre> 330 * [Output Only] Creation timestamp in RFC3339 text format. 331 * </pre> 332 * 333 * <code>optional string creation_timestamp = 30525366;</code> 334 * 335 * @return The bytes for creationTimestamp. 336 */ 337 @java.lang.Override getCreationTimestampBytes()338 public com.google.protobuf.ByteString getCreationTimestampBytes() { 339 java.lang.Object ref = creationTimestamp_; 340 if (ref instanceof java.lang.String) { 341 com.google.protobuf.ByteString b = 342 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 343 creationTimestamp_ = b; 344 return b; 345 } else { 346 return (com.google.protobuf.ByteString) ref; 347 } 348 } 349 350 public static final int DESCRIPTION_FIELD_NUMBER = 422937596; 351 352 @SuppressWarnings("serial") 353 private volatile java.lang.Object description_ = ""; 354 /** 355 * <code>optional string description = 422937596;</code> 356 * 357 * @return Whether the description field is set. 358 */ 359 @java.lang.Override hasDescription()360 public boolean hasDescription() { 361 return ((bitField0_ & 0x00000002) != 0); 362 } 363 /** 364 * <code>optional string description = 422937596;</code> 365 * 366 * @return The description. 367 */ 368 @java.lang.Override getDescription()369 public java.lang.String getDescription() { 370 java.lang.Object ref = description_; 371 if (ref instanceof java.lang.String) { 372 return (java.lang.String) ref; 373 } else { 374 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 375 java.lang.String s = bs.toStringUtf8(); 376 description_ = s; 377 return s; 378 } 379 } 380 /** 381 * <code>optional string description = 422937596;</code> 382 * 383 * @return The bytes for description. 384 */ 385 @java.lang.Override getDescriptionBytes()386 public com.google.protobuf.ByteString getDescriptionBytes() { 387 java.lang.Object ref = description_; 388 if (ref instanceof java.lang.String) { 389 com.google.protobuf.ByteString b = 390 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 391 description_ = b; 392 return b; 393 } else { 394 return (com.google.protobuf.ByteString) ref; 395 } 396 } 397 398 public static final int GROUP_PLACEMENT_POLICY_FIELD_NUMBER = 10931596; 399 private com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy groupPlacementPolicy_; 400 /** 401 * 402 * 403 * <pre> 404 * Resource policy for instances for placement configuration. 405 * </pre> 406 * 407 * <code> 408 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 409 * </code> 410 * 411 * @return Whether the groupPlacementPolicy field is set. 412 */ 413 @java.lang.Override hasGroupPlacementPolicy()414 public boolean hasGroupPlacementPolicy() { 415 return ((bitField0_ & 0x00000004) != 0); 416 } 417 /** 418 * 419 * 420 * <pre> 421 * Resource policy for instances for placement configuration. 422 * </pre> 423 * 424 * <code> 425 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 426 * </code> 427 * 428 * @return The groupPlacementPolicy. 429 */ 430 @java.lang.Override getGroupPlacementPolicy()431 public com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy getGroupPlacementPolicy() { 432 return groupPlacementPolicy_ == null 433 ? com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.getDefaultInstance() 434 : groupPlacementPolicy_; 435 } 436 /** 437 * 438 * 439 * <pre> 440 * Resource policy for instances for placement configuration. 441 * </pre> 442 * 443 * <code> 444 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 445 * </code> 446 */ 447 @java.lang.Override 448 public com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicyOrBuilder getGroupPlacementPolicyOrBuilder()449 getGroupPlacementPolicyOrBuilder() { 450 return groupPlacementPolicy_ == null 451 ? com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.getDefaultInstance() 452 : groupPlacementPolicy_; 453 } 454 455 public static final int ID_FIELD_NUMBER = 3355; 456 private long id_ = 0L; 457 /** 458 * 459 * 460 * <pre> 461 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 462 * </pre> 463 * 464 * <code>optional uint64 id = 3355;</code> 465 * 466 * @return Whether the id field is set. 467 */ 468 @java.lang.Override hasId()469 public boolean hasId() { 470 return ((bitField0_ & 0x00000008) != 0); 471 } 472 /** 473 * 474 * 475 * <pre> 476 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 477 * </pre> 478 * 479 * <code>optional uint64 id = 3355;</code> 480 * 481 * @return The id. 482 */ 483 @java.lang.Override getId()484 public long getId() { 485 return id_; 486 } 487 488 public static final int INSTANCE_SCHEDULE_POLICY_FIELD_NUMBER = 344877104; 489 private com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instanceSchedulePolicy_; 490 /** 491 * 492 * 493 * <pre> 494 * Resource policy for scheduling instance operations. 495 * </pre> 496 * 497 * <code> 498 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 499 * </code> 500 * 501 * @return Whether the instanceSchedulePolicy field is set. 502 */ 503 @java.lang.Override hasInstanceSchedulePolicy()504 public boolean hasInstanceSchedulePolicy() { 505 return ((bitField0_ & 0x00000010) != 0); 506 } 507 /** 508 * 509 * 510 * <pre> 511 * Resource policy for scheduling instance operations. 512 * </pre> 513 * 514 * <code> 515 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 516 * </code> 517 * 518 * @return The instanceSchedulePolicy. 519 */ 520 @java.lang.Override 521 public com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy getInstanceSchedulePolicy()522 getInstanceSchedulePolicy() { 523 return instanceSchedulePolicy_ == null 524 ? com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.getDefaultInstance() 525 : instanceSchedulePolicy_; 526 } 527 /** 528 * 529 * 530 * <pre> 531 * Resource policy for scheduling instance operations. 532 * </pre> 533 * 534 * <code> 535 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 536 * </code> 537 */ 538 @java.lang.Override 539 public com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyOrBuilder getInstanceSchedulePolicyOrBuilder()540 getInstanceSchedulePolicyOrBuilder() { 541 return instanceSchedulePolicy_ == null 542 ? com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.getDefaultInstance() 543 : instanceSchedulePolicy_; 544 } 545 546 public static final int KIND_FIELD_NUMBER = 3292052; 547 548 @SuppressWarnings("serial") 549 private volatile java.lang.Object kind_ = ""; 550 /** 551 * 552 * 553 * <pre> 554 * [Output Only] Type of the resource. Always compute#resource_policies for resource policies. 555 * </pre> 556 * 557 * <code>optional string kind = 3292052;</code> 558 * 559 * @return Whether the kind field is set. 560 */ 561 @java.lang.Override hasKind()562 public boolean hasKind() { 563 return ((bitField0_ & 0x00000020) != 0); 564 } 565 /** 566 * 567 * 568 * <pre> 569 * [Output Only] Type of the resource. Always compute#resource_policies for resource policies. 570 * </pre> 571 * 572 * <code>optional string kind = 3292052;</code> 573 * 574 * @return The kind. 575 */ 576 @java.lang.Override getKind()577 public java.lang.String getKind() { 578 java.lang.Object ref = kind_; 579 if (ref instanceof java.lang.String) { 580 return (java.lang.String) ref; 581 } else { 582 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 583 java.lang.String s = bs.toStringUtf8(); 584 kind_ = s; 585 return s; 586 } 587 } 588 /** 589 * 590 * 591 * <pre> 592 * [Output Only] Type of the resource. Always compute#resource_policies for resource policies. 593 * </pre> 594 * 595 * <code>optional string kind = 3292052;</code> 596 * 597 * @return The bytes for kind. 598 */ 599 @java.lang.Override getKindBytes()600 public com.google.protobuf.ByteString getKindBytes() { 601 java.lang.Object ref = kind_; 602 if (ref instanceof java.lang.String) { 603 com.google.protobuf.ByteString b = 604 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 605 kind_ = b; 606 return b; 607 } else { 608 return (com.google.protobuf.ByteString) ref; 609 } 610 } 611 612 public static final int NAME_FIELD_NUMBER = 3373707; 613 614 @SuppressWarnings("serial") 615 private volatile java.lang.Object name_ = ""; 616 /** 617 * 618 * 619 * <pre> 620 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 621 * </pre> 622 * 623 * <code>optional string name = 3373707;</code> 624 * 625 * @return Whether the name field is set. 626 */ 627 @java.lang.Override hasName()628 public boolean hasName() { 629 return ((bitField0_ & 0x00000040) != 0); 630 } 631 /** 632 * 633 * 634 * <pre> 635 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 636 * </pre> 637 * 638 * <code>optional string name = 3373707;</code> 639 * 640 * @return The name. 641 */ 642 @java.lang.Override getName()643 public java.lang.String getName() { 644 java.lang.Object ref = name_; 645 if (ref instanceof java.lang.String) { 646 return (java.lang.String) ref; 647 } else { 648 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 649 java.lang.String s = bs.toStringUtf8(); 650 name_ = s; 651 return s; 652 } 653 } 654 /** 655 * 656 * 657 * <pre> 658 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 659 * </pre> 660 * 661 * <code>optional string name = 3373707;</code> 662 * 663 * @return The bytes for name. 664 */ 665 @java.lang.Override getNameBytes()666 public com.google.protobuf.ByteString getNameBytes() { 667 java.lang.Object ref = name_; 668 if (ref instanceof java.lang.String) { 669 com.google.protobuf.ByteString b = 670 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 671 name_ = b; 672 return b; 673 } else { 674 return (com.google.protobuf.ByteString) ref; 675 } 676 } 677 678 public static final int REGION_FIELD_NUMBER = 138946292; 679 680 @SuppressWarnings("serial") 681 private volatile java.lang.Object region_ = ""; 682 /** 683 * <code>optional string region = 138946292;</code> 684 * 685 * @return Whether the region field is set. 686 */ 687 @java.lang.Override hasRegion()688 public boolean hasRegion() { 689 return ((bitField0_ & 0x00000080) != 0); 690 } 691 /** 692 * <code>optional string region = 138946292;</code> 693 * 694 * @return The region. 695 */ 696 @java.lang.Override getRegion()697 public java.lang.String getRegion() { 698 java.lang.Object ref = region_; 699 if (ref instanceof java.lang.String) { 700 return (java.lang.String) ref; 701 } else { 702 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 703 java.lang.String s = bs.toStringUtf8(); 704 region_ = s; 705 return s; 706 } 707 } 708 /** 709 * <code>optional string region = 138946292;</code> 710 * 711 * @return The bytes for region. 712 */ 713 @java.lang.Override getRegionBytes()714 public com.google.protobuf.ByteString getRegionBytes() { 715 java.lang.Object ref = region_; 716 if (ref instanceof java.lang.String) { 717 com.google.protobuf.ByteString b = 718 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 719 region_ = b; 720 return b; 721 } else { 722 return (com.google.protobuf.ByteString) ref; 723 } 724 } 725 726 public static final int RESOURCE_STATUS_FIELD_NUMBER = 249429315; 727 private com.google.cloud.compute.v1.ResourcePolicyResourceStatus resourceStatus_; 728 /** 729 * 730 * 731 * <pre> 732 * [Output Only] The system status of the resource policy. 733 * </pre> 734 * 735 * <code> 736 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 737 * </code> 738 * 739 * @return Whether the resourceStatus field is set. 740 */ 741 @java.lang.Override hasResourceStatus()742 public boolean hasResourceStatus() { 743 return ((bitField0_ & 0x00000100) != 0); 744 } 745 /** 746 * 747 * 748 * <pre> 749 * [Output Only] The system status of the resource policy. 750 * </pre> 751 * 752 * <code> 753 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 754 * </code> 755 * 756 * @return The resourceStatus. 757 */ 758 @java.lang.Override getResourceStatus()759 public com.google.cloud.compute.v1.ResourcePolicyResourceStatus getResourceStatus() { 760 return resourceStatus_ == null 761 ? com.google.cloud.compute.v1.ResourcePolicyResourceStatus.getDefaultInstance() 762 : resourceStatus_; 763 } 764 /** 765 * 766 * 767 * <pre> 768 * [Output Only] The system status of the resource policy. 769 * </pre> 770 * 771 * <code> 772 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 773 * </code> 774 */ 775 @java.lang.Override 776 public com.google.cloud.compute.v1.ResourcePolicyResourceStatusOrBuilder getResourceStatusOrBuilder()777 getResourceStatusOrBuilder() { 778 return resourceStatus_ == null 779 ? com.google.cloud.compute.v1.ResourcePolicyResourceStatus.getDefaultInstance() 780 : resourceStatus_; 781 } 782 783 public static final int SELF_LINK_FIELD_NUMBER = 456214797; 784 785 @SuppressWarnings("serial") 786 private volatile java.lang.Object selfLink_ = ""; 787 /** 788 * 789 * 790 * <pre> 791 * [Output Only] Server-defined fully-qualified URL for this resource. 792 * </pre> 793 * 794 * <code>optional string self_link = 456214797;</code> 795 * 796 * @return Whether the selfLink field is set. 797 */ 798 @java.lang.Override hasSelfLink()799 public boolean hasSelfLink() { 800 return ((bitField0_ & 0x00000200) != 0); 801 } 802 /** 803 * 804 * 805 * <pre> 806 * [Output Only] Server-defined fully-qualified URL for this resource. 807 * </pre> 808 * 809 * <code>optional string self_link = 456214797;</code> 810 * 811 * @return The selfLink. 812 */ 813 @java.lang.Override getSelfLink()814 public java.lang.String getSelfLink() { 815 java.lang.Object ref = selfLink_; 816 if (ref instanceof java.lang.String) { 817 return (java.lang.String) ref; 818 } else { 819 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 820 java.lang.String s = bs.toStringUtf8(); 821 selfLink_ = s; 822 return s; 823 } 824 } 825 /** 826 * 827 * 828 * <pre> 829 * [Output Only] Server-defined fully-qualified URL for this resource. 830 * </pre> 831 * 832 * <code>optional string self_link = 456214797;</code> 833 * 834 * @return The bytes for selfLink. 835 */ 836 @java.lang.Override getSelfLinkBytes()837 public com.google.protobuf.ByteString getSelfLinkBytes() { 838 java.lang.Object ref = selfLink_; 839 if (ref instanceof java.lang.String) { 840 com.google.protobuf.ByteString b = 841 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 842 selfLink_ = b; 843 return b; 844 } else { 845 return (com.google.protobuf.ByteString) ref; 846 } 847 } 848 849 public static final int SNAPSHOT_SCHEDULE_POLICY_FIELD_NUMBER = 218131295; 850 private com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshotSchedulePolicy_; 851 /** 852 * 853 * 854 * <pre> 855 * Resource policy for persistent disks for creating snapshots. 856 * </pre> 857 * 858 * <code> 859 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 860 * </code> 861 * 862 * @return Whether the snapshotSchedulePolicy field is set. 863 */ 864 @java.lang.Override hasSnapshotSchedulePolicy()865 public boolean hasSnapshotSchedulePolicy() { 866 return ((bitField0_ & 0x00000400) != 0); 867 } 868 /** 869 * 870 * 871 * <pre> 872 * Resource policy for persistent disks for creating snapshots. 873 * </pre> 874 * 875 * <code> 876 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 877 * </code> 878 * 879 * @return The snapshotSchedulePolicy. 880 */ 881 @java.lang.Override 882 public com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy getSnapshotSchedulePolicy()883 getSnapshotSchedulePolicy() { 884 return snapshotSchedulePolicy_ == null 885 ? com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.getDefaultInstance() 886 : snapshotSchedulePolicy_; 887 } 888 /** 889 * 890 * 891 * <pre> 892 * Resource policy for persistent disks for creating snapshots. 893 * </pre> 894 * 895 * <code> 896 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 897 * </code> 898 */ 899 @java.lang.Override 900 public com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyOrBuilder getSnapshotSchedulePolicyOrBuilder()901 getSnapshotSchedulePolicyOrBuilder() { 902 return snapshotSchedulePolicy_ == null 903 ? com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.getDefaultInstance() 904 : snapshotSchedulePolicy_; 905 } 906 907 public static final int STATUS_FIELD_NUMBER = 181260274; 908 909 @SuppressWarnings("serial") 910 private volatile java.lang.Object status_ = ""; 911 /** 912 * 913 * 914 * <pre> 915 * [Output Only] The status of resource policy creation. 916 * Check the Status enum for the list of possible values. 917 * </pre> 918 * 919 * <code>optional string status = 181260274;</code> 920 * 921 * @return Whether the status field is set. 922 */ 923 @java.lang.Override hasStatus()924 public boolean hasStatus() { 925 return ((bitField0_ & 0x00000800) != 0); 926 } 927 /** 928 * 929 * 930 * <pre> 931 * [Output Only] The status of resource policy creation. 932 * Check the Status enum for the list of possible values. 933 * </pre> 934 * 935 * <code>optional string status = 181260274;</code> 936 * 937 * @return The status. 938 */ 939 @java.lang.Override getStatus()940 public java.lang.String getStatus() { 941 java.lang.Object ref = status_; 942 if (ref instanceof java.lang.String) { 943 return (java.lang.String) ref; 944 } else { 945 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 946 java.lang.String s = bs.toStringUtf8(); 947 status_ = s; 948 return s; 949 } 950 } 951 /** 952 * 953 * 954 * <pre> 955 * [Output Only] The status of resource policy creation. 956 * Check the Status enum for the list of possible values. 957 * </pre> 958 * 959 * <code>optional string status = 181260274;</code> 960 * 961 * @return The bytes for status. 962 */ 963 @java.lang.Override getStatusBytes()964 public com.google.protobuf.ByteString getStatusBytes() { 965 java.lang.Object ref = status_; 966 if (ref instanceof java.lang.String) { 967 com.google.protobuf.ByteString b = 968 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 969 status_ = b; 970 return b; 971 } else { 972 return (com.google.protobuf.ByteString) ref; 973 } 974 } 975 976 private byte memoizedIsInitialized = -1; 977 978 @java.lang.Override isInitialized()979 public final boolean isInitialized() { 980 byte isInitialized = memoizedIsInitialized; 981 if (isInitialized == 1) return true; 982 if (isInitialized == 0) return false; 983 984 memoizedIsInitialized = 1; 985 return true; 986 } 987 988 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)989 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 990 if (((bitField0_ & 0x00000008) != 0)) { 991 output.writeUInt64(3355, id_); 992 } 993 if (((bitField0_ & 0x00000020) != 0)) { 994 com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_); 995 } 996 if (((bitField0_ & 0x00000040) != 0)) { 997 com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); 998 } 999 if (((bitField0_ & 0x00000004) != 0)) { 1000 output.writeMessage(10931596, getGroupPlacementPolicy()); 1001 } 1002 if (((bitField0_ & 0x00000001) != 0)) { 1003 com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_); 1004 } 1005 if (((bitField0_ & 0x00000080) != 0)) { 1006 com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_); 1007 } 1008 if (((bitField0_ & 0x00000800) != 0)) { 1009 com.google.protobuf.GeneratedMessageV3.writeString(output, 181260274, status_); 1010 } 1011 if (((bitField0_ & 0x00000400) != 0)) { 1012 output.writeMessage(218131295, getSnapshotSchedulePolicy()); 1013 } 1014 if (((bitField0_ & 0x00000100) != 0)) { 1015 output.writeMessage(249429315, getResourceStatus()); 1016 } 1017 if (((bitField0_ & 0x00000010) != 0)) { 1018 output.writeMessage(344877104, getInstanceSchedulePolicy()); 1019 } 1020 if (((bitField0_ & 0x00000002) != 0)) { 1021 com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); 1022 } 1023 if (((bitField0_ & 0x00000200) != 0)) { 1024 com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); 1025 } 1026 getUnknownFields().writeTo(output); 1027 } 1028 1029 @java.lang.Override getSerializedSize()1030 public int getSerializedSize() { 1031 int size = memoizedSize; 1032 if (size != -1) return size; 1033 1034 size = 0; 1035 if (((bitField0_ & 0x00000008) != 0)) { 1036 size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_); 1037 } 1038 if (((bitField0_ & 0x00000020) != 0)) { 1039 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_); 1040 } 1041 if (((bitField0_ & 0x00000040) != 0)) { 1042 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); 1043 } 1044 if (((bitField0_ & 0x00000004) != 0)) { 1045 size += 1046 com.google.protobuf.CodedOutputStream.computeMessageSize( 1047 10931596, getGroupPlacementPolicy()); 1048 } 1049 if (((bitField0_ & 0x00000001) != 0)) { 1050 size += 1051 com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_); 1052 } 1053 if (((bitField0_ & 0x00000080) != 0)) { 1054 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_); 1055 } 1056 if (((bitField0_ & 0x00000800) != 0)) { 1057 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(181260274, status_); 1058 } 1059 if (((bitField0_ & 0x00000400) != 0)) { 1060 size += 1061 com.google.protobuf.CodedOutputStream.computeMessageSize( 1062 218131295, getSnapshotSchedulePolicy()); 1063 } 1064 if (((bitField0_ & 0x00000100) != 0)) { 1065 size += 1066 com.google.protobuf.CodedOutputStream.computeMessageSize(249429315, getResourceStatus()); 1067 } 1068 if (((bitField0_ & 0x00000010) != 0)) { 1069 size += 1070 com.google.protobuf.CodedOutputStream.computeMessageSize( 1071 344877104, getInstanceSchedulePolicy()); 1072 } 1073 if (((bitField0_ & 0x00000002) != 0)) { 1074 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); 1075 } 1076 if (((bitField0_ & 0x00000200) != 0)) { 1077 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); 1078 } 1079 size += getUnknownFields().getSerializedSize(); 1080 memoizedSize = size; 1081 return size; 1082 } 1083 1084 @java.lang.Override equals(final java.lang.Object obj)1085 public boolean equals(final java.lang.Object obj) { 1086 if (obj == this) { 1087 return true; 1088 } 1089 if (!(obj instanceof com.google.cloud.compute.v1.ResourcePolicy)) { 1090 return super.equals(obj); 1091 } 1092 com.google.cloud.compute.v1.ResourcePolicy other = 1093 (com.google.cloud.compute.v1.ResourcePolicy) obj; 1094 1095 if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; 1096 if (hasCreationTimestamp()) { 1097 if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false; 1098 } 1099 if (hasDescription() != other.hasDescription()) return false; 1100 if (hasDescription()) { 1101 if (!getDescription().equals(other.getDescription())) return false; 1102 } 1103 if (hasGroupPlacementPolicy() != other.hasGroupPlacementPolicy()) return false; 1104 if (hasGroupPlacementPolicy()) { 1105 if (!getGroupPlacementPolicy().equals(other.getGroupPlacementPolicy())) return false; 1106 } 1107 if (hasId() != other.hasId()) return false; 1108 if (hasId()) { 1109 if (getId() != other.getId()) return false; 1110 } 1111 if (hasInstanceSchedulePolicy() != other.hasInstanceSchedulePolicy()) return false; 1112 if (hasInstanceSchedulePolicy()) { 1113 if (!getInstanceSchedulePolicy().equals(other.getInstanceSchedulePolicy())) return false; 1114 } 1115 if (hasKind() != other.hasKind()) return false; 1116 if (hasKind()) { 1117 if (!getKind().equals(other.getKind())) return false; 1118 } 1119 if (hasName() != other.hasName()) return false; 1120 if (hasName()) { 1121 if (!getName().equals(other.getName())) return false; 1122 } 1123 if (hasRegion() != other.hasRegion()) return false; 1124 if (hasRegion()) { 1125 if (!getRegion().equals(other.getRegion())) return false; 1126 } 1127 if (hasResourceStatus() != other.hasResourceStatus()) return false; 1128 if (hasResourceStatus()) { 1129 if (!getResourceStatus().equals(other.getResourceStatus())) return false; 1130 } 1131 if (hasSelfLink() != other.hasSelfLink()) return false; 1132 if (hasSelfLink()) { 1133 if (!getSelfLink().equals(other.getSelfLink())) return false; 1134 } 1135 if (hasSnapshotSchedulePolicy() != other.hasSnapshotSchedulePolicy()) return false; 1136 if (hasSnapshotSchedulePolicy()) { 1137 if (!getSnapshotSchedulePolicy().equals(other.getSnapshotSchedulePolicy())) return false; 1138 } 1139 if (hasStatus() != other.hasStatus()) return false; 1140 if (hasStatus()) { 1141 if (!getStatus().equals(other.getStatus())) return false; 1142 } 1143 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1144 return true; 1145 } 1146 1147 @java.lang.Override hashCode()1148 public int hashCode() { 1149 if (memoizedHashCode != 0) { 1150 return memoizedHashCode; 1151 } 1152 int hash = 41; 1153 hash = (19 * hash) + getDescriptor().hashCode(); 1154 if (hasCreationTimestamp()) { 1155 hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; 1156 hash = (53 * hash) + getCreationTimestamp().hashCode(); 1157 } 1158 if (hasDescription()) { 1159 hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; 1160 hash = (53 * hash) + getDescription().hashCode(); 1161 } 1162 if (hasGroupPlacementPolicy()) { 1163 hash = (37 * hash) + GROUP_PLACEMENT_POLICY_FIELD_NUMBER; 1164 hash = (53 * hash) + getGroupPlacementPolicy().hashCode(); 1165 } 1166 if (hasId()) { 1167 hash = (37 * hash) + ID_FIELD_NUMBER; 1168 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); 1169 } 1170 if (hasInstanceSchedulePolicy()) { 1171 hash = (37 * hash) + INSTANCE_SCHEDULE_POLICY_FIELD_NUMBER; 1172 hash = (53 * hash) + getInstanceSchedulePolicy().hashCode(); 1173 } 1174 if (hasKind()) { 1175 hash = (37 * hash) + KIND_FIELD_NUMBER; 1176 hash = (53 * hash) + getKind().hashCode(); 1177 } 1178 if (hasName()) { 1179 hash = (37 * hash) + NAME_FIELD_NUMBER; 1180 hash = (53 * hash) + getName().hashCode(); 1181 } 1182 if (hasRegion()) { 1183 hash = (37 * hash) + REGION_FIELD_NUMBER; 1184 hash = (53 * hash) + getRegion().hashCode(); 1185 } 1186 if (hasResourceStatus()) { 1187 hash = (37 * hash) + RESOURCE_STATUS_FIELD_NUMBER; 1188 hash = (53 * hash) + getResourceStatus().hashCode(); 1189 } 1190 if (hasSelfLink()) { 1191 hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; 1192 hash = (53 * hash) + getSelfLink().hashCode(); 1193 } 1194 if (hasSnapshotSchedulePolicy()) { 1195 hash = (37 * hash) + SNAPSHOT_SCHEDULE_POLICY_FIELD_NUMBER; 1196 hash = (53 * hash) + getSnapshotSchedulePolicy().hashCode(); 1197 } 1198 if (hasStatus()) { 1199 hash = (37 * hash) + STATUS_FIELD_NUMBER; 1200 hash = (53 * hash) + getStatus().hashCode(); 1201 } 1202 hash = (29 * hash) + getUnknownFields().hashCode(); 1203 memoizedHashCode = hash; 1204 return hash; 1205 } 1206 parseFrom(java.nio.ByteBuffer data)1207 public static com.google.cloud.compute.v1.ResourcePolicy parseFrom(java.nio.ByteBuffer data) 1208 throws com.google.protobuf.InvalidProtocolBufferException { 1209 return PARSER.parseFrom(data); 1210 } 1211 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1212 public static com.google.cloud.compute.v1.ResourcePolicy parseFrom( 1213 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1214 throws com.google.protobuf.InvalidProtocolBufferException { 1215 return PARSER.parseFrom(data, extensionRegistry); 1216 } 1217 parseFrom( com.google.protobuf.ByteString data)1218 public static com.google.cloud.compute.v1.ResourcePolicy parseFrom( 1219 com.google.protobuf.ByteString data) 1220 throws com.google.protobuf.InvalidProtocolBufferException { 1221 return PARSER.parseFrom(data); 1222 } 1223 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1224 public static com.google.cloud.compute.v1.ResourcePolicy parseFrom( 1225 com.google.protobuf.ByteString data, 1226 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1227 throws com.google.protobuf.InvalidProtocolBufferException { 1228 return PARSER.parseFrom(data, extensionRegistry); 1229 } 1230 parseFrom(byte[] data)1231 public static com.google.cloud.compute.v1.ResourcePolicy parseFrom(byte[] data) 1232 throws com.google.protobuf.InvalidProtocolBufferException { 1233 return PARSER.parseFrom(data); 1234 } 1235 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1236 public static com.google.cloud.compute.v1.ResourcePolicy parseFrom( 1237 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1238 throws com.google.protobuf.InvalidProtocolBufferException { 1239 return PARSER.parseFrom(data, extensionRegistry); 1240 } 1241 parseFrom(java.io.InputStream input)1242 public static com.google.cloud.compute.v1.ResourcePolicy parseFrom(java.io.InputStream input) 1243 throws java.io.IOException { 1244 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1245 } 1246 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1247 public static com.google.cloud.compute.v1.ResourcePolicy parseFrom( 1248 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1249 throws java.io.IOException { 1250 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1251 PARSER, input, extensionRegistry); 1252 } 1253 parseDelimitedFrom( java.io.InputStream input)1254 public static com.google.cloud.compute.v1.ResourcePolicy parseDelimitedFrom( 1255 java.io.InputStream input) throws java.io.IOException { 1256 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1257 } 1258 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1259 public static com.google.cloud.compute.v1.ResourcePolicy parseDelimitedFrom( 1260 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1261 throws java.io.IOException { 1262 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1263 PARSER, input, extensionRegistry); 1264 } 1265 parseFrom( com.google.protobuf.CodedInputStream input)1266 public static com.google.cloud.compute.v1.ResourcePolicy parseFrom( 1267 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1268 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1269 } 1270 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1271 public static com.google.cloud.compute.v1.ResourcePolicy parseFrom( 1272 com.google.protobuf.CodedInputStream input, 1273 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1274 throws java.io.IOException { 1275 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1276 PARSER, input, extensionRegistry); 1277 } 1278 1279 @java.lang.Override newBuilderForType()1280 public Builder newBuilderForType() { 1281 return newBuilder(); 1282 } 1283 newBuilder()1284 public static Builder newBuilder() { 1285 return DEFAULT_INSTANCE.toBuilder(); 1286 } 1287 newBuilder(com.google.cloud.compute.v1.ResourcePolicy prototype)1288 public static Builder newBuilder(com.google.cloud.compute.v1.ResourcePolicy prototype) { 1289 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1290 } 1291 1292 @java.lang.Override toBuilder()1293 public Builder toBuilder() { 1294 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1295 } 1296 1297 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1298 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1299 Builder builder = new Builder(parent); 1300 return builder; 1301 } 1302 /** 1303 * 1304 * 1305 * <pre> 1306 * Represents a Resource Policy resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can use them to schedule persistent disk snapshots. 1307 * </pre> 1308 * 1309 * Protobuf type {@code google.cloud.compute.v1.ResourcePolicy} 1310 */ 1311 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1312 implements 1313 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.ResourcePolicy) 1314 com.google.cloud.compute.v1.ResourcePolicyOrBuilder { getDescriptor()1315 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1316 return com.google.cloud.compute.v1.Compute 1317 .internal_static_google_cloud_compute_v1_ResourcePolicy_descriptor; 1318 } 1319 1320 @java.lang.Override 1321 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1322 internalGetFieldAccessorTable() { 1323 return com.google.cloud.compute.v1.Compute 1324 .internal_static_google_cloud_compute_v1_ResourcePolicy_fieldAccessorTable 1325 .ensureFieldAccessorsInitialized( 1326 com.google.cloud.compute.v1.ResourcePolicy.class, 1327 com.google.cloud.compute.v1.ResourcePolicy.Builder.class); 1328 } 1329 1330 // Construct using com.google.cloud.compute.v1.ResourcePolicy.newBuilder() Builder()1331 private Builder() { 1332 maybeForceBuilderInitialization(); 1333 } 1334 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1335 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1336 super(parent); 1337 maybeForceBuilderInitialization(); 1338 } 1339 maybeForceBuilderInitialization()1340 private void maybeForceBuilderInitialization() { 1341 if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { 1342 getGroupPlacementPolicyFieldBuilder(); 1343 getInstanceSchedulePolicyFieldBuilder(); 1344 getResourceStatusFieldBuilder(); 1345 getSnapshotSchedulePolicyFieldBuilder(); 1346 } 1347 } 1348 1349 @java.lang.Override clear()1350 public Builder clear() { 1351 super.clear(); 1352 bitField0_ = 0; 1353 creationTimestamp_ = ""; 1354 description_ = ""; 1355 groupPlacementPolicy_ = null; 1356 if (groupPlacementPolicyBuilder_ != null) { 1357 groupPlacementPolicyBuilder_.dispose(); 1358 groupPlacementPolicyBuilder_ = null; 1359 } 1360 id_ = 0L; 1361 instanceSchedulePolicy_ = null; 1362 if (instanceSchedulePolicyBuilder_ != null) { 1363 instanceSchedulePolicyBuilder_.dispose(); 1364 instanceSchedulePolicyBuilder_ = null; 1365 } 1366 kind_ = ""; 1367 name_ = ""; 1368 region_ = ""; 1369 resourceStatus_ = null; 1370 if (resourceStatusBuilder_ != null) { 1371 resourceStatusBuilder_.dispose(); 1372 resourceStatusBuilder_ = null; 1373 } 1374 selfLink_ = ""; 1375 snapshotSchedulePolicy_ = null; 1376 if (snapshotSchedulePolicyBuilder_ != null) { 1377 snapshotSchedulePolicyBuilder_.dispose(); 1378 snapshotSchedulePolicyBuilder_ = null; 1379 } 1380 status_ = ""; 1381 return this; 1382 } 1383 1384 @java.lang.Override getDescriptorForType()1385 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1386 return com.google.cloud.compute.v1.Compute 1387 .internal_static_google_cloud_compute_v1_ResourcePolicy_descriptor; 1388 } 1389 1390 @java.lang.Override getDefaultInstanceForType()1391 public com.google.cloud.compute.v1.ResourcePolicy getDefaultInstanceForType() { 1392 return com.google.cloud.compute.v1.ResourcePolicy.getDefaultInstance(); 1393 } 1394 1395 @java.lang.Override build()1396 public com.google.cloud.compute.v1.ResourcePolicy build() { 1397 com.google.cloud.compute.v1.ResourcePolicy result = buildPartial(); 1398 if (!result.isInitialized()) { 1399 throw newUninitializedMessageException(result); 1400 } 1401 return result; 1402 } 1403 1404 @java.lang.Override buildPartial()1405 public com.google.cloud.compute.v1.ResourcePolicy buildPartial() { 1406 com.google.cloud.compute.v1.ResourcePolicy result = 1407 new com.google.cloud.compute.v1.ResourcePolicy(this); 1408 if (bitField0_ != 0) { 1409 buildPartial0(result); 1410 } 1411 onBuilt(); 1412 return result; 1413 } 1414 buildPartial0(com.google.cloud.compute.v1.ResourcePolicy result)1415 private void buildPartial0(com.google.cloud.compute.v1.ResourcePolicy result) { 1416 int from_bitField0_ = bitField0_; 1417 int to_bitField0_ = 0; 1418 if (((from_bitField0_ & 0x00000001) != 0)) { 1419 result.creationTimestamp_ = creationTimestamp_; 1420 to_bitField0_ |= 0x00000001; 1421 } 1422 if (((from_bitField0_ & 0x00000002) != 0)) { 1423 result.description_ = description_; 1424 to_bitField0_ |= 0x00000002; 1425 } 1426 if (((from_bitField0_ & 0x00000004) != 0)) { 1427 result.groupPlacementPolicy_ = 1428 groupPlacementPolicyBuilder_ == null 1429 ? groupPlacementPolicy_ 1430 : groupPlacementPolicyBuilder_.build(); 1431 to_bitField0_ |= 0x00000004; 1432 } 1433 if (((from_bitField0_ & 0x00000008) != 0)) { 1434 result.id_ = id_; 1435 to_bitField0_ |= 0x00000008; 1436 } 1437 if (((from_bitField0_ & 0x00000010) != 0)) { 1438 result.instanceSchedulePolicy_ = 1439 instanceSchedulePolicyBuilder_ == null 1440 ? instanceSchedulePolicy_ 1441 : instanceSchedulePolicyBuilder_.build(); 1442 to_bitField0_ |= 0x00000010; 1443 } 1444 if (((from_bitField0_ & 0x00000020) != 0)) { 1445 result.kind_ = kind_; 1446 to_bitField0_ |= 0x00000020; 1447 } 1448 if (((from_bitField0_ & 0x00000040) != 0)) { 1449 result.name_ = name_; 1450 to_bitField0_ |= 0x00000040; 1451 } 1452 if (((from_bitField0_ & 0x00000080) != 0)) { 1453 result.region_ = region_; 1454 to_bitField0_ |= 0x00000080; 1455 } 1456 if (((from_bitField0_ & 0x00000100) != 0)) { 1457 result.resourceStatus_ = 1458 resourceStatusBuilder_ == null ? resourceStatus_ : resourceStatusBuilder_.build(); 1459 to_bitField0_ |= 0x00000100; 1460 } 1461 if (((from_bitField0_ & 0x00000200) != 0)) { 1462 result.selfLink_ = selfLink_; 1463 to_bitField0_ |= 0x00000200; 1464 } 1465 if (((from_bitField0_ & 0x00000400) != 0)) { 1466 result.snapshotSchedulePolicy_ = 1467 snapshotSchedulePolicyBuilder_ == null 1468 ? snapshotSchedulePolicy_ 1469 : snapshotSchedulePolicyBuilder_.build(); 1470 to_bitField0_ |= 0x00000400; 1471 } 1472 if (((from_bitField0_ & 0x00000800) != 0)) { 1473 result.status_ = status_; 1474 to_bitField0_ |= 0x00000800; 1475 } 1476 result.bitField0_ |= to_bitField0_; 1477 } 1478 1479 @java.lang.Override clone()1480 public Builder clone() { 1481 return super.clone(); 1482 } 1483 1484 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1485 public Builder setField( 1486 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1487 return super.setField(field, value); 1488 } 1489 1490 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1491 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1492 return super.clearField(field); 1493 } 1494 1495 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1496 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1497 return super.clearOneof(oneof); 1498 } 1499 1500 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1501 public Builder setRepeatedField( 1502 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1503 return super.setRepeatedField(field, index, value); 1504 } 1505 1506 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1507 public Builder addRepeatedField( 1508 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1509 return super.addRepeatedField(field, value); 1510 } 1511 1512 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1513 public Builder mergeFrom(com.google.protobuf.Message other) { 1514 if (other instanceof com.google.cloud.compute.v1.ResourcePolicy) { 1515 return mergeFrom((com.google.cloud.compute.v1.ResourcePolicy) other); 1516 } else { 1517 super.mergeFrom(other); 1518 return this; 1519 } 1520 } 1521 mergeFrom(com.google.cloud.compute.v1.ResourcePolicy other)1522 public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePolicy other) { 1523 if (other == com.google.cloud.compute.v1.ResourcePolicy.getDefaultInstance()) return this; 1524 if (other.hasCreationTimestamp()) { 1525 creationTimestamp_ = other.creationTimestamp_; 1526 bitField0_ |= 0x00000001; 1527 onChanged(); 1528 } 1529 if (other.hasDescription()) { 1530 description_ = other.description_; 1531 bitField0_ |= 0x00000002; 1532 onChanged(); 1533 } 1534 if (other.hasGroupPlacementPolicy()) { 1535 mergeGroupPlacementPolicy(other.getGroupPlacementPolicy()); 1536 } 1537 if (other.hasId()) { 1538 setId(other.getId()); 1539 } 1540 if (other.hasInstanceSchedulePolicy()) { 1541 mergeInstanceSchedulePolicy(other.getInstanceSchedulePolicy()); 1542 } 1543 if (other.hasKind()) { 1544 kind_ = other.kind_; 1545 bitField0_ |= 0x00000020; 1546 onChanged(); 1547 } 1548 if (other.hasName()) { 1549 name_ = other.name_; 1550 bitField0_ |= 0x00000040; 1551 onChanged(); 1552 } 1553 if (other.hasRegion()) { 1554 region_ = other.region_; 1555 bitField0_ |= 0x00000080; 1556 onChanged(); 1557 } 1558 if (other.hasResourceStatus()) { 1559 mergeResourceStatus(other.getResourceStatus()); 1560 } 1561 if (other.hasSelfLink()) { 1562 selfLink_ = other.selfLink_; 1563 bitField0_ |= 0x00000200; 1564 onChanged(); 1565 } 1566 if (other.hasSnapshotSchedulePolicy()) { 1567 mergeSnapshotSchedulePolicy(other.getSnapshotSchedulePolicy()); 1568 } 1569 if (other.hasStatus()) { 1570 status_ = other.status_; 1571 bitField0_ |= 0x00000800; 1572 onChanged(); 1573 } 1574 this.mergeUnknownFields(other.getUnknownFields()); 1575 onChanged(); 1576 return this; 1577 } 1578 1579 @java.lang.Override isInitialized()1580 public final boolean isInitialized() { 1581 return true; 1582 } 1583 1584 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1585 public Builder mergeFrom( 1586 com.google.protobuf.CodedInputStream input, 1587 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1588 throws java.io.IOException { 1589 if (extensionRegistry == null) { 1590 throw new java.lang.NullPointerException(); 1591 } 1592 try { 1593 boolean done = false; 1594 while (!done) { 1595 int tag = input.readTag(); 1596 switch (tag) { 1597 case 0: 1598 done = true; 1599 break; 1600 case 26840: 1601 { 1602 id_ = input.readUInt64(); 1603 bitField0_ |= 0x00000008; 1604 break; 1605 } // case 26840 1606 case 26336418: 1607 { 1608 kind_ = input.readStringRequireUtf8(); 1609 bitField0_ |= 0x00000020; 1610 break; 1611 } // case 26336418 1612 case 26989658: 1613 { 1614 name_ = input.readStringRequireUtf8(); 1615 bitField0_ |= 0x00000040; 1616 break; 1617 } // case 26989658 1618 case 87452770: 1619 { 1620 input.readMessage( 1621 getGroupPlacementPolicyFieldBuilder().getBuilder(), extensionRegistry); 1622 bitField0_ |= 0x00000004; 1623 break; 1624 } // case 87452770 1625 case 244202930: 1626 { 1627 creationTimestamp_ = input.readStringRequireUtf8(); 1628 bitField0_ |= 0x00000001; 1629 break; 1630 } // case 244202930 1631 case 1111570338: 1632 { 1633 region_ = input.readStringRequireUtf8(); 1634 bitField0_ |= 0x00000080; 1635 break; 1636 } // case 1111570338 1637 case 1450082194: 1638 { 1639 status_ = input.readStringRequireUtf8(); 1640 bitField0_ |= 0x00000800; 1641 break; 1642 } // case 1450082194 1643 case 1745050362: 1644 { 1645 input.readMessage( 1646 getSnapshotSchedulePolicyFieldBuilder().getBuilder(), extensionRegistry); 1647 bitField0_ |= 0x00000400; 1648 break; 1649 } // case 1745050362 1650 case 1995434522: 1651 { 1652 input.readMessage(getResourceStatusFieldBuilder().getBuilder(), extensionRegistry); 1653 bitField0_ |= 0x00000100; 1654 break; 1655 } // case 1995434522 1656 case -1535950462: 1657 { 1658 input.readMessage( 1659 getInstanceSchedulePolicyFieldBuilder().getBuilder(), extensionRegistry); 1660 bitField0_ |= 0x00000010; 1661 break; 1662 } // case -1535950462 1663 case -911466526: 1664 { 1665 description_ = input.readStringRequireUtf8(); 1666 bitField0_ |= 0x00000002; 1667 break; 1668 } // case -911466526 1669 case -645248918: 1670 { 1671 selfLink_ = input.readStringRequireUtf8(); 1672 bitField0_ |= 0x00000200; 1673 break; 1674 } // case -645248918 1675 default: 1676 { 1677 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1678 done = true; // was an endgroup tag 1679 } 1680 break; 1681 } // default: 1682 } // switch (tag) 1683 } // while (!done) 1684 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1685 throw e.unwrapIOException(); 1686 } finally { 1687 onChanged(); 1688 } // finally 1689 return this; 1690 } 1691 1692 private int bitField0_; 1693 1694 private java.lang.Object creationTimestamp_ = ""; 1695 /** 1696 * 1697 * 1698 * <pre> 1699 * [Output Only] Creation timestamp in RFC3339 text format. 1700 * </pre> 1701 * 1702 * <code>optional string creation_timestamp = 30525366;</code> 1703 * 1704 * @return Whether the creationTimestamp field is set. 1705 */ hasCreationTimestamp()1706 public boolean hasCreationTimestamp() { 1707 return ((bitField0_ & 0x00000001) != 0); 1708 } 1709 /** 1710 * 1711 * 1712 * <pre> 1713 * [Output Only] Creation timestamp in RFC3339 text format. 1714 * </pre> 1715 * 1716 * <code>optional string creation_timestamp = 30525366;</code> 1717 * 1718 * @return The creationTimestamp. 1719 */ getCreationTimestamp()1720 public java.lang.String getCreationTimestamp() { 1721 java.lang.Object ref = creationTimestamp_; 1722 if (!(ref instanceof java.lang.String)) { 1723 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1724 java.lang.String s = bs.toStringUtf8(); 1725 creationTimestamp_ = s; 1726 return s; 1727 } else { 1728 return (java.lang.String) ref; 1729 } 1730 } 1731 /** 1732 * 1733 * 1734 * <pre> 1735 * [Output Only] Creation timestamp in RFC3339 text format. 1736 * </pre> 1737 * 1738 * <code>optional string creation_timestamp = 30525366;</code> 1739 * 1740 * @return The bytes for creationTimestamp. 1741 */ getCreationTimestampBytes()1742 public com.google.protobuf.ByteString getCreationTimestampBytes() { 1743 java.lang.Object ref = creationTimestamp_; 1744 if (ref instanceof String) { 1745 com.google.protobuf.ByteString b = 1746 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1747 creationTimestamp_ = b; 1748 return b; 1749 } else { 1750 return (com.google.protobuf.ByteString) ref; 1751 } 1752 } 1753 /** 1754 * 1755 * 1756 * <pre> 1757 * [Output Only] Creation timestamp in RFC3339 text format. 1758 * </pre> 1759 * 1760 * <code>optional string creation_timestamp = 30525366;</code> 1761 * 1762 * @param value The creationTimestamp to set. 1763 * @return This builder for chaining. 1764 */ setCreationTimestamp(java.lang.String value)1765 public Builder setCreationTimestamp(java.lang.String value) { 1766 if (value == null) { 1767 throw new NullPointerException(); 1768 } 1769 creationTimestamp_ = value; 1770 bitField0_ |= 0x00000001; 1771 onChanged(); 1772 return this; 1773 } 1774 /** 1775 * 1776 * 1777 * <pre> 1778 * [Output Only] Creation timestamp in RFC3339 text format. 1779 * </pre> 1780 * 1781 * <code>optional string creation_timestamp = 30525366;</code> 1782 * 1783 * @return This builder for chaining. 1784 */ clearCreationTimestamp()1785 public Builder clearCreationTimestamp() { 1786 creationTimestamp_ = getDefaultInstance().getCreationTimestamp(); 1787 bitField0_ = (bitField0_ & ~0x00000001); 1788 onChanged(); 1789 return this; 1790 } 1791 /** 1792 * 1793 * 1794 * <pre> 1795 * [Output Only] Creation timestamp in RFC3339 text format. 1796 * </pre> 1797 * 1798 * <code>optional string creation_timestamp = 30525366;</code> 1799 * 1800 * @param value The bytes for creationTimestamp to set. 1801 * @return This builder for chaining. 1802 */ setCreationTimestampBytes(com.google.protobuf.ByteString value)1803 public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) { 1804 if (value == null) { 1805 throw new NullPointerException(); 1806 } 1807 checkByteStringIsUtf8(value); 1808 creationTimestamp_ = value; 1809 bitField0_ |= 0x00000001; 1810 onChanged(); 1811 return this; 1812 } 1813 1814 private java.lang.Object description_ = ""; 1815 /** 1816 * <code>optional string description = 422937596;</code> 1817 * 1818 * @return Whether the description field is set. 1819 */ hasDescription()1820 public boolean hasDescription() { 1821 return ((bitField0_ & 0x00000002) != 0); 1822 } 1823 /** 1824 * <code>optional string description = 422937596;</code> 1825 * 1826 * @return The description. 1827 */ getDescription()1828 public java.lang.String getDescription() { 1829 java.lang.Object ref = description_; 1830 if (!(ref instanceof java.lang.String)) { 1831 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1832 java.lang.String s = bs.toStringUtf8(); 1833 description_ = s; 1834 return s; 1835 } else { 1836 return (java.lang.String) ref; 1837 } 1838 } 1839 /** 1840 * <code>optional string description = 422937596;</code> 1841 * 1842 * @return The bytes for description. 1843 */ getDescriptionBytes()1844 public com.google.protobuf.ByteString getDescriptionBytes() { 1845 java.lang.Object ref = description_; 1846 if (ref instanceof String) { 1847 com.google.protobuf.ByteString b = 1848 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1849 description_ = b; 1850 return b; 1851 } else { 1852 return (com.google.protobuf.ByteString) ref; 1853 } 1854 } 1855 /** 1856 * <code>optional string description = 422937596;</code> 1857 * 1858 * @param value The description to set. 1859 * @return This builder for chaining. 1860 */ setDescription(java.lang.String value)1861 public Builder setDescription(java.lang.String value) { 1862 if (value == null) { 1863 throw new NullPointerException(); 1864 } 1865 description_ = value; 1866 bitField0_ |= 0x00000002; 1867 onChanged(); 1868 return this; 1869 } 1870 /** 1871 * <code>optional string description = 422937596;</code> 1872 * 1873 * @return This builder for chaining. 1874 */ clearDescription()1875 public Builder clearDescription() { 1876 description_ = getDefaultInstance().getDescription(); 1877 bitField0_ = (bitField0_ & ~0x00000002); 1878 onChanged(); 1879 return this; 1880 } 1881 /** 1882 * <code>optional string description = 422937596;</code> 1883 * 1884 * @param value The bytes for description to set. 1885 * @return This builder for chaining. 1886 */ setDescriptionBytes(com.google.protobuf.ByteString value)1887 public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { 1888 if (value == null) { 1889 throw new NullPointerException(); 1890 } 1891 checkByteStringIsUtf8(value); 1892 description_ = value; 1893 bitField0_ |= 0x00000002; 1894 onChanged(); 1895 return this; 1896 } 1897 1898 private com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy groupPlacementPolicy_; 1899 private com.google.protobuf.SingleFieldBuilderV3< 1900 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy, 1901 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.Builder, 1902 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicyOrBuilder> 1903 groupPlacementPolicyBuilder_; 1904 /** 1905 * 1906 * 1907 * <pre> 1908 * Resource policy for instances for placement configuration. 1909 * </pre> 1910 * 1911 * <code> 1912 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 1913 * </code> 1914 * 1915 * @return Whether the groupPlacementPolicy field is set. 1916 */ hasGroupPlacementPolicy()1917 public boolean hasGroupPlacementPolicy() { 1918 return ((bitField0_ & 0x00000004) != 0); 1919 } 1920 /** 1921 * 1922 * 1923 * <pre> 1924 * Resource policy for instances for placement configuration. 1925 * </pre> 1926 * 1927 * <code> 1928 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 1929 * </code> 1930 * 1931 * @return The groupPlacementPolicy. 1932 */ 1933 public com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy getGroupPlacementPolicy()1934 getGroupPlacementPolicy() { 1935 if (groupPlacementPolicyBuilder_ == null) { 1936 return groupPlacementPolicy_ == null 1937 ? com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.getDefaultInstance() 1938 : groupPlacementPolicy_; 1939 } else { 1940 return groupPlacementPolicyBuilder_.getMessage(); 1941 } 1942 } 1943 /** 1944 * 1945 * 1946 * <pre> 1947 * Resource policy for instances for placement configuration. 1948 * </pre> 1949 * 1950 * <code> 1951 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 1952 * </code> 1953 */ setGroupPlacementPolicy( com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy value)1954 public Builder setGroupPlacementPolicy( 1955 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy value) { 1956 if (groupPlacementPolicyBuilder_ == null) { 1957 if (value == null) { 1958 throw new NullPointerException(); 1959 } 1960 groupPlacementPolicy_ = value; 1961 } else { 1962 groupPlacementPolicyBuilder_.setMessage(value); 1963 } 1964 bitField0_ |= 0x00000004; 1965 onChanged(); 1966 return this; 1967 } 1968 /** 1969 * 1970 * 1971 * <pre> 1972 * Resource policy for instances for placement configuration. 1973 * </pre> 1974 * 1975 * <code> 1976 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 1977 * </code> 1978 */ setGroupPlacementPolicy( com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.Builder builderForValue)1979 public Builder setGroupPlacementPolicy( 1980 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.Builder builderForValue) { 1981 if (groupPlacementPolicyBuilder_ == null) { 1982 groupPlacementPolicy_ = builderForValue.build(); 1983 } else { 1984 groupPlacementPolicyBuilder_.setMessage(builderForValue.build()); 1985 } 1986 bitField0_ |= 0x00000004; 1987 onChanged(); 1988 return this; 1989 } 1990 /** 1991 * 1992 * 1993 * <pre> 1994 * Resource policy for instances for placement configuration. 1995 * </pre> 1996 * 1997 * <code> 1998 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 1999 * </code> 2000 */ mergeGroupPlacementPolicy( com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy value)2001 public Builder mergeGroupPlacementPolicy( 2002 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy value) { 2003 if (groupPlacementPolicyBuilder_ == null) { 2004 if (((bitField0_ & 0x00000004) != 0) 2005 && groupPlacementPolicy_ != null 2006 && groupPlacementPolicy_ 2007 != com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy 2008 .getDefaultInstance()) { 2009 getGroupPlacementPolicyBuilder().mergeFrom(value); 2010 } else { 2011 groupPlacementPolicy_ = value; 2012 } 2013 } else { 2014 groupPlacementPolicyBuilder_.mergeFrom(value); 2015 } 2016 bitField0_ |= 0x00000004; 2017 onChanged(); 2018 return this; 2019 } 2020 /** 2021 * 2022 * 2023 * <pre> 2024 * Resource policy for instances for placement configuration. 2025 * </pre> 2026 * 2027 * <code> 2028 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 2029 * </code> 2030 */ clearGroupPlacementPolicy()2031 public Builder clearGroupPlacementPolicy() { 2032 bitField0_ = (bitField0_ & ~0x00000004); 2033 groupPlacementPolicy_ = null; 2034 if (groupPlacementPolicyBuilder_ != null) { 2035 groupPlacementPolicyBuilder_.dispose(); 2036 groupPlacementPolicyBuilder_ = null; 2037 } 2038 onChanged(); 2039 return this; 2040 } 2041 /** 2042 * 2043 * 2044 * <pre> 2045 * Resource policy for instances for placement configuration. 2046 * </pre> 2047 * 2048 * <code> 2049 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 2050 * </code> 2051 */ 2052 public com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.Builder getGroupPlacementPolicyBuilder()2053 getGroupPlacementPolicyBuilder() { 2054 bitField0_ |= 0x00000004; 2055 onChanged(); 2056 return getGroupPlacementPolicyFieldBuilder().getBuilder(); 2057 } 2058 /** 2059 * 2060 * 2061 * <pre> 2062 * Resource policy for instances for placement configuration. 2063 * </pre> 2064 * 2065 * <code> 2066 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 2067 * </code> 2068 */ 2069 public com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicyOrBuilder getGroupPlacementPolicyOrBuilder()2070 getGroupPlacementPolicyOrBuilder() { 2071 if (groupPlacementPolicyBuilder_ != null) { 2072 return groupPlacementPolicyBuilder_.getMessageOrBuilder(); 2073 } else { 2074 return groupPlacementPolicy_ == null 2075 ? com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.getDefaultInstance() 2076 : groupPlacementPolicy_; 2077 } 2078 } 2079 /** 2080 * 2081 * 2082 * <pre> 2083 * Resource policy for instances for placement configuration. 2084 * </pre> 2085 * 2086 * <code> 2087 * optional .google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy group_placement_policy = 10931596; 2088 * </code> 2089 */ 2090 private com.google.protobuf.SingleFieldBuilderV3< 2091 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy, 2092 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.Builder, 2093 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicyOrBuilder> getGroupPlacementPolicyFieldBuilder()2094 getGroupPlacementPolicyFieldBuilder() { 2095 if (groupPlacementPolicyBuilder_ == null) { 2096 groupPlacementPolicyBuilder_ = 2097 new com.google.protobuf.SingleFieldBuilderV3< 2098 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy, 2099 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.Builder, 2100 com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicyOrBuilder>( 2101 getGroupPlacementPolicy(), getParentForChildren(), isClean()); 2102 groupPlacementPolicy_ = null; 2103 } 2104 return groupPlacementPolicyBuilder_; 2105 } 2106 2107 private long id_; 2108 /** 2109 * 2110 * 2111 * <pre> 2112 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2113 * </pre> 2114 * 2115 * <code>optional uint64 id = 3355;</code> 2116 * 2117 * @return Whether the id field is set. 2118 */ 2119 @java.lang.Override hasId()2120 public boolean hasId() { 2121 return ((bitField0_ & 0x00000008) != 0); 2122 } 2123 /** 2124 * 2125 * 2126 * <pre> 2127 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2128 * </pre> 2129 * 2130 * <code>optional uint64 id = 3355;</code> 2131 * 2132 * @return The id. 2133 */ 2134 @java.lang.Override getId()2135 public long getId() { 2136 return id_; 2137 } 2138 /** 2139 * 2140 * 2141 * <pre> 2142 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2143 * </pre> 2144 * 2145 * <code>optional uint64 id = 3355;</code> 2146 * 2147 * @param value The id to set. 2148 * @return This builder for chaining. 2149 */ setId(long value)2150 public Builder setId(long value) { 2151 2152 id_ = value; 2153 bitField0_ |= 0x00000008; 2154 onChanged(); 2155 return this; 2156 } 2157 /** 2158 * 2159 * 2160 * <pre> 2161 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2162 * </pre> 2163 * 2164 * <code>optional uint64 id = 3355;</code> 2165 * 2166 * @return This builder for chaining. 2167 */ clearId()2168 public Builder clearId() { 2169 bitField0_ = (bitField0_ & ~0x00000008); 2170 id_ = 0L; 2171 onChanged(); 2172 return this; 2173 } 2174 2175 private com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy 2176 instanceSchedulePolicy_; 2177 private com.google.protobuf.SingleFieldBuilderV3< 2178 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy, 2179 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.Builder, 2180 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyOrBuilder> 2181 instanceSchedulePolicyBuilder_; 2182 /** 2183 * 2184 * 2185 * <pre> 2186 * Resource policy for scheduling instance operations. 2187 * </pre> 2188 * 2189 * <code> 2190 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 2191 * </code> 2192 * 2193 * @return Whether the instanceSchedulePolicy field is set. 2194 */ hasInstanceSchedulePolicy()2195 public boolean hasInstanceSchedulePolicy() { 2196 return ((bitField0_ & 0x00000010) != 0); 2197 } 2198 /** 2199 * 2200 * 2201 * <pre> 2202 * Resource policy for scheduling instance operations. 2203 * </pre> 2204 * 2205 * <code> 2206 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 2207 * </code> 2208 * 2209 * @return The instanceSchedulePolicy. 2210 */ 2211 public com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy getInstanceSchedulePolicy()2212 getInstanceSchedulePolicy() { 2213 if (instanceSchedulePolicyBuilder_ == null) { 2214 return instanceSchedulePolicy_ == null 2215 ? com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.getDefaultInstance() 2216 : instanceSchedulePolicy_; 2217 } else { 2218 return instanceSchedulePolicyBuilder_.getMessage(); 2219 } 2220 } 2221 /** 2222 * 2223 * 2224 * <pre> 2225 * Resource policy for scheduling instance operations. 2226 * </pre> 2227 * 2228 * <code> 2229 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 2230 * </code> 2231 */ setInstanceSchedulePolicy( com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy value)2232 public Builder setInstanceSchedulePolicy( 2233 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy value) { 2234 if (instanceSchedulePolicyBuilder_ == null) { 2235 if (value == null) { 2236 throw new NullPointerException(); 2237 } 2238 instanceSchedulePolicy_ = value; 2239 } else { 2240 instanceSchedulePolicyBuilder_.setMessage(value); 2241 } 2242 bitField0_ |= 0x00000010; 2243 onChanged(); 2244 return this; 2245 } 2246 /** 2247 * 2248 * 2249 * <pre> 2250 * Resource policy for scheduling instance operations. 2251 * </pre> 2252 * 2253 * <code> 2254 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 2255 * </code> 2256 */ setInstanceSchedulePolicy( com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.Builder builderForValue)2257 public Builder setInstanceSchedulePolicy( 2258 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.Builder builderForValue) { 2259 if (instanceSchedulePolicyBuilder_ == null) { 2260 instanceSchedulePolicy_ = builderForValue.build(); 2261 } else { 2262 instanceSchedulePolicyBuilder_.setMessage(builderForValue.build()); 2263 } 2264 bitField0_ |= 0x00000010; 2265 onChanged(); 2266 return this; 2267 } 2268 /** 2269 * 2270 * 2271 * <pre> 2272 * Resource policy for scheduling instance operations. 2273 * </pre> 2274 * 2275 * <code> 2276 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 2277 * </code> 2278 */ mergeInstanceSchedulePolicy( com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy value)2279 public Builder mergeInstanceSchedulePolicy( 2280 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy value) { 2281 if (instanceSchedulePolicyBuilder_ == null) { 2282 if (((bitField0_ & 0x00000010) != 0) 2283 && instanceSchedulePolicy_ != null 2284 && instanceSchedulePolicy_ 2285 != com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy 2286 .getDefaultInstance()) { 2287 getInstanceSchedulePolicyBuilder().mergeFrom(value); 2288 } else { 2289 instanceSchedulePolicy_ = value; 2290 } 2291 } else { 2292 instanceSchedulePolicyBuilder_.mergeFrom(value); 2293 } 2294 bitField0_ |= 0x00000010; 2295 onChanged(); 2296 return this; 2297 } 2298 /** 2299 * 2300 * 2301 * <pre> 2302 * Resource policy for scheduling instance operations. 2303 * </pre> 2304 * 2305 * <code> 2306 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 2307 * </code> 2308 */ clearInstanceSchedulePolicy()2309 public Builder clearInstanceSchedulePolicy() { 2310 bitField0_ = (bitField0_ & ~0x00000010); 2311 instanceSchedulePolicy_ = null; 2312 if (instanceSchedulePolicyBuilder_ != null) { 2313 instanceSchedulePolicyBuilder_.dispose(); 2314 instanceSchedulePolicyBuilder_ = null; 2315 } 2316 onChanged(); 2317 return this; 2318 } 2319 /** 2320 * 2321 * 2322 * <pre> 2323 * Resource policy for scheduling instance operations. 2324 * </pre> 2325 * 2326 * <code> 2327 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 2328 * </code> 2329 */ 2330 public com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.Builder getInstanceSchedulePolicyBuilder()2331 getInstanceSchedulePolicyBuilder() { 2332 bitField0_ |= 0x00000010; 2333 onChanged(); 2334 return getInstanceSchedulePolicyFieldBuilder().getBuilder(); 2335 } 2336 /** 2337 * 2338 * 2339 * <pre> 2340 * Resource policy for scheduling instance operations. 2341 * </pre> 2342 * 2343 * <code> 2344 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 2345 * </code> 2346 */ 2347 public com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyOrBuilder getInstanceSchedulePolicyOrBuilder()2348 getInstanceSchedulePolicyOrBuilder() { 2349 if (instanceSchedulePolicyBuilder_ != null) { 2350 return instanceSchedulePolicyBuilder_.getMessageOrBuilder(); 2351 } else { 2352 return instanceSchedulePolicy_ == null 2353 ? com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.getDefaultInstance() 2354 : instanceSchedulePolicy_; 2355 } 2356 } 2357 /** 2358 * 2359 * 2360 * <pre> 2361 * Resource policy for scheduling instance operations. 2362 * </pre> 2363 * 2364 * <code> 2365 * optional .google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy instance_schedule_policy = 344877104; 2366 * </code> 2367 */ 2368 private com.google.protobuf.SingleFieldBuilderV3< 2369 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy, 2370 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.Builder, 2371 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyOrBuilder> getInstanceSchedulePolicyFieldBuilder()2372 getInstanceSchedulePolicyFieldBuilder() { 2373 if (instanceSchedulePolicyBuilder_ == null) { 2374 instanceSchedulePolicyBuilder_ = 2375 new com.google.protobuf.SingleFieldBuilderV3< 2376 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy, 2377 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.Builder, 2378 com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyOrBuilder>( 2379 getInstanceSchedulePolicy(), getParentForChildren(), isClean()); 2380 instanceSchedulePolicy_ = null; 2381 } 2382 return instanceSchedulePolicyBuilder_; 2383 } 2384 2385 private java.lang.Object kind_ = ""; 2386 /** 2387 * 2388 * 2389 * <pre> 2390 * [Output Only] Type of the resource. Always compute#resource_policies for resource policies. 2391 * </pre> 2392 * 2393 * <code>optional string kind = 3292052;</code> 2394 * 2395 * @return Whether the kind field is set. 2396 */ hasKind()2397 public boolean hasKind() { 2398 return ((bitField0_ & 0x00000020) != 0); 2399 } 2400 /** 2401 * 2402 * 2403 * <pre> 2404 * [Output Only] Type of the resource. Always compute#resource_policies for resource policies. 2405 * </pre> 2406 * 2407 * <code>optional string kind = 3292052;</code> 2408 * 2409 * @return The kind. 2410 */ getKind()2411 public java.lang.String getKind() { 2412 java.lang.Object ref = kind_; 2413 if (!(ref instanceof java.lang.String)) { 2414 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2415 java.lang.String s = bs.toStringUtf8(); 2416 kind_ = s; 2417 return s; 2418 } else { 2419 return (java.lang.String) ref; 2420 } 2421 } 2422 /** 2423 * 2424 * 2425 * <pre> 2426 * [Output Only] Type of the resource. Always compute#resource_policies for resource policies. 2427 * </pre> 2428 * 2429 * <code>optional string kind = 3292052;</code> 2430 * 2431 * @return The bytes for kind. 2432 */ getKindBytes()2433 public com.google.protobuf.ByteString getKindBytes() { 2434 java.lang.Object ref = kind_; 2435 if (ref instanceof String) { 2436 com.google.protobuf.ByteString b = 2437 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2438 kind_ = b; 2439 return b; 2440 } else { 2441 return (com.google.protobuf.ByteString) ref; 2442 } 2443 } 2444 /** 2445 * 2446 * 2447 * <pre> 2448 * [Output Only] Type of the resource. Always compute#resource_policies for resource policies. 2449 * </pre> 2450 * 2451 * <code>optional string kind = 3292052;</code> 2452 * 2453 * @param value The kind to set. 2454 * @return This builder for chaining. 2455 */ setKind(java.lang.String value)2456 public Builder setKind(java.lang.String value) { 2457 if (value == null) { 2458 throw new NullPointerException(); 2459 } 2460 kind_ = value; 2461 bitField0_ |= 0x00000020; 2462 onChanged(); 2463 return this; 2464 } 2465 /** 2466 * 2467 * 2468 * <pre> 2469 * [Output Only] Type of the resource. Always compute#resource_policies for resource policies. 2470 * </pre> 2471 * 2472 * <code>optional string kind = 3292052;</code> 2473 * 2474 * @return This builder for chaining. 2475 */ clearKind()2476 public Builder clearKind() { 2477 kind_ = getDefaultInstance().getKind(); 2478 bitField0_ = (bitField0_ & ~0x00000020); 2479 onChanged(); 2480 return this; 2481 } 2482 /** 2483 * 2484 * 2485 * <pre> 2486 * [Output Only] Type of the resource. Always compute#resource_policies for resource policies. 2487 * </pre> 2488 * 2489 * <code>optional string kind = 3292052;</code> 2490 * 2491 * @param value The bytes for kind to set. 2492 * @return This builder for chaining. 2493 */ setKindBytes(com.google.protobuf.ByteString value)2494 public Builder setKindBytes(com.google.protobuf.ByteString value) { 2495 if (value == null) { 2496 throw new NullPointerException(); 2497 } 2498 checkByteStringIsUtf8(value); 2499 kind_ = value; 2500 bitField0_ |= 0x00000020; 2501 onChanged(); 2502 return this; 2503 } 2504 2505 private java.lang.Object name_ = ""; 2506 /** 2507 * 2508 * 2509 * <pre> 2510 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2511 * </pre> 2512 * 2513 * <code>optional string name = 3373707;</code> 2514 * 2515 * @return Whether the name field is set. 2516 */ hasName()2517 public boolean hasName() { 2518 return ((bitField0_ & 0x00000040) != 0); 2519 } 2520 /** 2521 * 2522 * 2523 * <pre> 2524 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2525 * </pre> 2526 * 2527 * <code>optional string name = 3373707;</code> 2528 * 2529 * @return The name. 2530 */ getName()2531 public java.lang.String getName() { 2532 java.lang.Object ref = name_; 2533 if (!(ref instanceof java.lang.String)) { 2534 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2535 java.lang.String s = bs.toStringUtf8(); 2536 name_ = s; 2537 return s; 2538 } else { 2539 return (java.lang.String) ref; 2540 } 2541 } 2542 /** 2543 * 2544 * 2545 * <pre> 2546 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2547 * </pre> 2548 * 2549 * <code>optional string name = 3373707;</code> 2550 * 2551 * @return The bytes for name. 2552 */ getNameBytes()2553 public com.google.protobuf.ByteString getNameBytes() { 2554 java.lang.Object ref = name_; 2555 if (ref instanceof String) { 2556 com.google.protobuf.ByteString b = 2557 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2558 name_ = b; 2559 return b; 2560 } else { 2561 return (com.google.protobuf.ByteString) ref; 2562 } 2563 } 2564 /** 2565 * 2566 * 2567 * <pre> 2568 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2569 * </pre> 2570 * 2571 * <code>optional string name = 3373707;</code> 2572 * 2573 * @param value The name to set. 2574 * @return This builder for chaining. 2575 */ setName(java.lang.String value)2576 public Builder setName(java.lang.String value) { 2577 if (value == null) { 2578 throw new NullPointerException(); 2579 } 2580 name_ = value; 2581 bitField0_ |= 0x00000040; 2582 onChanged(); 2583 return this; 2584 } 2585 /** 2586 * 2587 * 2588 * <pre> 2589 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2590 * </pre> 2591 * 2592 * <code>optional string name = 3373707;</code> 2593 * 2594 * @return This builder for chaining. 2595 */ clearName()2596 public Builder clearName() { 2597 name_ = getDefaultInstance().getName(); 2598 bitField0_ = (bitField0_ & ~0x00000040); 2599 onChanged(); 2600 return this; 2601 } 2602 /** 2603 * 2604 * 2605 * <pre> 2606 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2607 * </pre> 2608 * 2609 * <code>optional string name = 3373707;</code> 2610 * 2611 * @param value The bytes for name to set. 2612 * @return This builder for chaining. 2613 */ setNameBytes(com.google.protobuf.ByteString value)2614 public Builder setNameBytes(com.google.protobuf.ByteString value) { 2615 if (value == null) { 2616 throw new NullPointerException(); 2617 } 2618 checkByteStringIsUtf8(value); 2619 name_ = value; 2620 bitField0_ |= 0x00000040; 2621 onChanged(); 2622 return this; 2623 } 2624 2625 private java.lang.Object region_ = ""; 2626 /** 2627 * <code>optional string region = 138946292;</code> 2628 * 2629 * @return Whether the region field is set. 2630 */ hasRegion()2631 public boolean hasRegion() { 2632 return ((bitField0_ & 0x00000080) != 0); 2633 } 2634 /** 2635 * <code>optional string region = 138946292;</code> 2636 * 2637 * @return The region. 2638 */ getRegion()2639 public java.lang.String getRegion() { 2640 java.lang.Object ref = region_; 2641 if (!(ref instanceof java.lang.String)) { 2642 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2643 java.lang.String s = bs.toStringUtf8(); 2644 region_ = s; 2645 return s; 2646 } else { 2647 return (java.lang.String) ref; 2648 } 2649 } 2650 /** 2651 * <code>optional string region = 138946292;</code> 2652 * 2653 * @return The bytes for region. 2654 */ getRegionBytes()2655 public com.google.protobuf.ByteString getRegionBytes() { 2656 java.lang.Object ref = region_; 2657 if (ref instanceof String) { 2658 com.google.protobuf.ByteString b = 2659 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2660 region_ = b; 2661 return b; 2662 } else { 2663 return (com.google.protobuf.ByteString) ref; 2664 } 2665 } 2666 /** 2667 * <code>optional string region = 138946292;</code> 2668 * 2669 * @param value The region to set. 2670 * @return This builder for chaining. 2671 */ setRegion(java.lang.String value)2672 public Builder setRegion(java.lang.String value) { 2673 if (value == null) { 2674 throw new NullPointerException(); 2675 } 2676 region_ = value; 2677 bitField0_ |= 0x00000080; 2678 onChanged(); 2679 return this; 2680 } 2681 /** 2682 * <code>optional string region = 138946292;</code> 2683 * 2684 * @return This builder for chaining. 2685 */ clearRegion()2686 public Builder clearRegion() { 2687 region_ = getDefaultInstance().getRegion(); 2688 bitField0_ = (bitField0_ & ~0x00000080); 2689 onChanged(); 2690 return this; 2691 } 2692 /** 2693 * <code>optional string region = 138946292;</code> 2694 * 2695 * @param value The bytes for region to set. 2696 * @return This builder for chaining. 2697 */ setRegionBytes(com.google.protobuf.ByteString value)2698 public Builder setRegionBytes(com.google.protobuf.ByteString value) { 2699 if (value == null) { 2700 throw new NullPointerException(); 2701 } 2702 checkByteStringIsUtf8(value); 2703 region_ = value; 2704 bitField0_ |= 0x00000080; 2705 onChanged(); 2706 return this; 2707 } 2708 2709 private com.google.cloud.compute.v1.ResourcePolicyResourceStatus resourceStatus_; 2710 private com.google.protobuf.SingleFieldBuilderV3< 2711 com.google.cloud.compute.v1.ResourcePolicyResourceStatus, 2712 com.google.cloud.compute.v1.ResourcePolicyResourceStatus.Builder, 2713 com.google.cloud.compute.v1.ResourcePolicyResourceStatusOrBuilder> 2714 resourceStatusBuilder_; 2715 /** 2716 * 2717 * 2718 * <pre> 2719 * [Output Only] The system status of the resource policy. 2720 * </pre> 2721 * 2722 * <code> 2723 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 2724 * </code> 2725 * 2726 * @return Whether the resourceStatus field is set. 2727 */ hasResourceStatus()2728 public boolean hasResourceStatus() { 2729 return ((bitField0_ & 0x00000100) != 0); 2730 } 2731 /** 2732 * 2733 * 2734 * <pre> 2735 * [Output Only] The system status of the resource policy. 2736 * </pre> 2737 * 2738 * <code> 2739 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 2740 * </code> 2741 * 2742 * @return The resourceStatus. 2743 */ getResourceStatus()2744 public com.google.cloud.compute.v1.ResourcePolicyResourceStatus getResourceStatus() { 2745 if (resourceStatusBuilder_ == null) { 2746 return resourceStatus_ == null 2747 ? com.google.cloud.compute.v1.ResourcePolicyResourceStatus.getDefaultInstance() 2748 : resourceStatus_; 2749 } else { 2750 return resourceStatusBuilder_.getMessage(); 2751 } 2752 } 2753 /** 2754 * 2755 * 2756 * <pre> 2757 * [Output Only] The system status of the resource policy. 2758 * </pre> 2759 * 2760 * <code> 2761 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 2762 * </code> 2763 */ setResourceStatus( com.google.cloud.compute.v1.ResourcePolicyResourceStatus value)2764 public Builder setResourceStatus( 2765 com.google.cloud.compute.v1.ResourcePolicyResourceStatus value) { 2766 if (resourceStatusBuilder_ == null) { 2767 if (value == null) { 2768 throw new NullPointerException(); 2769 } 2770 resourceStatus_ = value; 2771 } else { 2772 resourceStatusBuilder_.setMessage(value); 2773 } 2774 bitField0_ |= 0x00000100; 2775 onChanged(); 2776 return this; 2777 } 2778 /** 2779 * 2780 * 2781 * <pre> 2782 * [Output Only] The system status of the resource policy. 2783 * </pre> 2784 * 2785 * <code> 2786 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 2787 * </code> 2788 */ setResourceStatus( com.google.cloud.compute.v1.ResourcePolicyResourceStatus.Builder builderForValue)2789 public Builder setResourceStatus( 2790 com.google.cloud.compute.v1.ResourcePolicyResourceStatus.Builder builderForValue) { 2791 if (resourceStatusBuilder_ == null) { 2792 resourceStatus_ = builderForValue.build(); 2793 } else { 2794 resourceStatusBuilder_.setMessage(builderForValue.build()); 2795 } 2796 bitField0_ |= 0x00000100; 2797 onChanged(); 2798 return this; 2799 } 2800 /** 2801 * 2802 * 2803 * <pre> 2804 * [Output Only] The system status of the resource policy. 2805 * </pre> 2806 * 2807 * <code> 2808 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 2809 * </code> 2810 */ mergeResourceStatus( com.google.cloud.compute.v1.ResourcePolicyResourceStatus value)2811 public Builder mergeResourceStatus( 2812 com.google.cloud.compute.v1.ResourcePolicyResourceStatus value) { 2813 if (resourceStatusBuilder_ == null) { 2814 if (((bitField0_ & 0x00000100) != 0) 2815 && resourceStatus_ != null 2816 && resourceStatus_ 2817 != com.google.cloud.compute.v1.ResourcePolicyResourceStatus.getDefaultInstance()) { 2818 getResourceStatusBuilder().mergeFrom(value); 2819 } else { 2820 resourceStatus_ = value; 2821 } 2822 } else { 2823 resourceStatusBuilder_.mergeFrom(value); 2824 } 2825 bitField0_ |= 0x00000100; 2826 onChanged(); 2827 return this; 2828 } 2829 /** 2830 * 2831 * 2832 * <pre> 2833 * [Output Only] The system status of the resource policy. 2834 * </pre> 2835 * 2836 * <code> 2837 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 2838 * </code> 2839 */ clearResourceStatus()2840 public Builder clearResourceStatus() { 2841 bitField0_ = (bitField0_ & ~0x00000100); 2842 resourceStatus_ = null; 2843 if (resourceStatusBuilder_ != null) { 2844 resourceStatusBuilder_.dispose(); 2845 resourceStatusBuilder_ = null; 2846 } 2847 onChanged(); 2848 return this; 2849 } 2850 /** 2851 * 2852 * 2853 * <pre> 2854 * [Output Only] The system status of the resource policy. 2855 * </pre> 2856 * 2857 * <code> 2858 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 2859 * </code> 2860 */ 2861 public com.google.cloud.compute.v1.ResourcePolicyResourceStatus.Builder getResourceStatusBuilder()2862 getResourceStatusBuilder() { 2863 bitField0_ |= 0x00000100; 2864 onChanged(); 2865 return getResourceStatusFieldBuilder().getBuilder(); 2866 } 2867 /** 2868 * 2869 * 2870 * <pre> 2871 * [Output Only] The system status of the resource policy. 2872 * </pre> 2873 * 2874 * <code> 2875 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 2876 * </code> 2877 */ 2878 public com.google.cloud.compute.v1.ResourcePolicyResourceStatusOrBuilder getResourceStatusOrBuilder()2879 getResourceStatusOrBuilder() { 2880 if (resourceStatusBuilder_ != null) { 2881 return resourceStatusBuilder_.getMessageOrBuilder(); 2882 } else { 2883 return resourceStatus_ == null 2884 ? com.google.cloud.compute.v1.ResourcePolicyResourceStatus.getDefaultInstance() 2885 : resourceStatus_; 2886 } 2887 } 2888 /** 2889 * 2890 * 2891 * <pre> 2892 * [Output Only] The system status of the resource policy. 2893 * </pre> 2894 * 2895 * <code> 2896 * optional .google.cloud.compute.v1.ResourcePolicyResourceStatus resource_status = 249429315; 2897 * </code> 2898 */ 2899 private com.google.protobuf.SingleFieldBuilderV3< 2900 com.google.cloud.compute.v1.ResourcePolicyResourceStatus, 2901 com.google.cloud.compute.v1.ResourcePolicyResourceStatus.Builder, 2902 com.google.cloud.compute.v1.ResourcePolicyResourceStatusOrBuilder> getResourceStatusFieldBuilder()2903 getResourceStatusFieldBuilder() { 2904 if (resourceStatusBuilder_ == null) { 2905 resourceStatusBuilder_ = 2906 new com.google.protobuf.SingleFieldBuilderV3< 2907 com.google.cloud.compute.v1.ResourcePolicyResourceStatus, 2908 com.google.cloud.compute.v1.ResourcePolicyResourceStatus.Builder, 2909 com.google.cloud.compute.v1.ResourcePolicyResourceStatusOrBuilder>( 2910 getResourceStatus(), getParentForChildren(), isClean()); 2911 resourceStatus_ = null; 2912 } 2913 return resourceStatusBuilder_; 2914 } 2915 2916 private java.lang.Object selfLink_ = ""; 2917 /** 2918 * 2919 * 2920 * <pre> 2921 * [Output Only] Server-defined fully-qualified URL for this resource. 2922 * </pre> 2923 * 2924 * <code>optional string self_link = 456214797;</code> 2925 * 2926 * @return Whether the selfLink field is set. 2927 */ hasSelfLink()2928 public boolean hasSelfLink() { 2929 return ((bitField0_ & 0x00000200) != 0); 2930 } 2931 /** 2932 * 2933 * 2934 * <pre> 2935 * [Output Only] Server-defined fully-qualified URL for this resource. 2936 * </pre> 2937 * 2938 * <code>optional string self_link = 456214797;</code> 2939 * 2940 * @return The selfLink. 2941 */ getSelfLink()2942 public java.lang.String getSelfLink() { 2943 java.lang.Object ref = selfLink_; 2944 if (!(ref instanceof java.lang.String)) { 2945 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2946 java.lang.String s = bs.toStringUtf8(); 2947 selfLink_ = s; 2948 return s; 2949 } else { 2950 return (java.lang.String) ref; 2951 } 2952 } 2953 /** 2954 * 2955 * 2956 * <pre> 2957 * [Output Only] Server-defined fully-qualified URL for this resource. 2958 * </pre> 2959 * 2960 * <code>optional string self_link = 456214797;</code> 2961 * 2962 * @return The bytes for selfLink. 2963 */ getSelfLinkBytes()2964 public com.google.protobuf.ByteString getSelfLinkBytes() { 2965 java.lang.Object ref = selfLink_; 2966 if (ref instanceof String) { 2967 com.google.protobuf.ByteString b = 2968 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2969 selfLink_ = b; 2970 return b; 2971 } else { 2972 return (com.google.protobuf.ByteString) ref; 2973 } 2974 } 2975 /** 2976 * 2977 * 2978 * <pre> 2979 * [Output Only] Server-defined fully-qualified URL for this resource. 2980 * </pre> 2981 * 2982 * <code>optional string self_link = 456214797;</code> 2983 * 2984 * @param value The selfLink to set. 2985 * @return This builder for chaining. 2986 */ setSelfLink(java.lang.String value)2987 public Builder setSelfLink(java.lang.String value) { 2988 if (value == null) { 2989 throw new NullPointerException(); 2990 } 2991 selfLink_ = value; 2992 bitField0_ |= 0x00000200; 2993 onChanged(); 2994 return this; 2995 } 2996 /** 2997 * 2998 * 2999 * <pre> 3000 * [Output Only] Server-defined fully-qualified URL for this resource. 3001 * </pre> 3002 * 3003 * <code>optional string self_link = 456214797;</code> 3004 * 3005 * @return This builder for chaining. 3006 */ clearSelfLink()3007 public Builder clearSelfLink() { 3008 selfLink_ = getDefaultInstance().getSelfLink(); 3009 bitField0_ = (bitField0_ & ~0x00000200); 3010 onChanged(); 3011 return this; 3012 } 3013 /** 3014 * 3015 * 3016 * <pre> 3017 * [Output Only] Server-defined fully-qualified URL for this resource. 3018 * </pre> 3019 * 3020 * <code>optional string self_link = 456214797;</code> 3021 * 3022 * @param value The bytes for selfLink to set. 3023 * @return This builder for chaining. 3024 */ setSelfLinkBytes(com.google.protobuf.ByteString value)3025 public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { 3026 if (value == null) { 3027 throw new NullPointerException(); 3028 } 3029 checkByteStringIsUtf8(value); 3030 selfLink_ = value; 3031 bitField0_ |= 0x00000200; 3032 onChanged(); 3033 return this; 3034 } 3035 3036 private com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy 3037 snapshotSchedulePolicy_; 3038 private com.google.protobuf.SingleFieldBuilderV3< 3039 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy, 3040 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.Builder, 3041 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyOrBuilder> 3042 snapshotSchedulePolicyBuilder_; 3043 /** 3044 * 3045 * 3046 * <pre> 3047 * Resource policy for persistent disks for creating snapshots. 3048 * </pre> 3049 * 3050 * <code> 3051 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 3052 * </code> 3053 * 3054 * @return Whether the snapshotSchedulePolicy field is set. 3055 */ hasSnapshotSchedulePolicy()3056 public boolean hasSnapshotSchedulePolicy() { 3057 return ((bitField0_ & 0x00000400) != 0); 3058 } 3059 /** 3060 * 3061 * 3062 * <pre> 3063 * Resource policy for persistent disks for creating snapshots. 3064 * </pre> 3065 * 3066 * <code> 3067 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 3068 * </code> 3069 * 3070 * @return The snapshotSchedulePolicy. 3071 */ 3072 public com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy getSnapshotSchedulePolicy()3073 getSnapshotSchedulePolicy() { 3074 if (snapshotSchedulePolicyBuilder_ == null) { 3075 return snapshotSchedulePolicy_ == null 3076 ? com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.getDefaultInstance() 3077 : snapshotSchedulePolicy_; 3078 } else { 3079 return snapshotSchedulePolicyBuilder_.getMessage(); 3080 } 3081 } 3082 /** 3083 * 3084 * 3085 * <pre> 3086 * Resource policy for persistent disks for creating snapshots. 3087 * </pre> 3088 * 3089 * <code> 3090 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 3091 * </code> 3092 */ setSnapshotSchedulePolicy( com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy value)3093 public Builder setSnapshotSchedulePolicy( 3094 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy value) { 3095 if (snapshotSchedulePolicyBuilder_ == null) { 3096 if (value == null) { 3097 throw new NullPointerException(); 3098 } 3099 snapshotSchedulePolicy_ = value; 3100 } else { 3101 snapshotSchedulePolicyBuilder_.setMessage(value); 3102 } 3103 bitField0_ |= 0x00000400; 3104 onChanged(); 3105 return this; 3106 } 3107 /** 3108 * 3109 * 3110 * <pre> 3111 * Resource policy for persistent disks for creating snapshots. 3112 * </pre> 3113 * 3114 * <code> 3115 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 3116 * </code> 3117 */ setSnapshotSchedulePolicy( com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.Builder builderForValue)3118 public Builder setSnapshotSchedulePolicy( 3119 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.Builder builderForValue) { 3120 if (snapshotSchedulePolicyBuilder_ == null) { 3121 snapshotSchedulePolicy_ = builderForValue.build(); 3122 } else { 3123 snapshotSchedulePolicyBuilder_.setMessage(builderForValue.build()); 3124 } 3125 bitField0_ |= 0x00000400; 3126 onChanged(); 3127 return this; 3128 } 3129 /** 3130 * 3131 * 3132 * <pre> 3133 * Resource policy for persistent disks for creating snapshots. 3134 * </pre> 3135 * 3136 * <code> 3137 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 3138 * </code> 3139 */ mergeSnapshotSchedulePolicy( com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy value)3140 public Builder mergeSnapshotSchedulePolicy( 3141 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy value) { 3142 if (snapshotSchedulePolicyBuilder_ == null) { 3143 if (((bitField0_ & 0x00000400) != 0) 3144 && snapshotSchedulePolicy_ != null 3145 && snapshotSchedulePolicy_ 3146 != com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy 3147 .getDefaultInstance()) { 3148 getSnapshotSchedulePolicyBuilder().mergeFrom(value); 3149 } else { 3150 snapshotSchedulePolicy_ = value; 3151 } 3152 } else { 3153 snapshotSchedulePolicyBuilder_.mergeFrom(value); 3154 } 3155 bitField0_ |= 0x00000400; 3156 onChanged(); 3157 return this; 3158 } 3159 /** 3160 * 3161 * 3162 * <pre> 3163 * Resource policy for persistent disks for creating snapshots. 3164 * </pre> 3165 * 3166 * <code> 3167 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 3168 * </code> 3169 */ clearSnapshotSchedulePolicy()3170 public Builder clearSnapshotSchedulePolicy() { 3171 bitField0_ = (bitField0_ & ~0x00000400); 3172 snapshotSchedulePolicy_ = null; 3173 if (snapshotSchedulePolicyBuilder_ != null) { 3174 snapshotSchedulePolicyBuilder_.dispose(); 3175 snapshotSchedulePolicyBuilder_ = null; 3176 } 3177 onChanged(); 3178 return this; 3179 } 3180 /** 3181 * 3182 * 3183 * <pre> 3184 * Resource policy for persistent disks for creating snapshots. 3185 * </pre> 3186 * 3187 * <code> 3188 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 3189 * </code> 3190 */ 3191 public com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.Builder getSnapshotSchedulePolicyBuilder()3192 getSnapshotSchedulePolicyBuilder() { 3193 bitField0_ |= 0x00000400; 3194 onChanged(); 3195 return getSnapshotSchedulePolicyFieldBuilder().getBuilder(); 3196 } 3197 /** 3198 * 3199 * 3200 * <pre> 3201 * Resource policy for persistent disks for creating snapshots. 3202 * </pre> 3203 * 3204 * <code> 3205 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 3206 * </code> 3207 */ 3208 public com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyOrBuilder getSnapshotSchedulePolicyOrBuilder()3209 getSnapshotSchedulePolicyOrBuilder() { 3210 if (snapshotSchedulePolicyBuilder_ != null) { 3211 return snapshotSchedulePolicyBuilder_.getMessageOrBuilder(); 3212 } else { 3213 return snapshotSchedulePolicy_ == null 3214 ? com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.getDefaultInstance() 3215 : snapshotSchedulePolicy_; 3216 } 3217 } 3218 /** 3219 * 3220 * 3221 * <pre> 3222 * Resource policy for persistent disks for creating snapshots. 3223 * </pre> 3224 * 3225 * <code> 3226 * optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy snapshot_schedule_policy = 218131295; 3227 * </code> 3228 */ 3229 private com.google.protobuf.SingleFieldBuilderV3< 3230 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy, 3231 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.Builder, 3232 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyOrBuilder> getSnapshotSchedulePolicyFieldBuilder()3233 getSnapshotSchedulePolicyFieldBuilder() { 3234 if (snapshotSchedulePolicyBuilder_ == null) { 3235 snapshotSchedulePolicyBuilder_ = 3236 new com.google.protobuf.SingleFieldBuilderV3< 3237 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy, 3238 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.Builder, 3239 com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyOrBuilder>( 3240 getSnapshotSchedulePolicy(), getParentForChildren(), isClean()); 3241 snapshotSchedulePolicy_ = null; 3242 } 3243 return snapshotSchedulePolicyBuilder_; 3244 } 3245 3246 private java.lang.Object status_ = ""; 3247 /** 3248 * 3249 * 3250 * <pre> 3251 * [Output Only] The status of resource policy creation. 3252 * Check the Status enum for the list of possible values. 3253 * </pre> 3254 * 3255 * <code>optional string status = 181260274;</code> 3256 * 3257 * @return Whether the status field is set. 3258 */ hasStatus()3259 public boolean hasStatus() { 3260 return ((bitField0_ & 0x00000800) != 0); 3261 } 3262 /** 3263 * 3264 * 3265 * <pre> 3266 * [Output Only] The status of resource policy creation. 3267 * Check the Status enum for the list of possible values. 3268 * </pre> 3269 * 3270 * <code>optional string status = 181260274;</code> 3271 * 3272 * @return The status. 3273 */ getStatus()3274 public java.lang.String getStatus() { 3275 java.lang.Object ref = status_; 3276 if (!(ref instanceof java.lang.String)) { 3277 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3278 java.lang.String s = bs.toStringUtf8(); 3279 status_ = s; 3280 return s; 3281 } else { 3282 return (java.lang.String) ref; 3283 } 3284 } 3285 /** 3286 * 3287 * 3288 * <pre> 3289 * [Output Only] The status of resource policy creation. 3290 * Check the Status enum for the list of possible values. 3291 * </pre> 3292 * 3293 * <code>optional string status = 181260274;</code> 3294 * 3295 * @return The bytes for status. 3296 */ getStatusBytes()3297 public com.google.protobuf.ByteString getStatusBytes() { 3298 java.lang.Object ref = status_; 3299 if (ref instanceof String) { 3300 com.google.protobuf.ByteString b = 3301 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3302 status_ = b; 3303 return b; 3304 } else { 3305 return (com.google.protobuf.ByteString) ref; 3306 } 3307 } 3308 /** 3309 * 3310 * 3311 * <pre> 3312 * [Output Only] The status of resource policy creation. 3313 * Check the Status enum for the list of possible values. 3314 * </pre> 3315 * 3316 * <code>optional string status = 181260274;</code> 3317 * 3318 * @param value The status to set. 3319 * @return This builder for chaining. 3320 */ setStatus(java.lang.String value)3321 public Builder setStatus(java.lang.String value) { 3322 if (value == null) { 3323 throw new NullPointerException(); 3324 } 3325 status_ = value; 3326 bitField0_ |= 0x00000800; 3327 onChanged(); 3328 return this; 3329 } 3330 /** 3331 * 3332 * 3333 * <pre> 3334 * [Output Only] The status of resource policy creation. 3335 * Check the Status enum for the list of possible values. 3336 * </pre> 3337 * 3338 * <code>optional string status = 181260274;</code> 3339 * 3340 * @return This builder for chaining. 3341 */ clearStatus()3342 public Builder clearStatus() { 3343 status_ = getDefaultInstance().getStatus(); 3344 bitField0_ = (bitField0_ & ~0x00000800); 3345 onChanged(); 3346 return this; 3347 } 3348 /** 3349 * 3350 * 3351 * <pre> 3352 * [Output Only] The status of resource policy creation. 3353 * Check the Status enum for the list of possible values. 3354 * </pre> 3355 * 3356 * <code>optional string status = 181260274;</code> 3357 * 3358 * @param value The bytes for status to set. 3359 * @return This builder for chaining. 3360 */ setStatusBytes(com.google.protobuf.ByteString value)3361 public Builder setStatusBytes(com.google.protobuf.ByteString value) { 3362 if (value == null) { 3363 throw new NullPointerException(); 3364 } 3365 checkByteStringIsUtf8(value); 3366 status_ = value; 3367 bitField0_ |= 0x00000800; 3368 onChanged(); 3369 return this; 3370 } 3371 3372 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3373 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 3374 return super.setUnknownFields(unknownFields); 3375 } 3376 3377 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3378 public final Builder mergeUnknownFields( 3379 final com.google.protobuf.UnknownFieldSet unknownFields) { 3380 return super.mergeUnknownFields(unknownFields); 3381 } 3382 3383 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.ResourcePolicy) 3384 } 3385 3386 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.ResourcePolicy) 3387 private static final com.google.cloud.compute.v1.ResourcePolicy DEFAULT_INSTANCE; 3388 3389 static { 3390 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.ResourcePolicy(); 3391 } 3392 getDefaultInstance()3393 public static com.google.cloud.compute.v1.ResourcePolicy getDefaultInstance() { 3394 return DEFAULT_INSTANCE; 3395 } 3396 3397 private static final com.google.protobuf.Parser<ResourcePolicy> PARSER = 3398 new com.google.protobuf.AbstractParser<ResourcePolicy>() { 3399 @java.lang.Override 3400 public ResourcePolicy parsePartialFrom( 3401 com.google.protobuf.CodedInputStream input, 3402 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3403 throws com.google.protobuf.InvalidProtocolBufferException { 3404 Builder builder = newBuilder(); 3405 try { 3406 builder.mergeFrom(input, extensionRegistry); 3407 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3408 throw e.setUnfinishedMessage(builder.buildPartial()); 3409 } catch (com.google.protobuf.UninitializedMessageException e) { 3410 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 3411 } catch (java.io.IOException e) { 3412 throw new com.google.protobuf.InvalidProtocolBufferException(e) 3413 .setUnfinishedMessage(builder.buildPartial()); 3414 } 3415 return builder.buildPartial(); 3416 } 3417 }; 3418 parser()3419 public static com.google.protobuf.Parser<ResourcePolicy> parser() { 3420 return PARSER; 3421 } 3422 3423 @java.lang.Override getParserForType()3424 public com.google.protobuf.Parser<ResourcePolicy> getParserForType() { 3425 return PARSER; 3426 } 3427 3428 @java.lang.Override getDefaultInstanceForType()3429 public com.google.cloud.compute.v1.ResourcePolicy getDefaultInstanceForType() { 3430 return DEFAULT_INSTANCE; 3431 } 3432 } 3433