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 License resource. A License represents billing and aggregate usage data for public and marketplace images. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.License} 29 */ 30 public final class License extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.License) 33 LicenseOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use License.newBuilder() to construct. License(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private License(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 License()40 private License() { 41 creationTimestamp_ = ""; 42 description_ = ""; 43 kind_ = ""; 44 name_ = ""; 45 selfLink_ = ""; 46 } 47 48 @java.lang.Override 49 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)50 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 51 return new License(); 52 } 53 54 @java.lang.Override getUnknownFields()55 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 56 return this.unknownFields; 57 } 58 getDescriptor()59 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 60 return com.google.cloud.compute.v1.Compute 61 .internal_static_google_cloud_compute_v1_License_descriptor; 62 } 63 64 @java.lang.Override 65 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()66 internalGetFieldAccessorTable() { 67 return com.google.cloud.compute.v1.Compute 68 .internal_static_google_cloud_compute_v1_License_fieldAccessorTable 69 .ensureFieldAccessorsInitialized( 70 com.google.cloud.compute.v1.License.class, 71 com.google.cloud.compute.v1.License.Builder.class); 72 } 73 74 private int bitField0_; 75 public static final int CHARGES_USE_FEE_FIELD_NUMBER = 372412622; 76 private boolean chargesUseFee_ = false; 77 /** 78 * 79 * 80 * <pre> 81 * [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee. 82 * </pre> 83 * 84 * <code>optional bool charges_use_fee = 372412622;</code> 85 * 86 * @return Whether the chargesUseFee field is set. 87 */ 88 @java.lang.Override hasChargesUseFee()89 public boolean hasChargesUseFee() { 90 return ((bitField0_ & 0x00000001) != 0); 91 } 92 /** 93 * 94 * 95 * <pre> 96 * [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee. 97 * </pre> 98 * 99 * <code>optional bool charges_use_fee = 372412622;</code> 100 * 101 * @return The chargesUseFee. 102 */ 103 @java.lang.Override getChargesUseFee()104 public boolean getChargesUseFee() { 105 return chargesUseFee_; 106 } 107 108 public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366; 109 110 @SuppressWarnings("serial") 111 private volatile java.lang.Object creationTimestamp_ = ""; 112 /** 113 * 114 * 115 * <pre> 116 * [Output Only] Creation timestamp in RFC3339 text format. 117 * </pre> 118 * 119 * <code>optional string creation_timestamp = 30525366;</code> 120 * 121 * @return Whether the creationTimestamp field is set. 122 */ 123 @java.lang.Override hasCreationTimestamp()124 public boolean hasCreationTimestamp() { 125 return ((bitField0_ & 0x00000002) != 0); 126 } 127 /** 128 * 129 * 130 * <pre> 131 * [Output Only] Creation timestamp in RFC3339 text format. 132 * </pre> 133 * 134 * <code>optional string creation_timestamp = 30525366;</code> 135 * 136 * @return The creationTimestamp. 137 */ 138 @java.lang.Override getCreationTimestamp()139 public java.lang.String getCreationTimestamp() { 140 java.lang.Object ref = creationTimestamp_; 141 if (ref instanceof java.lang.String) { 142 return (java.lang.String) ref; 143 } else { 144 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 145 java.lang.String s = bs.toStringUtf8(); 146 creationTimestamp_ = s; 147 return s; 148 } 149 } 150 /** 151 * 152 * 153 * <pre> 154 * [Output Only] Creation timestamp in RFC3339 text format. 155 * </pre> 156 * 157 * <code>optional string creation_timestamp = 30525366;</code> 158 * 159 * @return The bytes for creationTimestamp. 160 */ 161 @java.lang.Override getCreationTimestampBytes()162 public com.google.protobuf.ByteString getCreationTimestampBytes() { 163 java.lang.Object ref = creationTimestamp_; 164 if (ref instanceof java.lang.String) { 165 com.google.protobuf.ByteString b = 166 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 167 creationTimestamp_ = b; 168 return b; 169 } else { 170 return (com.google.protobuf.ByteString) ref; 171 } 172 } 173 174 public static final int DESCRIPTION_FIELD_NUMBER = 422937596; 175 176 @SuppressWarnings("serial") 177 private volatile java.lang.Object description_ = ""; 178 /** 179 * 180 * 181 * <pre> 182 * An optional textual description of the resource; provided by the client when the resource is created. 183 * </pre> 184 * 185 * <code>optional string description = 422937596;</code> 186 * 187 * @return Whether the description field is set. 188 */ 189 @java.lang.Override hasDescription()190 public boolean hasDescription() { 191 return ((bitField0_ & 0x00000004) != 0); 192 } 193 /** 194 * 195 * 196 * <pre> 197 * An optional textual description of the resource; provided by the client when the resource is created. 198 * </pre> 199 * 200 * <code>optional string description = 422937596;</code> 201 * 202 * @return The description. 203 */ 204 @java.lang.Override getDescription()205 public java.lang.String getDescription() { 206 java.lang.Object ref = description_; 207 if (ref instanceof java.lang.String) { 208 return (java.lang.String) ref; 209 } else { 210 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 211 java.lang.String s = bs.toStringUtf8(); 212 description_ = s; 213 return s; 214 } 215 } 216 /** 217 * 218 * 219 * <pre> 220 * An optional textual description of the resource; provided by the client when the resource is created. 221 * </pre> 222 * 223 * <code>optional string description = 422937596;</code> 224 * 225 * @return The bytes for description. 226 */ 227 @java.lang.Override getDescriptionBytes()228 public com.google.protobuf.ByteString getDescriptionBytes() { 229 java.lang.Object ref = description_; 230 if (ref instanceof java.lang.String) { 231 com.google.protobuf.ByteString b = 232 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 233 description_ = b; 234 return b; 235 } else { 236 return (com.google.protobuf.ByteString) ref; 237 } 238 } 239 240 public static final int ID_FIELD_NUMBER = 3355; 241 private long id_ = 0L; 242 /** 243 * 244 * 245 * <pre> 246 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 247 * </pre> 248 * 249 * <code>optional uint64 id = 3355;</code> 250 * 251 * @return Whether the id field is set. 252 */ 253 @java.lang.Override hasId()254 public boolean hasId() { 255 return ((bitField0_ & 0x00000008) != 0); 256 } 257 /** 258 * 259 * 260 * <pre> 261 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 262 * </pre> 263 * 264 * <code>optional uint64 id = 3355;</code> 265 * 266 * @return The id. 267 */ 268 @java.lang.Override getId()269 public long getId() { 270 return id_; 271 } 272 273 public static final int KIND_FIELD_NUMBER = 3292052; 274 275 @SuppressWarnings("serial") 276 private volatile java.lang.Object kind_ = ""; 277 /** 278 * 279 * 280 * <pre> 281 * [Output Only] Type of resource. Always compute#license for licenses. 282 * </pre> 283 * 284 * <code>optional string kind = 3292052;</code> 285 * 286 * @return Whether the kind field is set. 287 */ 288 @java.lang.Override hasKind()289 public boolean hasKind() { 290 return ((bitField0_ & 0x00000010) != 0); 291 } 292 /** 293 * 294 * 295 * <pre> 296 * [Output Only] Type of resource. Always compute#license for licenses. 297 * </pre> 298 * 299 * <code>optional string kind = 3292052;</code> 300 * 301 * @return The kind. 302 */ 303 @java.lang.Override getKind()304 public java.lang.String getKind() { 305 java.lang.Object ref = kind_; 306 if (ref instanceof java.lang.String) { 307 return (java.lang.String) ref; 308 } else { 309 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 310 java.lang.String s = bs.toStringUtf8(); 311 kind_ = s; 312 return s; 313 } 314 } 315 /** 316 * 317 * 318 * <pre> 319 * [Output Only] Type of resource. Always compute#license for licenses. 320 * </pre> 321 * 322 * <code>optional string kind = 3292052;</code> 323 * 324 * @return The bytes for kind. 325 */ 326 @java.lang.Override getKindBytes()327 public com.google.protobuf.ByteString getKindBytes() { 328 java.lang.Object ref = kind_; 329 if (ref instanceof java.lang.String) { 330 com.google.protobuf.ByteString b = 331 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 332 kind_ = b; 333 return b; 334 } else { 335 return (com.google.protobuf.ByteString) ref; 336 } 337 } 338 339 public static final int LICENSE_CODE_FIELD_NUMBER = 1467179; 340 private long licenseCode_ = 0L; 341 /** 342 * 343 * 344 * <pre> 345 * [Output Only] The unique code used to attach this license to images, snapshots, and disks. 346 * </pre> 347 * 348 * <code>optional uint64 license_code = 1467179;</code> 349 * 350 * @return Whether the licenseCode field is set. 351 */ 352 @java.lang.Override hasLicenseCode()353 public boolean hasLicenseCode() { 354 return ((bitField0_ & 0x00000020) != 0); 355 } 356 /** 357 * 358 * 359 * <pre> 360 * [Output Only] The unique code used to attach this license to images, snapshots, and disks. 361 * </pre> 362 * 363 * <code>optional uint64 license_code = 1467179;</code> 364 * 365 * @return The licenseCode. 366 */ 367 @java.lang.Override getLicenseCode()368 public long getLicenseCode() { 369 return licenseCode_; 370 } 371 372 public static final int NAME_FIELD_NUMBER = 3373707; 373 374 @SuppressWarnings("serial") 375 private volatile java.lang.Object name_ = ""; 376 /** 377 * 378 * 379 * <pre> 380 * Name of the resource. The name must be 1-63 characters long and comply with RFC1035. 381 * </pre> 382 * 383 * <code>optional string name = 3373707;</code> 384 * 385 * @return Whether the name field is set. 386 */ 387 @java.lang.Override hasName()388 public boolean hasName() { 389 return ((bitField0_ & 0x00000040) != 0); 390 } 391 /** 392 * 393 * 394 * <pre> 395 * Name of the resource. The name must be 1-63 characters long and comply with RFC1035. 396 * </pre> 397 * 398 * <code>optional string name = 3373707;</code> 399 * 400 * @return The name. 401 */ 402 @java.lang.Override getName()403 public java.lang.String getName() { 404 java.lang.Object ref = name_; 405 if (ref instanceof java.lang.String) { 406 return (java.lang.String) ref; 407 } else { 408 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 409 java.lang.String s = bs.toStringUtf8(); 410 name_ = s; 411 return s; 412 } 413 } 414 /** 415 * 416 * 417 * <pre> 418 * Name of the resource. The name must be 1-63 characters long and comply with RFC1035. 419 * </pre> 420 * 421 * <code>optional string name = 3373707;</code> 422 * 423 * @return The bytes for name. 424 */ 425 @java.lang.Override getNameBytes()426 public com.google.protobuf.ByteString getNameBytes() { 427 java.lang.Object ref = name_; 428 if (ref instanceof java.lang.String) { 429 com.google.protobuf.ByteString b = 430 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 431 name_ = b; 432 return b; 433 } else { 434 return (com.google.protobuf.ByteString) ref; 435 } 436 } 437 438 public static final int RESOURCE_REQUIREMENTS_FIELD_NUMBER = 214292769; 439 private com.google.cloud.compute.v1.LicenseResourceRequirements resourceRequirements_; 440 /** 441 * <code> 442 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 443 * </code> 444 * 445 * @return Whether the resourceRequirements field is set. 446 */ 447 @java.lang.Override hasResourceRequirements()448 public boolean hasResourceRequirements() { 449 return ((bitField0_ & 0x00000080) != 0); 450 } 451 /** 452 * <code> 453 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 454 * </code> 455 * 456 * @return The resourceRequirements. 457 */ 458 @java.lang.Override getResourceRequirements()459 public com.google.cloud.compute.v1.LicenseResourceRequirements getResourceRequirements() { 460 return resourceRequirements_ == null 461 ? com.google.cloud.compute.v1.LicenseResourceRequirements.getDefaultInstance() 462 : resourceRequirements_; 463 } 464 /** 465 * <code> 466 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 467 * </code> 468 */ 469 @java.lang.Override 470 public com.google.cloud.compute.v1.LicenseResourceRequirementsOrBuilder getResourceRequirementsOrBuilder()471 getResourceRequirementsOrBuilder() { 472 return resourceRequirements_ == null 473 ? com.google.cloud.compute.v1.LicenseResourceRequirements.getDefaultInstance() 474 : resourceRequirements_; 475 } 476 477 public static final int SELF_LINK_FIELD_NUMBER = 456214797; 478 479 @SuppressWarnings("serial") 480 private volatile java.lang.Object selfLink_ = ""; 481 /** 482 * 483 * 484 * <pre> 485 * [Output Only] Server-defined URL for the resource. 486 * </pre> 487 * 488 * <code>optional string self_link = 456214797;</code> 489 * 490 * @return Whether the selfLink field is set. 491 */ 492 @java.lang.Override hasSelfLink()493 public boolean hasSelfLink() { 494 return ((bitField0_ & 0x00000100) != 0); 495 } 496 /** 497 * 498 * 499 * <pre> 500 * [Output Only] Server-defined URL for the resource. 501 * </pre> 502 * 503 * <code>optional string self_link = 456214797;</code> 504 * 505 * @return The selfLink. 506 */ 507 @java.lang.Override getSelfLink()508 public java.lang.String getSelfLink() { 509 java.lang.Object ref = selfLink_; 510 if (ref instanceof java.lang.String) { 511 return (java.lang.String) ref; 512 } else { 513 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 514 java.lang.String s = bs.toStringUtf8(); 515 selfLink_ = s; 516 return s; 517 } 518 } 519 /** 520 * 521 * 522 * <pre> 523 * [Output Only] Server-defined URL for the resource. 524 * </pre> 525 * 526 * <code>optional string self_link = 456214797;</code> 527 * 528 * @return The bytes for selfLink. 529 */ 530 @java.lang.Override getSelfLinkBytes()531 public com.google.protobuf.ByteString getSelfLinkBytes() { 532 java.lang.Object ref = selfLink_; 533 if (ref instanceof java.lang.String) { 534 com.google.protobuf.ByteString b = 535 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 536 selfLink_ = b; 537 return b; 538 } else { 539 return (com.google.protobuf.ByteString) ref; 540 } 541 } 542 543 public static final int TRANSFERABLE_FIELD_NUMBER = 4349893; 544 private boolean transferable_ = false; 545 /** 546 * 547 * 548 * <pre> 549 * If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk. 550 * </pre> 551 * 552 * <code>optional bool transferable = 4349893;</code> 553 * 554 * @return Whether the transferable field is set. 555 */ 556 @java.lang.Override hasTransferable()557 public boolean hasTransferable() { 558 return ((bitField0_ & 0x00000200) != 0); 559 } 560 /** 561 * 562 * 563 * <pre> 564 * If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk. 565 * </pre> 566 * 567 * <code>optional bool transferable = 4349893;</code> 568 * 569 * @return The transferable. 570 */ 571 @java.lang.Override getTransferable()572 public boolean getTransferable() { 573 return transferable_; 574 } 575 576 private byte memoizedIsInitialized = -1; 577 578 @java.lang.Override isInitialized()579 public final boolean isInitialized() { 580 byte isInitialized = memoizedIsInitialized; 581 if (isInitialized == 1) return true; 582 if (isInitialized == 0) return false; 583 584 memoizedIsInitialized = 1; 585 return true; 586 } 587 588 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)589 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 590 if (((bitField0_ & 0x00000008) != 0)) { 591 output.writeUInt64(3355, id_); 592 } 593 if (((bitField0_ & 0x00000020) != 0)) { 594 output.writeUInt64(1467179, licenseCode_); 595 } 596 if (((bitField0_ & 0x00000010) != 0)) { 597 com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_); 598 } 599 if (((bitField0_ & 0x00000040) != 0)) { 600 com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); 601 } 602 if (((bitField0_ & 0x00000200) != 0)) { 603 output.writeBool(4349893, transferable_); 604 } 605 if (((bitField0_ & 0x00000002) != 0)) { 606 com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_); 607 } 608 if (((bitField0_ & 0x00000080) != 0)) { 609 output.writeMessage(214292769, getResourceRequirements()); 610 } 611 if (((bitField0_ & 0x00000001) != 0)) { 612 output.writeBool(372412622, chargesUseFee_); 613 } 614 if (((bitField0_ & 0x00000004) != 0)) { 615 com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); 616 } 617 if (((bitField0_ & 0x00000100) != 0)) { 618 com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); 619 } 620 getUnknownFields().writeTo(output); 621 } 622 623 @java.lang.Override getSerializedSize()624 public int getSerializedSize() { 625 int size = memoizedSize; 626 if (size != -1) return size; 627 628 size = 0; 629 if (((bitField0_ & 0x00000008) != 0)) { 630 size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_); 631 } 632 if (((bitField0_ & 0x00000020) != 0)) { 633 size += com.google.protobuf.CodedOutputStream.computeUInt64Size(1467179, licenseCode_); 634 } 635 if (((bitField0_ & 0x00000010) != 0)) { 636 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_); 637 } 638 if (((bitField0_ & 0x00000040) != 0)) { 639 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); 640 } 641 if (((bitField0_ & 0x00000200) != 0)) { 642 size += com.google.protobuf.CodedOutputStream.computeBoolSize(4349893, transferable_); 643 } 644 if (((bitField0_ & 0x00000002) != 0)) { 645 size += 646 com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_); 647 } 648 if (((bitField0_ & 0x00000080) != 0)) { 649 size += 650 com.google.protobuf.CodedOutputStream.computeMessageSize( 651 214292769, getResourceRequirements()); 652 } 653 if (((bitField0_ & 0x00000001) != 0)) { 654 size += com.google.protobuf.CodedOutputStream.computeBoolSize(372412622, chargesUseFee_); 655 } 656 if (((bitField0_ & 0x00000004) != 0)) { 657 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); 658 } 659 if (((bitField0_ & 0x00000100) != 0)) { 660 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); 661 } 662 size += getUnknownFields().getSerializedSize(); 663 memoizedSize = size; 664 return size; 665 } 666 667 @java.lang.Override equals(final java.lang.Object obj)668 public boolean equals(final java.lang.Object obj) { 669 if (obj == this) { 670 return true; 671 } 672 if (!(obj instanceof com.google.cloud.compute.v1.License)) { 673 return super.equals(obj); 674 } 675 com.google.cloud.compute.v1.License other = (com.google.cloud.compute.v1.License) obj; 676 677 if (hasChargesUseFee() != other.hasChargesUseFee()) return false; 678 if (hasChargesUseFee()) { 679 if (getChargesUseFee() != other.getChargesUseFee()) return false; 680 } 681 if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; 682 if (hasCreationTimestamp()) { 683 if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false; 684 } 685 if (hasDescription() != other.hasDescription()) return false; 686 if (hasDescription()) { 687 if (!getDescription().equals(other.getDescription())) return false; 688 } 689 if (hasId() != other.hasId()) return false; 690 if (hasId()) { 691 if (getId() != other.getId()) return false; 692 } 693 if (hasKind() != other.hasKind()) return false; 694 if (hasKind()) { 695 if (!getKind().equals(other.getKind())) return false; 696 } 697 if (hasLicenseCode() != other.hasLicenseCode()) return false; 698 if (hasLicenseCode()) { 699 if (getLicenseCode() != other.getLicenseCode()) return false; 700 } 701 if (hasName() != other.hasName()) return false; 702 if (hasName()) { 703 if (!getName().equals(other.getName())) return false; 704 } 705 if (hasResourceRequirements() != other.hasResourceRequirements()) return false; 706 if (hasResourceRequirements()) { 707 if (!getResourceRequirements().equals(other.getResourceRequirements())) return false; 708 } 709 if (hasSelfLink() != other.hasSelfLink()) return false; 710 if (hasSelfLink()) { 711 if (!getSelfLink().equals(other.getSelfLink())) return false; 712 } 713 if (hasTransferable() != other.hasTransferable()) return false; 714 if (hasTransferable()) { 715 if (getTransferable() != other.getTransferable()) return false; 716 } 717 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 718 return true; 719 } 720 721 @java.lang.Override hashCode()722 public int hashCode() { 723 if (memoizedHashCode != 0) { 724 return memoizedHashCode; 725 } 726 int hash = 41; 727 hash = (19 * hash) + getDescriptor().hashCode(); 728 if (hasChargesUseFee()) { 729 hash = (37 * hash) + CHARGES_USE_FEE_FIELD_NUMBER; 730 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getChargesUseFee()); 731 } 732 if (hasCreationTimestamp()) { 733 hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; 734 hash = (53 * hash) + getCreationTimestamp().hashCode(); 735 } 736 if (hasDescription()) { 737 hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; 738 hash = (53 * hash) + getDescription().hashCode(); 739 } 740 if (hasId()) { 741 hash = (37 * hash) + ID_FIELD_NUMBER; 742 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); 743 } 744 if (hasKind()) { 745 hash = (37 * hash) + KIND_FIELD_NUMBER; 746 hash = (53 * hash) + getKind().hashCode(); 747 } 748 if (hasLicenseCode()) { 749 hash = (37 * hash) + LICENSE_CODE_FIELD_NUMBER; 750 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLicenseCode()); 751 } 752 if (hasName()) { 753 hash = (37 * hash) + NAME_FIELD_NUMBER; 754 hash = (53 * hash) + getName().hashCode(); 755 } 756 if (hasResourceRequirements()) { 757 hash = (37 * hash) + RESOURCE_REQUIREMENTS_FIELD_NUMBER; 758 hash = (53 * hash) + getResourceRequirements().hashCode(); 759 } 760 if (hasSelfLink()) { 761 hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; 762 hash = (53 * hash) + getSelfLink().hashCode(); 763 } 764 if (hasTransferable()) { 765 hash = (37 * hash) + TRANSFERABLE_FIELD_NUMBER; 766 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTransferable()); 767 } 768 hash = (29 * hash) + getUnknownFields().hashCode(); 769 memoizedHashCode = hash; 770 return hash; 771 } 772 parseFrom(java.nio.ByteBuffer data)773 public static com.google.cloud.compute.v1.License parseFrom(java.nio.ByteBuffer data) 774 throws com.google.protobuf.InvalidProtocolBufferException { 775 return PARSER.parseFrom(data); 776 } 777 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)778 public static com.google.cloud.compute.v1.License parseFrom( 779 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 780 throws com.google.protobuf.InvalidProtocolBufferException { 781 return PARSER.parseFrom(data, extensionRegistry); 782 } 783 parseFrom(com.google.protobuf.ByteString data)784 public static com.google.cloud.compute.v1.License parseFrom(com.google.protobuf.ByteString data) 785 throws com.google.protobuf.InvalidProtocolBufferException { 786 return PARSER.parseFrom(data); 787 } 788 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)789 public static com.google.cloud.compute.v1.License parseFrom( 790 com.google.protobuf.ByteString data, 791 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 792 throws com.google.protobuf.InvalidProtocolBufferException { 793 return PARSER.parseFrom(data, extensionRegistry); 794 } 795 parseFrom(byte[] data)796 public static com.google.cloud.compute.v1.License parseFrom(byte[] data) 797 throws com.google.protobuf.InvalidProtocolBufferException { 798 return PARSER.parseFrom(data); 799 } 800 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)801 public static com.google.cloud.compute.v1.License parseFrom( 802 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 803 throws com.google.protobuf.InvalidProtocolBufferException { 804 return PARSER.parseFrom(data, extensionRegistry); 805 } 806 parseFrom(java.io.InputStream input)807 public static com.google.cloud.compute.v1.License parseFrom(java.io.InputStream input) 808 throws java.io.IOException { 809 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 810 } 811 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)812 public static com.google.cloud.compute.v1.License parseFrom( 813 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 814 throws java.io.IOException { 815 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 816 PARSER, input, extensionRegistry); 817 } 818 parseDelimitedFrom(java.io.InputStream input)819 public static com.google.cloud.compute.v1.License parseDelimitedFrom(java.io.InputStream input) 820 throws java.io.IOException { 821 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 822 } 823 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)824 public static com.google.cloud.compute.v1.License parseDelimitedFrom( 825 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 826 throws java.io.IOException { 827 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 828 PARSER, input, extensionRegistry); 829 } 830 parseFrom( com.google.protobuf.CodedInputStream input)831 public static com.google.cloud.compute.v1.License parseFrom( 832 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 833 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 834 } 835 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)836 public static com.google.cloud.compute.v1.License parseFrom( 837 com.google.protobuf.CodedInputStream input, 838 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 839 throws java.io.IOException { 840 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 841 PARSER, input, extensionRegistry); 842 } 843 844 @java.lang.Override newBuilderForType()845 public Builder newBuilderForType() { 846 return newBuilder(); 847 } 848 newBuilder()849 public static Builder newBuilder() { 850 return DEFAULT_INSTANCE.toBuilder(); 851 } 852 newBuilder(com.google.cloud.compute.v1.License prototype)853 public static Builder newBuilder(com.google.cloud.compute.v1.License prototype) { 854 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 855 } 856 857 @java.lang.Override toBuilder()858 public Builder toBuilder() { 859 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 860 } 861 862 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)863 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 864 Builder builder = new Builder(parent); 865 return builder; 866 } 867 /** 868 * 869 * 870 * <pre> 871 * Represents a License resource. A License represents billing and aggregate usage data for public and marketplace images. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. 872 * </pre> 873 * 874 * Protobuf type {@code google.cloud.compute.v1.License} 875 */ 876 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 877 implements 878 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.License) 879 com.google.cloud.compute.v1.LicenseOrBuilder { getDescriptor()880 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 881 return com.google.cloud.compute.v1.Compute 882 .internal_static_google_cloud_compute_v1_License_descriptor; 883 } 884 885 @java.lang.Override 886 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()887 internalGetFieldAccessorTable() { 888 return com.google.cloud.compute.v1.Compute 889 .internal_static_google_cloud_compute_v1_License_fieldAccessorTable 890 .ensureFieldAccessorsInitialized( 891 com.google.cloud.compute.v1.License.class, 892 com.google.cloud.compute.v1.License.Builder.class); 893 } 894 895 // Construct using com.google.cloud.compute.v1.License.newBuilder() Builder()896 private Builder() { 897 maybeForceBuilderInitialization(); 898 } 899 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)900 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 901 super(parent); 902 maybeForceBuilderInitialization(); 903 } 904 maybeForceBuilderInitialization()905 private void maybeForceBuilderInitialization() { 906 if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { 907 getResourceRequirementsFieldBuilder(); 908 } 909 } 910 911 @java.lang.Override clear()912 public Builder clear() { 913 super.clear(); 914 bitField0_ = 0; 915 chargesUseFee_ = false; 916 creationTimestamp_ = ""; 917 description_ = ""; 918 id_ = 0L; 919 kind_ = ""; 920 licenseCode_ = 0L; 921 name_ = ""; 922 resourceRequirements_ = null; 923 if (resourceRequirementsBuilder_ != null) { 924 resourceRequirementsBuilder_.dispose(); 925 resourceRequirementsBuilder_ = null; 926 } 927 selfLink_ = ""; 928 transferable_ = false; 929 return this; 930 } 931 932 @java.lang.Override getDescriptorForType()933 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 934 return com.google.cloud.compute.v1.Compute 935 .internal_static_google_cloud_compute_v1_License_descriptor; 936 } 937 938 @java.lang.Override getDefaultInstanceForType()939 public com.google.cloud.compute.v1.License getDefaultInstanceForType() { 940 return com.google.cloud.compute.v1.License.getDefaultInstance(); 941 } 942 943 @java.lang.Override build()944 public com.google.cloud.compute.v1.License build() { 945 com.google.cloud.compute.v1.License result = buildPartial(); 946 if (!result.isInitialized()) { 947 throw newUninitializedMessageException(result); 948 } 949 return result; 950 } 951 952 @java.lang.Override buildPartial()953 public com.google.cloud.compute.v1.License buildPartial() { 954 com.google.cloud.compute.v1.License result = new com.google.cloud.compute.v1.License(this); 955 if (bitField0_ != 0) { 956 buildPartial0(result); 957 } 958 onBuilt(); 959 return result; 960 } 961 buildPartial0(com.google.cloud.compute.v1.License result)962 private void buildPartial0(com.google.cloud.compute.v1.License result) { 963 int from_bitField0_ = bitField0_; 964 int to_bitField0_ = 0; 965 if (((from_bitField0_ & 0x00000001) != 0)) { 966 result.chargesUseFee_ = chargesUseFee_; 967 to_bitField0_ |= 0x00000001; 968 } 969 if (((from_bitField0_ & 0x00000002) != 0)) { 970 result.creationTimestamp_ = creationTimestamp_; 971 to_bitField0_ |= 0x00000002; 972 } 973 if (((from_bitField0_ & 0x00000004) != 0)) { 974 result.description_ = description_; 975 to_bitField0_ |= 0x00000004; 976 } 977 if (((from_bitField0_ & 0x00000008) != 0)) { 978 result.id_ = id_; 979 to_bitField0_ |= 0x00000008; 980 } 981 if (((from_bitField0_ & 0x00000010) != 0)) { 982 result.kind_ = kind_; 983 to_bitField0_ |= 0x00000010; 984 } 985 if (((from_bitField0_ & 0x00000020) != 0)) { 986 result.licenseCode_ = licenseCode_; 987 to_bitField0_ |= 0x00000020; 988 } 989 if (((from_bitField0_ & 0x00000040) != 0)) { 990 result.name_ = name_; 991 to_bitField0_ |= 0x00000040; 992 } 993 if (((from_bitField0_ & 0x00000080) != 0)) { 994 result.resourceRequirements_ = 995 resourceRequirementsBuilder_ == null 996 ? resourceRequirements_ 997 : resourceRequirementsBuilder_.build(); 998 to_bitField0_ |= 0x00000080; 999 } 1000 if (((from_bitField0_ & 0x00000100) != 0)) { 1001 result.selfLink_ = selfLink_; 1002 to_bitField0_ |= 0x00000100; 1003 } 1004 if (((from_bitField0_ & 0x00000200) != 0)) { 1005 result.transferable_ = transferable_; 1006 to_bitField0_ |= 0x00000200; 1007 } 1008 result.bitField0_ |= to_bitField0_; 1009 } 1010 1011 @java.lang.Override clone()1012 public Builder clone() { 1013 return super.clone(); 1014 } 1015 1016 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1017 public Builder setField( 1018 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1019 return super.setField(field, value); 1020 } 1021 1022 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1023 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1024 return super.clearField(field); 1025 } 1026 1027 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1028 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1029 return super.clearOneof(oneof); 1030 } 1031 1032 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1033 public Builder setRepeatedField( 1034 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1035 return super.setRepeatedField(field, index, value); 1036 } 1037 1038 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1039 public Builder addRepeatedField( 1040 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1041 return super.addRepeatedField(field, value); 1042 } 1043 1044 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1045 public Builder mergeFrom(com.google.protobuf.Message other) { 1046 if (other instanceof com.google.cloud.compute.v1.License) { 1047 return mergeFrom((com.google.cloud.compute.v1.License) other); 1048 } else { 1049 super.mergeFrom(other); 1050 return this; 1051 } 1052 } 1053 mergeFrom(com.google.cloud.compute.v1.License other)1054 public Builder mergeFrom(com.google.cloud.compute.v1.License other) { 1055 if (other == com.google.cloud.compute.v1.License.getDefaultInstance()) return this; 1056 if (other.hasChargesUseFee()) { 1057 setChargesUseFee(other.getChargesUseFee()); 1058 } 1059 if (other.hasCreationTimestamp()) { 1060 creationTimestamp_ = other.creationTimestamp_; 1061 bitField0_ |= 0x00000002; 1062 onChanged(); 1063 } 1064 if (other.hasDescription()) { 1065 description_ = other.description_; 1066 bitField0_ |= 0x00000004; 1067 onChanged(); 1068 } 1069 if (other.hasId()) { 1070 setId(other.getId()); 1071 } 1072 if (other.hasKind()) { 1073 kind_ = other.kind_; 1074 bitField0_ |= 0x00000010; 1075 onChanged(); 1076 } 1077 if (other.hasLicenseCode()) { 1078 setLicenseCode(other.getLicenseCode()); 1079 } 1080 if (other.hasName()) { 1081 name_ = other.name_; 1082 bitField0_ |= 0x00000040; 1083 onChanged(); 1084 } 1085 if (other.hasResourceRequirements()) { 1086 mergeResourceRequirements(other.getResourceRequirements()); 1087 } 1088 if (other.hasSelfLink()) { 1089 selfLink_ = other.selfLink_; 1090 bitField0_ |= 0x00000100; 1091 onChanged(); 1092 } 1093 if (other.hasTransferable()) { 1094 setTransferable(other.getTransferable()); 1095 } 1096 this.mergeUnknownFields(other.getUnknownFields()); 1097 onChanged(); 1098 return this; 1099 } 1100 1101 @java.lang.Override isInitialized()1102 public final boolean isInitialized() { 1103 return true; 1104 } 1105 1106 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1107 public Builder mergeFrom( 1108 com.google.protobuf.CodedInputStream input, 1109 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1110 throws java.io.IOException { 1111 if (extensionRegistry == null) { 1112 throw new java.lang.NullPointerException(); 1113 } 1114 try { 1115 boolean done = false; 1116 while (!done) { 1117 int tag = input.readTag(); 1118 switch (tag) { 1119 case 0: 1120 done = true; 1121 break; 1122 case 26840: 1123 { 1124 id_ = input.readUInt64(); 1125 bitField0_ |= 0x00000008; 1126 break; 1127 } // case 26840 1128 case 11737432: 1129 { 1130 licenseCode_ = input.readUInt64(); 1131 bitField0_ |= 0x00000020; 1132 break; 1133 } // case 11737432 1134 case 26336418: 1135 { 1136 kind_ = input.readStringRequireUtf8(); 1137 bitField0_ |= 0x00000010; 1138 break; 1139 } // case 26336418 1140 case 26989658: 1141 { 1142 name_ = input.readStringRequireUtf8(); 1143 bitField0_ |= 0x00000040; 1144 break; 1145 } // case 26989658 1146 case 34799144: 1147 { 1148 transferable_ = input.readBool(); 1149 bitField0_ |= 0x00000200; 1150 break; 1151 } // case 34799144 1152 case 244202930: 1153 { 1154 creationTimestamp_ = input.readStringRequireUtf8(); 1155 bitField0_ |= 0x00000002; 1156 break; 1157 } // case 244202930 1158 case 1714342154: 1159 { 1160 input.readMessage( 1161 getResourceRequirementsFieldBuilder().getBuilder(), extensionRegistry); 1162 bitField0_ |= 0x00000080; 1163 break; 1164 } // case 1714342154 1165 case -1315666320: 1166 { 1167 chargesUseFee_ = input.readBool(); 1168 bitField0_ |= 0x00000001; 1169 break; 1170 } // case -1315666320 1171 case -911466526: 1172 { 1173 description_ = input.readStringRequireUtf8(); 1174 bitField0_ |= 0x00000004; 1175 break; 1176 } // case -911466526 1177 case -645248918: 1178 { 1179 selfLink_ = input.readStringRequireUtf8(); 1180 bitField0_ |= 0x00000100; 1181 break; 1182 } // case -645248918 1183 default: 1184 { 1185 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1186 done = true; // was an endgroup tag 1187 } 1188 break; 1189 } // default: 1190 } // switch (tag) 1191 } // while (!done) 1192 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1193 throw e.unwrapIOException(); 1194 } finally { 1195 onChanged(); 1196 } // finally 1197 return this; 1198 } 1199 1200 private int bitField0_; 1201 1202 private boolean chargesUseFee_; 1203 /** 1204 * 1205 * 1206 * <pre> 1207 * [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee. 1208 * </pre> 1209 * 1210 * <code>optional bool charges_use_fee = 372412622;</code> 1211 * 1212 * @return Whether the chargesUseFee field is set. 1213 */ 1214 @java.lang.Override hasChargesUseFee()1215 public boolean hasChargesUseFee() { 1216 return ((bitField0_ & 0x00000001) != 0); 1217 } 1218 /** 1219 * 1220 * 1221 * <pre> 1222 * [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee. 1223 * </pre> 1224 * 1225 * <code>optional bool charges_use_fee = 372412622;</code> 1226 * 1227 * @return The chargesUseFee. 1228 */ 1229 @java.lang.Override getChargesUseFee()1230 public boolean getChargesUseFee() { 1231 return chargesUseFee_; 1232 } 1233 /** 1234 * 1235 * 1236 * <pre> 1237 * [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee. 1238 * </pre> 1239 * 1240 * <code>optional bool charges_use_fee = 372412622;</code> 1241 * 1242 * @param value The chargesUseFee to set. 1243 * @return This builder for chaining. 1244 */ setChargesUseFee(boolean value)1245 public Builder setChargesUseFee(boolean value) { 1246 1247 chargesUseFee_ = value; 1248 bitField0_ |= 0x00000001; 1249 onChanged(); 1250 return this; 1251 } 1252 /** 1253 * 1254 * 1255 * <pre> 1256 * [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee. 1257 * </pre> 1258 * 1259 * <code>optional bool charges_use_fee = 372412622;</code> 1260 * 1261 * @return This builder for chaining. 1262 */ clearChargesUseFee()1263 public Builder clearChargesUseFee() { 1264 bitField0_ = (bitField0_ & ~0x00000001); 1265 chargesUseFee_ = false; 1266 onChanged(); 1267 return this; 1268 } 1269 1270 private java.lang.Object creationTimestamp_ = ""; 1271 /** 1272 * 1273 * 1274 * <pre> 1275 * [Output Only] Creation timestamp in RFC3339 text format. 1276 * </pre> 1277 * 1278 * <code>optional string creation_timestamp = 30525366;</code> 1279 * 1280 * @return Whether the creationTimestamp field is set. 1281 */ hasCreationTimestamp()1282 public boolean hasCreationTimestamp() { 1283 return ((bitField0_ & 0x00000002) != 0); 1284 } 1285 /** 1286 * 1287 * 1288 * <pre> 1289 * [Output Only] Creation timestamp in RFC3339 text format. 1290 * </pre> 1291 * 1292 * <code>optional string creation_timestamp = 30525366;</code> 1293 * 1294 * @return The creationTimestamp. 1295 */ getCreationTimestamp()1296 public java.lang.String getCreationTimestamp() { 1297 java.lang.Object ref = creationTimestamp_; 1298 if (!(ref instanceof java.lang.String)) { 1299 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1300 java.lang.String s = bs.toStringUtf8(); 1301 creationTimestamp_ = s; 1302 return s; 1303 } else { 1304 return (java.lang.String) ref; 1305 } 1306 } 1307 /** 1308 * 1309 * 1310 * <pre> 1311 * [Output Only] Creation timestamp in RFC3339 text format. 1312 * </pre> 1313 * 1314 * <code>optional string creation_timestamp = 30525366;</code> 1315 * 1316 * @return The bytes for creationTimestamp. 1317 */ getCreationTimestampBytes()1318 public com.google.protobuf.ByteString getCreationTimestampBytes() { 1319 java.lang.Object ref = creationTimestamp_; 1320 if (ref instanceof String) { 1321 com.google.protobuf.ByteString b = 1322 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1323 creationTimestamp_ = b; 1324 return b; 1325 } else { 1326 return (com.google.protobuf.ByteString) ref; 1327 } 1328 } 1329 /** 1330 * 1331 * 1332 * <pre> 1333 * [Output Only] Creation timestamp in RFC3339 text format. 1334 * </pre> 1335 * 1336 * <code>optional string creation_timestamp = 30525366;</code> 1337 * 1338 * @param value The creationTimestamp to set. 1339 * @return This builder for chaining. 1340 */ setCreationTimestamp(java.lang.String value)1341 public Builder setCreationTimestamp(java.lang.String value) { 1342 if (value == null) { 1343 throw new NullPointerException(); 1344 } 1345 creationTimestamp_ = value; 1346 bitField0_ |= 0x00000002; 1347 onChanged(); 1348 return this; 1349 } 1350 /** 1351 * 1352 * 1353 * <pre> 1354 * [Output Only] Creation timestamp in RFC3339 text format. 1355 * </pre> 1356 * 1357 * <code>optional string creation_timestamp = 30525366;</code> 1358 * 1359 * @return This builder for chaining. 1360 */ clearCreationTimestamp()1361 public Builder clearCreationTimestamp() { 1362 creationTimestamp_ = getDefaultInstance().getCreationTimestamp(); 1363 bitField0_ = (bitField0_ & ~0x00000002); 1364 onChanged(); 1365 return this; 1366 } 1367 /** 1368 * 1369 * 1370 * <pre> 1371 * [Output Only] Creation timestamp in RFC3339 text format. 1372 * </pre> 1373 * 1374 * <code>optional string creation_timestamp = 30525366;</code> 1375 * 1376 * @param value The bytes for creationTimestamp to set. 1377 * @return This builder for chaining. 1378 */ setCreationTimestampBytes(com.google.protobuf.ByteString value)1379 public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) { 1380 if (value == null) { 1381 throw new NullPointerException(); 1382 } 1383 checkByteStringIsUtf8(value); 1384 creationTimestamp_ = value; 1385 bitField0_ |= 0x00000002; 1386 onChanged(); 1387 return this; 1388 } 1389 1390 private java.lang.Object description_ = ""; 1391 /** 1392 * 1393 * 1394 * <pre> 1395 * An optional textual description of the resource; provided by the client when the resource is created. 1396 * </pre> 1397 * 1398 * <code>optional string description = 422937596;</code> 1399 * 1400 * @return Whether the description field is set. 1401 */ hasDescription()1402 public boolean hasDescription() { 1403 return ((bitField0_ & 0x00000004) != 0); 1404 } 1405 /** 1406 * 1407 * 1408 * <pre> 1409 * An optional textual description of the resource; provided by the client when the resource is created. 1410 * </pre> 1411 * 1412 * <code>optional string description = 422937596;</code> 1413 * 1414 * @return The description. 1415 */ getDescription()1416 public java.lang.String getDescription() { 1417 java.lang.Object ref = description_; 1418 if (!(ref instanceof java.lang.String)) { 1419 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1420 java.lang.String s = bs.toStringUtf8(); 1421 description_ = s; 1422 return s; 1423 } else { 1424 return (java.lang.String) ref; 1425 } 1426 } 1427 /** 1428 * 1429 * 1430 * <pre> 1431 * An optional textual description of the resource; provided by the client when the resource is created. 1432 * </pre> 1433 * 1434 * <code>optional string description = 422937596;</code> 1435 * 1436 * @return The bytes for description. 1437 */ getDescriptionBytes()1438 public com.google.protobuf.ByteString getDescriptionBytes() { 1439 java.lang.Object ref = description_; 1440 if (ref instanceof String) { 1441 com.google.protobuf.ByteString b = 1442 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1443 description_ = b; 1444 return b; 1445 } else { 1446 return (com.google.protobuf.ByteString) ref; 1447 } 1448 } 1449 /** 1450 * 1451 * 1452 * <pre> 1453 * An optional textual description of the resource; provided by the client when the resource is created. 1454 * </pre> 1455 * 1456 * <code>optional string description = 422937596;</code> 1457 * 1458 * @param value The description to set. 1459 * @return This builder for chaining. 1460 */ setDescription(java.lang.String value)1461 public Builder setDescription(java.lang.String value) { 1462 if (value == null) { 1463 throw new NullPointerException(); 1464 } 1465 description_ = value; 1466 bitField0_ |= 0x00000004; 1467 onChanged(); 1468 return this; 1469 } 1470 /** 1471 * 1472 * 1473 * <pre> 1474 * An optional textual description of the resource; provided by the client when the resource is created. 1475 * </pre> 1476 * 1477 * <code>optional string description = 422937596;</code> 1478 * 1479 * @return This builder for chaining. 1480 */ clearDescription()1481 public Builder clearDescription() { 1482 description_ = getDefaultInstance().getDescription(); 1483 bitField0_ = (bitField0_ & ~0x00000004); 1484 onChanged(); 1485 return this; 1486 } 1487 /** 1488 * 1489 * 1490 * <pre> 1491 * An optional textual description of the resource; provided by the client when the resource is created. 1492 * </pre> 1493 * 1494 * <code>optional string description = 422937596;</code> 1495 * 1496 * @param value The bytes for description to set. 1497 * @return This builder for chaining. 1498 */ setDescriptionBytes(com.google.protobuf.ByteString value)1499 public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { 1500 if (value == null) { 1501 throw new NullPointerException(); 1502 } 1503 checkByteStringIsUtf8(value); 1504 description_ = value; 1505 bitField0_ |= 0x00000004; 1506 onChanged(); 1507 return this; 1508 } 1509 1510 private long id_; 1511 /** 1512 * 1513 * 1514 * <pre> 1515 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1516 * </pre> 1517 * 1518 * <code>optional uint64 id = 3355;</code> 1519 * 1520 * @return Whether the id field is set. 1521 */ 1522 @java.lang.Override hasId()1523 public boolean hasId() { 1524 return ((bitField0_ & 0x00000008) != 0); 1525 } 1526 /** 1527 * 1528 * 1529 * <pre> 1530 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1531 * </pre> 1532 * 1533 * <code>optional uint64 id = 3355;</code> 1534 * 1535 * @return The id. 1536 */ 1537 @java.lang.Override getId()1538 public long getId() { 1539 return id_; 1540 } 1541 /** 1542 * 1543 * 1544 * <pre> 1545 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1546 * </pre> 1547 * 1548 * <code>optional uint64 id = 3355;</code> 1549 * 1550 * @param value The id to set. 1551 * @return This builder for chaining. 1552 */ setId(long value)1553 public Builder setId(long value) { 1554 1555 id_ = value; 1556 bitField0_ |= 0x00000008; 1557 onChanged(); 1558 return this; 1559 } 1560 /** 1561 * 1562 * 1563 * <pre> 1564 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1565 * </pre> 1566 * 1567 * <code>optional uint64 id = 3355;</code> 1568 * 1569 * @return This builder for chaining. 1570 */ clearId()1571 public Builder clearId() { 1572 bitField0_ = (bitField0_ & ~0x00000008); 1573 id_ = 0L; 1574 onChanged(); 1575 return this; 1576 } 1577 1578 private java.lang.Object kind_ = ""; 1579 /** 1580 * 1581 * 1582 * <pre> 1583 * [Output Only] Type of resource. Always compute#license for licenses. 1584 * </pre> 1585 * 1586 * <code>optional string kind = 3292052;</code> 1587 * 1588 * @return Whether the kind field is set. 1589 */ hasKind()1590 public boolean hasKind() { 1591 return ((bitField0_ & 0x00000010) != 0); 1592 } 1593 /** 1594 * 1595 * 1596 * <pre> 1597 * [Output Only] Type of resource. Always compute#license for licenses. 1598 * </pre> 1599 * 1600 * <code>optional string kind = 3292052;</code> 1601 * 1602 * @return The kind. 1603 */ getKind()1604 public java.lang.String getKind() { 1605 java.lang.Object ref = kind_; 1606 if (!(ref instanceof java.lang.String)) { 1607 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1608 java.lang.String s = bs.toStringUtf8(); 1609 kind_ = s; 1610 return s; 1611 } else { 1612 return (java.lang.String) ref; 1613 } 1614 } 1615 /** 1616 * 1617 * 1618 * <pre> 1619 * [Output Only] Type of resource. Always compute#license for licenses. 1620 * </pre> 1621 * 1622 * <code>optional string kind = 3292052;</code> 1623 * 1624 * @return The bytes for kind. 1625 */ getKindBytes()1626 public com.google.protobuf.ByteString getKindBytes() { 1627 java.lang.Object ref = kind_; 1628 if (ref instanceof String) { 1629 com.google.protobuf.ByteString b = 1630 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1631 kind_ = b; 1632 return b; 1633 } else { 1634 return (com.google.protobuf.ByteString) ref; 1635 } 1636 } 1637 /** 1638 * 1639 * 1640 * <pre> 1641 * [Output Only] Type of resource. Always compute#license for licenses. 1642 * </pre> 1643 * 1644 * <code>optional string kind = 3292052;</code> 1645 * 1646 * @param value The kind to set. 1647 * @return This builder for chaining. 1648 */ setKind(java.lang.String value)1649 public Builder setKind(java.lang.String value) { 1650 if (value == null) { 1651 throw new NullPointerException(); 1652 } 1653 kind_ = value; 1654 bitField0_ |= 0x00000010; 1655 onChanged(); 1656 return this; 1657 } 1658 /** 1659 * 1660 * 1661 * <pre> 1662 * [Output Only] Type of resource. Always compute#license for licenses. 1663 * </pre> 1664 * 1665 * <code>optional string kind = 3292052;</code> 1666 * 1667 * @return This builder for chaining. 1668 */ clearKind()1669 public Builder clearKind() { 1670 kind_ = getDefaultInstance().getKind(); 1671 bitField0_ = (bitField0_ & ~0x00000010); 1672 onChanged(); 1673 return this; 1674 } 1675 /** 1676 * 1677 * 1678 * <pre> 1679 * [Output Only] Type of resource. Always compute#license for licenses. 1680 * </pre> 1681 * 1682 * <code>optional string kind = 3292052;</code> 1683 * 1684 * @param value The bytes for kind to set. 1685 * @return This builder for chaining. 1686 */ setKindBytes(com.google.protobuf.ByteString value)1687 public Builder setKindBytes(com.google.protobuf.ByteString value) { 1688 if (value == null) { 1689 throw new NullPointerException(); 1690 } 1691 checkByteStringIsUtf8(value); 1692 kind_ = value; 1693 bitField0_ |= 0x00000010; 1694 onChanged(); 1695 return this; 1696 } 1697 1698 private long licenseCode_; 1699 /** 1700 * 1701 * 1702 * <pre> 1703 * [Output Only] The unique code used to attach this license to images, snapshots, and disks. 1704 * </pre> 1705 * 1706 * <code>optional uint64 license_code = 1467179;</code> 1707 * 1708 * @return Whether the licenseCode field is set. 1709 */ 1710 @java.lang.Override hasLicenseCode()1711 public boolean hasLicenseCode() { 1712 return ((bitField0_ & 0x00000020) != 0); 1713 } 1714 /** 1715 * 1716 * 1717 * <pre> 1718 * [Output Only] The unique code used to attach this license to images, snapshots, and disks. 1719 * </pre> 1720 * 1721 * <code>optional uint64 license_code = 1467179;</code> 1722 * 1723 * @return The licenseCode. 1724 */ 1725 @java.lang.Override getLicenseCode()1726 public long getLicenseCode() { 1727 return licenseCode_; 1728 } 1729 /** 1730 * 1731 * 1732 * <pre> 1733 * [Output Only] The unique code used to attach this license to images, snapshots, and disks. 1734 * </pre> 1735 * 1736 * <code>optional uint64 license_code = 1467179;</code> 1737 * 1738 * @param value The licenseCode to set. 1739 * @return This builder for chaining. 1740 */ setLicenseCode(long value)1741 public Builder setLicenseCode(long value) { 1742 1743 licenseCode_ = value; 1744 bitField0_ |= 0x00000020; 1745 onChanged(); 1746 return this; 1747 } 1748 /** 1749 * 1750 * 1751 * <pre> 1752 * [Output Only] The unique code used to attach this license to images, snapshots, and disks. 1753 * </pre> 1754 * 1755 * <code>optional uint64 license_code = 1467179;</code> 1756 * 1757 * @return This builder for chaining. 1758 */ clearLicenseCode()1759 public Builder clearLicenseCode() { 1760 bitField0_ = (bitField0_ & ~0x00000020); 1761 licenseCode_ = 0L; 1762 onChanged(); 1763 return this; 1764 } 1765 1766 private java.lang.Object name_ = ""; 1767 /** 1768 * 1769 * 1770 * <pre> 1771 * Name of the resource. The name must be 1-63 characters long and comply with RFC1035. 1772 * </pre> 1773 * 1774 * <code>optional string name = 3373707;</code> 1775 * 1776 * @return Whether the name field is set. 1777 */ hasName()1778 public boolean hasName() { 1779 return ((bitField0_ & 0x00000040) != 0); 1780 } 1781 /** 1782 * 1783 * 1784 * <pre> 1785 * Name of the resource. The name must be 1-63 characters long and comply with RFC1035. 1786 * </pre> 1787 * 1788 * <code>optional string name = 3373707;</code> 1789 * 1790 * @return The name. 1791 */ getName()1792 public java.lang.String getName() { 1793 java.lang.Object ref = name_; 1794 if (!(ref instanceof java.lang.String)) { 1795 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1796 java.lang.String s = bs.toStringUtf8(); 1797 name_ = s; 1798 return s; 1799 } else { 1800 return (java.lang.String) ref; 1801 } 1802 } 1803 /** 1804 * 1805 * 1806 * <pre> 1807 * Name of the resource. The name must be 1-63 characters long and comply with RFC1035. 1808 * </pre> 1809 * 1810 * <code>optional string name = 3373707;</code> 1811 * 1812 * @return The bytes for name. 1813 */ getNameBytes()1814 public com.google.protobuf.ByteString getNameBytes() { 1815 java.lang.Object ref = name_; 1816 if (ref instanceof String) { 1817 com.google.protobuf.ByteString b = 1818 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1819 name_ = b; 1820 return b; 1821 } else { 1822 return (com.google.protobuf.ByteString) ref; 1823 } 1824 } 1825 /** 1826 * 1827 * 1828 * <pre> 1829 * Name of the resource. The name must be 1-63 characters long and comply with RFC1035. 1830 * </pre> 1831 * 1832 * <code>optional string name = 3373707;</code> 1833 * 1834 * @param value The name to set. 1835 * @return This builder for chaining. 1836 */ setName(java.lang.String value)1837 public Builder setName(java.lang.String value) { 1838 if (value == null) { 1839 throw new NullPointerException(); 1840 } 1841 name_ = value; 1842 bitField0_ |= 0x00000040; 1843 onChanged(); 1844 return this; 1845 } 1846 /** 1847 * 1848 * 1849 * <pre> 1850 * Name of the resource. The name must be 1-63 characters long and comply with RFC1035. 1851 * </pre> 1852 * 1853 * <code>optional string name = 3373707;</code> 1854 * 1855 * @return This builder for chaining. 1856 */ clearName()1857 public Builder clearName() { 1858 name_ = getDefaultInstance().getName(); 1859 bitField0_ = (bitField0_ & ~0x00000040); 1860 onChanged(); 1861 return this; 1862 } 1863 /** 1864 * 1865 * 1866 * <pre> 1867 * Name of the resource. The name must be 1-63 characters long and comply with RFC1035. 1868 * </pre> 1869 * 1870 * <code>optional string name = 3373707;</code> 1871 * 1872 * @param value The bytes for name to set. 1873 * @return This builder for chaining. 1874 */ setNameBytes(com.google.protobuf.ByteString value)1875 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1876 if (value == null) { 1877 throw new NullPointerException(); 1878 } 1879 checkByteStringIsUtf8(value); 1880 name_ = value; 1881 bitField0_ |= 0x00000040; 1882 onChanged(); 1883 return this; 1884 } 1885 1886 private com.google.cloud.compute.v1.LicenseResourceRequirements resourceRequirements_; 1887 private com.google.protobuf.SingleFieldBuilderV3< 1888 com.google.cloud.compute.v1.LicenseResourceRequirements, 1889 com.google.cloud.compute.v1.LicenseResourceRequirements.Builder, 1890 com.google.cloud.compute.v1.LicenseResourceRequirementsOrBuilder> 1891 resourceRequirementsBuilder_; 1892 /** 1893 * <code> 1894 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 1895 * </code> 1896 * 1897 * @return Whether the resourceRequirements field is set. 1898 */ hasResourceRequirements()1899 public boolean hasResourceRequirements() { 1900 return ((bitField0_ & 0x00000080) != 0); 1901 } 1902 /** 1903 * <code> 1904 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 1905 * </code> 1906 * 1907 * @return The resourceRequirements. 1908 */ getResourceRequirements()1909 public com.google.cloud.compute.v1.LicenseResourceRequirements getResourceRequirements() { 1910 if (resourceRequirementsBuilder_ == null) { 1911 return resourceRequirements_ == null 1912 ? com.google.cloud.compute.v1.LicenseResourceRequirements.getDefaultInstance() 1913 : resourceRequirements_; 1914 } else { 1915 return resourceRequirementsBuilder_.getMessage(); 1916 } 1917 } 1918 /** 1919 * <code> 1920 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 1921 * </code> 1922 */ setResourceRequirements( com.google.cloud.compute.v1.LicenseResourceRequirements value)1923 public Builder setResourceRequirements( 1924 com.google.cloud.compute.v1.LicenseResourceRequirements value) { 1925 if (resourceRequirementsBuilder_ == null) { 1926 if (value == null) { 1927 throw new NullPointerException(); 1928 } 1929 resourceRequirements_ = value; 1930 } else { 1931 resourceRequirementsBuilder_.setMessage(value); 1932 } 1933 bitField0_ |= 0x00000080; 1934 onChanged(); 1935 return this; 1936 } 1937 /** 1938 * <code> 1939 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 1940 * </code> 1941 */ setResourceRequirements( com.google.cloud.compute.v1.LicenseResourceRequirements.Builder builderForValue)1942 public Builder setResourceRequirements( 1943 com.google.cloud.compute.v1.LicenseResourceRequirements.Builder builderForValue) { 1944 if (resourceRequirementsBuilder_ == null) { 1945 resourceRequirements_ = builderForValue.build(); 1946 } else { 1947 resourceRequirementsBuilder_.setMessage(builderForValue.build()); 1948 } 1949 bitField0_ |= 0x00000080; 1950 onChanged(); 1951 return this; 1952 } 1953 /** 1954 * <code> 1955 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 1956 * </code> 1957 */ mergeResourceRequirements( com.google.cloud.compute.v1.LicenseResourceRequirements value)1958 public Builder mergeResourceRequirements( 1959 com.google.cloud.compute.v1.LicenseResourceRequirements value) { 1960 if (resourceRequirementsBuilder_ == null) { 1961 if (((bitField0_ & 0x00000080) != 0) 1962 && resourceRequirements_ != null 1963 && resourceRequirements_ 1964 != com.google.cloud.compute.v1.LicenseResourceRequirements.getDefaultInstance()) { 1965 getResourceRequirementsBuilder().mergeFrom(value); 1966 } else { 1967 resourceRequirements_ = value; 1968 } 1969 } else { 1970 resourceRequirementsBuilder_.mergeFrom(value); 1971 } 1972 bitField0_ |= 0x00000080; 1973 onChanged(); 1974 return this; 1975 } 1976 /** 1977 * <code> 1978 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 1979 * </code> 1980 */ clearResourceRequirements()1981 public Builder clearResourceRequirements() { 1982 bitField0_ = (bitField0_ & ~0x00000080); 1983 resourceRequirements_ = null; 1984 if (resourceRequirementsBuilder_ != null) { 1985 resourceRequirementsBuilder_.dispose(); 1986 resourceRequirementsBuilder_ = null; 1987 } 1988 onChanged(); 1989 return this; 1990 } 1991 /** 1992 * <code> 1993 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 1994 * </code> 1995 */ 1996 public com.google.cloud.compute.v1.LicenseResourceRequirements.Builder getResourceRequirementsBuilder()1997 getResourceRequirementsBuilder() { 1998 bitField0_ |= 0x00000080; 1999 onChanged(); 2000 return getResourceRequirementsFieldBuilder().getBuilder(); 2001 } 2002 /** 2003 * <code> 2004 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 2005 * </code> 2006 */ 2007 public com.google.cloud.compute.v1.LicenseResourceRequirementsOrBuilder getResourceRequirementsOrBuilder()2008 getResourceRequirementsOrBuilder() { 2009 if (resourceRequirementsBuilder_ != null) { 2010 return resourceRequirementsBuilder_.getMessageOrBuilder(); 2011 } else { 2012 return resourceRequirements_ == null 2013 ? com.google.cloud.compute.v1.LicenseResourceRequirements.getDefaultInstance() 2014 : resourceRequirements_; 2015 } 2016 } 2017 /** 2018 * <code> 2019 * optional .google.cloud.compute.v1.LicenseResourceRequirements resource_requirements = 214292769; 2020 * </code> 2021 */ 2022 private com.google.protobuf.SingleFieldBuilderV3< 2023 com.google.cloud.compute.v1.LicenseResourceRequirements, 2024 com.google.cloud.compute.v1.LicenseResourceRequirements.Builder, 2025 com.google.cloud.compute.v1.LicenseResourceRequirementsOrBuilder> getResourceRequirementsFieldBuilder()2026 getResourceRequirementsFieldBuilder() { 2027 if (resourceRequirementsBuilder_ == null) { 2028 resourceRequirementsBuilder_ = 2029 new com.google.protobuf.SingleFieldBuilderV3< 2030 com.google.cloud.compute.v1.LicenseResourceRequirements, 2031 com.google.cloud.compute.v1.LicenseResourceRequirements.Builder, 2032 com.google.cloud.compute.v1.LicenseResourceRequirementsOrBuilder>( 2033 getResourceRequirements(), getParentForChildren(), isClean()); 2034 resourceRequirements_ = null; 2035 } 2036 return resourceRequirementsBuilder_; 2037 } 2038 2039 private java.lang.Object selfLink_ = ""; 2040 /** 2041 * 2042 * 2043 * <pre> 2044 * [Output Only] Server-defined URL for the resource. 2045 * </pre> 2046 * 2047 * <code>optional string self_link = 456214797;</code> 2048 * 2049 * @return Whether the selfLink field is set. 2050 */ hasSelfLink()2051 public boolean hasSelfLink() { 2052 return ((bitField0_ & 0x00000100) != 0); 2053 } 2054 /** 2055 * 2056 * 2057 * <pre> 2058 * [Output Only] Server-defined URL for the resource. 2059 * </pre> 2060 * 2061 * <code>optional string self_link = 456214797;</code> 2062 * 2063 * @return The selfLink. 2064 */ getSelfLink()2065 public java.lang.String getSelfLink() { 2066 java.lang.Object ref = selfLink_; 2067 if (!(ref instanceof java.lang.String)) { 2068 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2069 java.lang.String s = bs.toStringUtf8(); 2070 selfLink_ = s; 2071 return s; 2072 } else { 2073 return (java.lang.String) ref; 2074 } 2075 } 2076 /** 2077 * 2078 * 2079 * <pre> 2080 * [Output Only] Server-defined URL for the resource. 2081 * </pre> 2082 * 2083 * <code>optional string self_link = 456214797;</code> 2084 * 2085 * @return The bytes for selfLink. 2086 */ getSelfLinkBytes()2087 public com.google.protobuf.ByteString getSelfLinkBytes() { 2088 java.lang.Object ref = selfLink_; 2089 if (ref instanceof String) { 2090 com.google.protobuf.ByteString b = 2091 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2092 selfLink_ = b; 2093 return b; 2094 } else { 2095 return (com.google.protobuf.ByteString) ref; 2096 } 2097 } 2098 /** 2099 * 2100 * 2101 * <pre> 2102 * [Output Only] Server-defined URL for the resource. 2103 * </pre> 2104 * 2105 * <code>optional string self_link = 456214797;</code> 2106 * 2107 * @param value The selfLink to set. 2108 * @return This builder for chaining. 2109 */ setSelfLink(java.lang.String value)2110 public Builder setSelfLink(java.lang.String value) { 2111 if (value == null) { 2112 throw new NullPointerException(); 2113 } 2114 selfLink_ = value; 2115 bitField0_ |= 0x00000100; 2116 onChanged(); 2117 return this; 2118 } 2119 /** 2120 * 2121 * 2122 * <pre> 2123 * [Output Only] Server-defined URL for the resource. 2124 * </pre> 2125 * 2126 * <code>optional string self_link = 456214797;</code> 2127 * 2128 * @return This builder for chaining. 2129 */ clearSelfLink()2130 public Builder clearSelfLink() { 2131 selfLink_ = getDefaultInstance().getSelfLink(); 2132 bitField0_ = (bitField0_ & ~0x00000100); 2133 onChanged(); 2134 return this; 2135 } 2136 /** 2137 * 2138 * 2139 * <pre> 2140 * [Output Only] Server-defined URL for the resource. 2141 * </pre> 2142 * 2143 * <code>optional string self_link = 456214797;</code> 2144 * 2145 * @param value The bytes for selfLink to set. 2146 * @return This builder for chaining. 2147 */ setSelfLinkBytes(com.google.protobuf.ByteString value)2148 public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { 2149 if (value == null) { 2150 throw new NullPointerException(); 2151 } 2152 checkByteStringIsUtf8(value); 2153 selfLink_ = value; 2154 bitField0_ |= 0x00000100; 2155 onChanged(); 2156 return this; 2157 } 2158 2159 private boolean transferable_; 2160 /** 2161 * 2162 * 2163 * <pre> 2164 * If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk. 2165 * </pre> 2166 * 2167 * <code>optional bool transferable = 4349893;</code> 2168 * 2169 * @return Whether the transferable field is set. 2170 */ 2171 @java.lang.Override hasTransferable()2172 public boolean hasTransferable() { 2173 return ((bitField0_ & 0x00000200) != 0); 2174 } 2175 /** 2176 * 2177 * 2178 * <pre> 2179 * If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk. 2180 * </pre> 2181 * 2182 * <code>optional bool transferable = 4349893;</code> 2183 * 2184 * @return The transferable. 2185 */ 2186 @java.lang.Override getTransferable()2187 public boolean getTransferable() { 2188 return transferable_; 2189 } 2190 /** 2191 * 2192 * 2193 * <pre> 2194 * If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk. 2195 * </pre> 2196 * 2197 * <code>optional bool transferable = 4349893;</code> 2198 * 2199 * @param value The transferable to set. 2200 * @return This builder for chaining. 2201 */ setTransferable(boolean value)2202 public Builder setTransferable(boolean value) { 2203 2204 transferable_ = value; 2205 bitField0_ |= 0x00000200; 2206 onChanged(); 2207 return this; 2208 } 2209 /** 2210 * 2211 * 2212 * <pre> 2213 * If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk. 2214 * </pre> 2215 * 2216 * <code>optional bool transferable = 4349893;</code> 2217 * 2218 * @return This builder for chaining. 2219 */ clearTransferable()2220 public Builder clearTransferable() { 2221 bitField0_ = (bitField0_ & ~0x00000200); 2222 transferable_ = false; 2223 onChanged(); 2224 return this; 2225 } 2226 2227 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2228 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2229 return super.setUnknownFields(unknownFields); 2230 } 2231 2232 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2233 public final Builder mergeUnknownFields( 2234 final com.google.protobuf.UnknownFieldSet unknownFields) { 2235 return super.mergeUnknownFields(unknownFields); 2236 } 2237 2238 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.License) 2239 } 2240 2241 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.License) 2242 private static final com.google.cloud.compute.v1.License DEFAULT_INSTANCE; 2243 2244 static { 2245 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.License(); 2246 } 2247 getDefaultInstance()2248 public static com.google.cloud.compute.v1.License getDefaultInstance() { 2249 return DEFAULT_INSTANCE; 2250 } 2251 2252 private static final com.google.protobuf.Parser<License> PARSER = 2253 new com.google.protobuf.AbstractParser<License>() { 2254 @java.lang.Override 2255 public License parsePartialFrom( 2256 com.google.protobuf.CodedInputStream input, 2257 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2258 throws com.google.protobuf.InvalidProtocolBufferException { 2259 Builder builder = newBuilder(); 2260 try { 2261 builder.mergeFrom(input, extensionRegistry); 2262 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2263 throw e.setUnfinishedMessage(builder.buildPartial()); 2264 } catch (com.google.protobuf.UninitializedMessageException e) { 2265 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2266 } catch (java.io.IOException e) { 2267 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2268 .setUnfinishedMessage(builder.buildPartial()); 2269 } 2270 return builder.buildPartial(); 2271 } 2272 }; 2273 parser()2274 public static com.google.protobuf.Parser<License> parser() { 2275 return PARSER; 2276 } 2277 2278 @java.lang.Override getParserForType()2279 public com.google.protobuf.Parser<License> getParserForType() { 2280 return PARSER; 2281 } 2282 2283 @java.lang.Override getDefaultInstanceForType()2284 public com.google.cloud.compute.v1.License getDefaultInstanceForType() { 2285 return DEFAULT_INSTANCE; 2286 } 2287 } 2288