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/kms/v1/resources.proto 18 19 package com.google.cloud.kms.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Contains an HSM-generated attestation about a key operation. For more 26 * information, see [Verifying attestations] 27 * (https://cloud.google.com/kms/docs/attest-key). 28 * </pre> 29 * 30 * Protobuf type {@code google.cloud.kms.v1.KeyOperationAttestation} 31 */ 32 public final class KeyOperationAttestation extends com.google.protobuf.GeneratedMessageV3 33 implements 34 // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.KeyOperationAttestation) 35 KeyOperationAttestationOrBuilder { 36 private static final long serialVersionUID = 0L; 37 // Use KeyOperationAttestation.newBuilder() to construct. KeyOperationAttestation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38 private KeyOperationAttestation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 39 super(builder); 40 } 41 KeyOperationAttestation()42 private KeyOperationAttestation() { 43 format_ = 0; 44 content_ = com.google.protobuf.ByteString.EMPTY; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new KeyOperationAttestation(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.cloud.kms.v1.KmsResourcesProto 60 .internal_static_google_cloud_kms_v1_KeyOperationAttestation_descriptor; 61 } 62 63 @java.lang.Override 64 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()65 internalGetFieldAccessorTable() { 66 return com.google.cloud.kms.v1.KmsResourcesProto 67 .internal_static_google_cloud_kms_v1_KeyOperationAttestation_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.cloud.kms.v1.KeyOperationAttestation.class, 70 com.google.cloud.kms.v1.KeyOperationAttestation.Builder.class); 71 } 72 73 /** 74 * 75 * 76 * <pre> 77 * Attestation formats provided by the HSM. 78 * </pre> 79 * 80 * Protobuf enum {@code google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat} 81 */ 82 public enum AttestationFormat implements com.google.protobuf.ProtocolMessageEnum { 83 /** 84 * 85 * 86 * <pre> 87 * Not specified. 88 * </pre> 89 * 90 * <code>ATTESTATION_FORMAT_UNSPECIFIED = 0;</code> 91 */ 92 ATTESTATION_FORMAT_UNSPECIFIED(0), 93 /** 94 * 95 * 96 * <pre> 97 * Cavium HSM attestation compressed with gzip. Note that this format is 98 * defined by Cavium and subject to change at any time. 99 * See 100 * https://www.marvell.com/products/security-solutions/nitrox-hs-adapters/software-key-attestation.html. 101 * </pre> 102 * 103 * <code>CAVIUM_V1_COMPRESSED = 3;</code> 104 */ 105 CAVIUM_V1_COMPRESSED(3), 106 /** 107 * 108 * 109 * <pre> 110 * Cavium HSM attestation V2 compressed with gzip. This is a new format 111 * introduced in Cavium's version 3.2-08. 112 * </pre> 113 * 114 * <code>CAVIUM_V2_COMPRESSED = 4;</code> 115 */ 116 CAVIUM_V2_COMPRESSED(4), 117 UNRECOGNIZED(-1), 118 ; 119 120 /** 121 * 122 * 123 * <pre> 124 * Not specified. 125 * </pre> 126 * 127 * <code>ATTESTATION_FORMAT_UNSPECIFIED = 0;</code> 128 */ 129 public static final int ATTESTATION_FORMAT_UNSPECIFIED_VALUE = 0; 130 /** 131 * 132 * 133 * <pre> 134 * Cavium HSM attestation compressed with gzip. Note that this format is 135 * defined by Cavium and subject to change at any time. 136 * See 137 * https://www.marvell.com/products/security-solutions/nitrox-hs-adapters/software-key-attestation.html. 138 * </pre> 139 * 140 * <code>CAVIUM_V1_COMPRESSED = 3;</code> 141 */ 142 public static final int CAVIUM_V1_COMPRESSED_VALUE = 3; 143 /** 144 * 145 * 146 * <pre> 147 * Cavium HSM attestation V2 compressed with gzip. This is a new format 148 * introduced in Cavium's version 3.2-08. 149 * </pre> 150 * 151 * <code>CAVIUM_V2_COMPRESSED = 4;</code> 152 */ 153 public static final int CAVIUM_V2_COMPRESSED_VALUE = 4; 154 getNumber()155 public final int getNumber() { 156 if (this == UNRECOGNIZED) { 157 throw new java.lang.IllegalArgumentException( 158 "Can't get the number of an unknown enum value."); 159 } 160 return value; 161 } 162 163 /** 164 * @param value The numeric wire value of the corresponding enum entry. 165 * @return The enum associated with the given numeric wire value. 166 * @deprecated Use {@link #forNumber(int)} instead. 167 */ 168 @java.lang.Deprecated valueOf(int value)169 public static AttestationFormat valueOf(int value) { 170 return forNumber(value); 171 } 172 173 /** 174 * @param value The numeric wire value of the corresponding enum entry. 175 * @return The enum associated with the given numeric wire value. 176 */ forNumber(int value)177 public static AttestationFormat forNumber(int value) { 178 switch (value) { 179 case 0: 180 return ATTESTATION_FORMAT_UNSPECIFIED; 181 case 3: 182 return CAVIUM_V1_COMPRESSED; 183 case 4: 184 return CAVIUM_V2_COMPRESSED; 185 default: 186 return null; 187 } 188 } 189 190 public static com.google.protobuf.Internal.EnumLiteMap<AttestationFormat> internalGetValueMap()191 internalGetValueMap() { 192 return internalValueMap; 193 } 194 195 private static final com.google.protobuf.Internal.EnumLiteMap<AttestationFormat> 196 internalValueMap = 197 new com.google.protobuf.Internal.EnumLiteMap<AttestationFormat>() { 198 public AttestationFormat findValueByNumber(int number) { 199 return AttestationFormat.forNumber(number); 200 } 201 }; 202 getValueDescriptor()203 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 204 if (this == UNRECOGNIZED) { 205 throw new java.lang.IllegalStateException( 206 "Can't get the descriptor of an unrecognized enum value."); 207 } 208 return getDescriptor().getValues().get(ordinal()); 209 } 210 getDescriptorForType()211 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 212 return getDescriptor(); 213 } 214 getDescriptor()215 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 216 return com.google.cloud.kms.v1.KeyOperationAttestation.getDescriptor().getEnumTypes().get(0); 217 } 218 219 private static final AttestationFormat[] VALUES = values(); 220 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)221 public static AttestationFormat valueOf( 222 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 223 if (desc.getType() != getDescriptor()) { 224 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 225 } 226 if (desc.getIndex() == -1) { 227 return UNRECOGNIZED; 228 } 229 return VALUES[desc.getIndex()]; 230 } 231 232 private final int value; 233 AttestationFormat(int value)234 private AttestationFormat(int value) { 235 this.value = value; 236 } 237 238 // @@protoc_insertion_point(enum_scope:google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat) 239 } 240 241 public interface CertificateChainsOrBuilder 242 extends 243 // @@protoc_insertion_point(interface_extends:google.cloud.kms.v1.KeyOperationAttestation.CertificateChains) 244 com.google.protobuf.MessageOrBuilder { 245 246 /** 247 * 248 * 249 * <pre> 250 * Cavium certificate chain corresponding to the attestation. 251 * </pre> 252 * 253 * <code>repeated string cavium_certs = 1;</code> 254 * 255 * @return A list containing the caviumCerts. 256 */ getCaviumCertsList()257 java.util.List<java.lang.String> getCaviumCertsList(); 258 /** 259 * 260 * 261 * <pre> 262 * Cavium certificate chain corresponding to the attestation. 263 * </pre> 264 * 265 * <code>repeated string cavium_certs = 1;</code> 266 * 267 * @return The count of caviumCerts. 268 */ getCaviumCertsCount()269 int getCaviumCertsCount(); 270 /** 271 * 272 * 273 * <pre> 274 * Cavium certificate chain corresponding to the attestation. 275 * </pre> 276 * 277 * <code>repeated string cavium_certs = 1;</code> 278 * 279 * @param index The index of the element to return. 280 * @return The caviumCerts at the given index. 281 */ getCaviumCerts(int index)282 java.lang.String getCaviumCerts(int index); 283 /** 284 * 285 * 286 * <pre> 287 * Cavium certificate chain corresponding to the attestation. 288 * </pre> 289 * 290 * <code>repeated string cavium_certs = 1;</code> 291 * 292 * @param index The index of the value to return. 293 * @return The bytes of the caviumCerts at the given index. 294 */ getCaviumCertsBytes(int index)295 com.google.protobuf.ByteString getCaviumCertsBytes(int index); 296 297 /** 298 * 299 * 300 * <pre> 301 * Google card certificate chain corresponding to the attestation. 302 * </pre> 303 * 304 * <code>repeated string google_card_certs = 2;</code> 305 * 306 * @return A list containing the googleCardCerts. 307 */ getGoogleCardCertsList()308 java.util.List<java.lang.String> getGoogleCardCertsList(); 309 /** 310 * 311 * 312 * <pre> 313 * Google card certificate chain corresponding to the attestation. 314 * </pre> 315 * 316 * <code>repeated string google_card_certs = 2;</code> 317 * 318 * @return The count of googleCardCerts. 319 */ getGoogleCardCertsCount()320 int getGoogleCardCertsCount(); 321 /** 322 * 323 * 324 * <pre> 325 * Google card certificate chain corresponding to the attestation. 326 * </pre> 327 * 328 * <code>repeated string google_card_certs = 2;</code> 329 * 330 * @param index The index of the element to return. 331 * @return The googleCardCerts at the given index. 332 */ getGoogleCardCerts(int index)333 java.lang.String getGoogleCardCerts(int index); 334 /** 335 * 336 * 337 * <pre> 338 * Google card certificate chain corresponding to the attestation. 339 * </pre> 340 * 341 * <code>repeated string google_card_certs = 2;</code> 342 * 343 * @param index The index of the value to return. 344 * @return The bytes of the googleCardCerts at the given index. 345 */ getGoogleCardCertsBytes(int index)346 com.google.protobuf.ByteString getGoogleCardCertsBytes(int index); 347 348 /** 349 * 350 * 351 * <pre> 352 * Google partition certificate chain corresponding to the attestation. 353 * </pre> 354 * 355 * <code>repeated string google_partition_certs = 3;</code> 356 * 357 * @return A list containing the googlePartitionCerts. 358 */ getGooglePartitionCertsList()359 java.util.List<java.lang.String> getGooglePartitionCertsList(); 360 /** 361 * 362 * 363 * <pre> 364 * Google partition certificate chain corresponding to the attestation. 365 * </pre> 366 * 367 * <code>repeated string google_partition_certs = 3;</code> 368 * 369 * @return The count of googlePartitionCerts. 370 */ getGooglePartitionCertsCount()371 int getGooglePartitionCertsCount(); 372 /** 373 * 374 * 375 * <pre> 376 * Google partition certificate chain corresponding to the attestation. 377 * </pre> 378 * 379 * <code>repeated string google_partition_certs = 3;</code> 380 * 381 * @param index The index of the element to return. 382 * @return The googlePartitionCerts at the given index. 383 */ getGooglePartitionCerts(int index)384 java.lang.String getGooglePartitionCerts(int index); 385 /** 386 * 387 * 388 * <pre> 389 * Google partition certificate chain corresponding to the attestation. 390 * </pre> 391 * 392 * <code>repeated string google_partition_certs = 3;</code> 393 * 394 * @param index The index of the value to return. 395 * @return The bytes of the googlePartitionCerts at the given index. 396 */ getGooglePartitionCertsBytes(int index)397 com.google.protobuf.ByteString getGooglePartitionCertsBytes(int index); 398 } 399 /** 400 * 401 * 402 * <pre> 403 * Certificate chains needed to verify the attestation. 404 * Certificates in chains are PEM-encoded and are ordered based on 405 * https://tools.ietf.org/html/rfc5246#section-7.4.2. 406 * </pre> 407 * 408 * Protobuf type {@code google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} 409 */ 410 public static final class CertificateChains extends com.google.protobuf.GeneratedMessageV3 411 implements 412 // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.KeyOperationAttestation.CertificateChains) 413 CertificateChainsOrBuilder { 414 private static final long serialVersionUID = 0L; 415 // Use CertificateChains.newBuilder() to construct. CertificateChains(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)416 private CertificateChains(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 417 super(builder); 418 } 419 CertificateChains()420 private CertificateChains() { 421 caviumCerts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 422 googleCardCerts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 423 googlePartitionCerts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 424 } 425 426 @java.lang.Override 427 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)428 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 429 return new CertificateChains(); 430 } 431 432 @java.lang.Override getUnknownFields()433 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 434 return this.unknownFields; 435 } 436 getDescriptor()437 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 438 return com.google.cloud.kms.v1.KmsResourcesProto 439 .internal_static_google_cloud_kms_v1_KeyOperationAttestation_CertificateChains_descriptor; 440 } 441 442 @java.lang.Override 443 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()444 internalGetFieldAccessorTable() { 445 return com.google.cloud.kms.v1.KmsResourcesProto 446 .internal_static_google_cloud_kms_v1_KeyOperationAttestation_CertificateChains_fieldAccessorTable 447 .ensureFieldAccessorsInitialized( 448 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.class, 449 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.Builder.class); 450 } 451 452 public static final int CAVIUM_CERTS_FIELD_NUMBER = 1; 453 454 @SuppressWarnings("serial") 455 private com.google.protobuf.LazyStringList caviumCerts_; 456 /** 457 * 458 * 459 * <pre> 460 * Cavium certificate chain corresponding to the attestation. 461 * </pre> 462 * 463 * <code>repeated string cavium_certs = 1;</code> 464 * 465 * @return A list containing the caviumCerts. 466 */ getCaviumCertsList()467 public com.google.protobuf.ProtocolStringList getCaviumCertsList() { 468 return caviumCerts_; 469 } 470 /** 471 * 472 * 473 * <pre> 474 * Cavium certificate chain corresponding to the attestation. 475 * </pre> 476 * 477 * <code>repeated string cavium_certs = 1;</code> 478 * 479 * @return The count of caviumCerts. 480 */ getCaviumCertsCount()481 public int getCaviumCertsCount() { 482 return caviumCerts_.size(); 483 } 484 /** 485 * 486 * 487 * <pre> 488 * Cavium certificate chain corresponding to the attestation. 489 * </pre> 490 * 491 * <code>repeated string cavium_certs = 1;</code> 492 * 493 * @param index The index of the element to return. 494 * @return The caviumCerts at the given index. 495 */ getCaviumCerts(int index)496 public java.lang.String getCaviumCerts(int index) { 497 return caviumCerts_.get(index); 498 } 499 /** 500 * 501 * 502 * <pre> 503 * Cavium certificate chain corresponding to the attestation. 504 * </pre> 505 * 506 * <code>repeated string cavium_certs = 1;</code> 507 * 508 * @param index The index of the value to return. 509 * @return The bytes of the caviumCerts at the given index. 510 */ getCaviumCertsBytes(int index)511 public com.google.protobuf.ByteString getCaviumCertsBytes(int index) { 512 return caviumCerts_.getByteString(index); 513 } 514 515 public static final int GOOGLE_CARD_CERTS_FIELD_NUMBER = 2; 516 517 @SuppressWarnings("serial") 518 private com.google.protobuf.LazyStringList googleCardCerts_; 519 /** 520 * 521 * 522 * <pre> 523 * Google card certificate chain corresponding to the attestation. 524 * </pre> 525 * 526 * <code>repeated string google_card_certs = 2;</code> 527 * 528 * @return A list containing the googleCardCerts. 529 */ getGoogleCardCertsList()530 public com.google.protobuf.ProtocolStringList getGoogleCardCertsList() { 531 return googleCardCerts_; 532 } 533 /** 534 * 535 * 536 * <pre> 537 * Google card certificate chain corresponding to the attestation. 538 * </pre> 539 * 540 * <code>repeated string google_card_certs = 2;</code> 541 * 542 * @return The count of googleCardCerts. 543 */ getGoogleCardCertsCount()544 public int getGoogleCardCertsCount() { 545 return googleCardCerts_.size(); 546 } 547 /** 548 * 549 * 550 * <pre> 551 * Google card certificate chain corresponding to the attestation. 552 * </pre> 553 * 554 * <code>repeated string google_card_certs = 2;</code> 555 * 556 * @param index The index of the element to return. 557 * @return The googleCardCerts at the given index. 558 */ getGoogleCardCerts(int index)559 public java.lang.String getGoogleCardCerts(int index) { 560 return googleCardCerts_.get(index); 561 } 562 /** 563 * 564 * 565 * <pre> 566 * Google card certificate chain corresponding to the attestation. 567 * </pre> 568 * 569 * <code>repeated string google_card_certs = 2;</code> 570 * 571 * @param index The index of the value to return. 572 * @return The bytes of the googleCardCerts at the given index. 573 */ getGoogleCardCertsBytes(int index)574 public com.google.protobuf.ByteString getGoogleCardCertsBytes(int index) { 575 return googleCardCerts_.getByteString(index); 576 } 577 578 public static final int GOOGLE_PARTITION_CERTS_FIELD_NUMBER = 3; 579 580 @SuppressWarnings("serial") 581 private com.google.protobuf.LazyStringList googlePartitionCerts_; 582 /** 583 * 584 * 585 * <pre> 586 * Google partition certificate chain corresponding to the attestation. 587 * </pre> 588 * 589 * <code>repeated string google_partition_certs = 3;</code> 590 * 591 * @return A list containing the googlePartitionCerts. 592 */ getGooglePartitionCertsList()593 public com.google.protobuf.ProtocolStringList getGooglePartitionCertsList() { 594 return googlePartitionCerts_; 595 } 596 /** 597 * 598 * 599 * <pre> 600 * Google partition certificate chain corresponding to the attestation. 601 * </pre> 602 * 603 * <code>repeated string google_partition_certs = 3;</code> 604 * 605 * @return The count of googlePartitionCerts. 606 */ getGooglePartitionCertsCount()607 public int getGooglePartitionCertsCount() { 608 return googlePartitionCerts_.size(); 609 } 610 /** 611 * 612 * 613 * <pre> 614 * Google partition certificate chain corresponding to the attestation. 615 * </pre> 616 * 617 * <code>repeated string google_partition_certs = 3;</code> 618 * 619 * @param index The index of the element to return. 620 * @return The googlePartitionCerts at the given index. 621 */ getGooglePartitionCerts(int index)622 public java.lang.String getGooglePartitionCerts(int index) { 623 return googlePartitionCerts_.get(index); 624 } 625 /** 626 * 627 * 628 * <pre> 629 * Google partition certificate chain corresponding to the attestation. 630 * </pre> 631 * 632 * <code>repeated string google_partition_certs = 3;</code> 633 * 634 * @param index The index of the value to return. 635 * @return The bytes of the googlePartitionCerts at the given index. 636 */ getGooglePartitionCertsBytes(int index)637 public com.google.protobuf.ByteString getGooglePartitionCertsBytes(int index) { 638 return googlePartitionCerts_.getByteString(index); 639 } 640 641 private byte memoizedIsInitialized = -1; 642 643 @java.lang.Override isInitialized()644 public final boolean isInitialized() { 645 byte isInitialized = memoizedIsInitialized; 646 if (isInitialized == 1) return true; 647 if (isInitialized == 0) return false; 648 649 memoizedIsInitialized = 1; 650 return true; 651 } 652 653 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)654 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 655 for (int i = 0; i < caviumCerts_.size(); i++) { 656 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, caviumCerts_.getRaw(i)); 657 } 658 for (int i = 0; i < googleCardCerts_.size(); i++) { 659 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, googleCardCerts_.getRaw(i)); 660 } 661 for (int i = 0; i < googlePartitionCerts_.size(); i++) { 662 com.google.protobuf.GeneratedMessageV3.writeString( 663 output, 3, googlePartitionCerts_.getRaw(i)); 664 } 665 getUnknownFields().writeTo(output); 666 } 667 668 @java.lang.Override getSerializedSize()669 public int getSerializedSize() { 670 int size = memoizedSize; 671 if (size != -1) return size; 672 673 size = 0; 674 { 675 int dataSize = 0; 676 for (int i = 0; i < caviumCerts_.size(); i++) { 677 dataSize += computeStringSizeNoTag(caviumCerts_.getRaw(i)); 678 } 679 size += dataSize; 680 size += 1 * getCaviumCertsList().size(); 681 } 682 { 683 int dataSize = 0; 684 for (int i = 0; i < googleCardCerts_.size(); i++) { 685 dataSize += computeStringSizeNoTag(googleCardCerts_.getRaw(i)); 686 } 687 size += dataSize; 688 size += 1 * getGoogleCardCertsList().size(); 689 } 690 { 691 int dataSize = 0; 692 for (int i = 0; i < googlePartitionCerts_.size(); i++) { 693 dataSize += computeStringSizeNoTag(googlePartitionCerts_.getRaw(i)); 694 } 695 size += dataSize; 696 size += 1 * getGooglePartitionCertsList().size(); 697 } 698 size += getUnknownFields().getSerializedSize(); 699 memoizedSize = size; 700 return size; 701 } 702 703 @java.lang.Override equals(final java.lang.Object obj)704 public boolean equals(final java.lang.Object obj) { 705 if (obj == this) { 706 return true; 707 } 708 if (!(obj instanceof com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains)) { 709 return super.equals(obj); 710 } 711 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains other = 712 (com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains) obj; 713 714 if (!getCaviumCertsList().equals(other.getCaviumCertsList())) return false; 715 if (!getGoogleCardCertsList().equals(other.getGoogleCardCertsList())) return false; 716 if (!getGooglePartitionCertsList().equals(other.getGooglePartitionCertsList())) return false; 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 (getCaviumCertsCount() > 0) { 729 hash = (37 * hash) + CAVIUM_CERTS_FIELD_NUMBER; 730 hash = (53 * hash) + getCaviumCertsList().hashCode(); 731 } 732 if (getGoogleCardCertsCount() > 0) { 733 hash = (37 * hash) + GOOGLE_CARD_CERTS_FIELD_NUMBER; 734 hash = (53 * hash) + getGoogleCardCertsList().hashCode(); 735 } 736 if (getGooglePartitionCertsCount() > 0) { 737 hash = (37 * hash) + GOOGLE_PARTITION_CERTS_FIELD_NUMBER; 738 hash = (53 * hash) + getGooglePartitionCertsList().hashCode(); 739 } 740 hash = (29 * hash) + getUnknownFields().hashCode(); 741 memoizedHashCode = hash; 742 return hash; 743 } 744 parseFrom( java.nio.ByteBuffer data)745 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseFrom( 746 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 747 return PARSER.parseFrom(data); 748 } 749 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)750 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseFrom( 751 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 752 throws com.google.protobuf.InvalidProtocolBufferException { 753 return PARSER.parseFrom(data, extensionRegistry); 754 } 755 parseFrom( com.google.protobuf.ByteString data)756 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseFrom( 757 com.google.protobuf.ByteString data) 758 throws com.google.protobuf.InvalidProtocolBufferException { 759 return PARSER.parseFrom(data); 760 } 761 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)762 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseFrom( 763 com.google.protobuf.ByteString data, 764 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 765 throws com.google.protobuf.InvalidProtocolBufferException { 766 return PARSER.parseFrom(data, extensionRegistry); 767 } 768 parseFrom( byte[] data)769 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseFrom( 770 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 771 return PARSER.parseFrom(data); 772 } 773 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)774 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseFrom( 775 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 776 throws com.google.protobuf.InvalidProtocolBufferException { 777 return PARSER.parseFrom(data, extensionRegistry); 778 } 779 parseFrom( java.io.InputStream input)780 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseFrom( 781 java.io.InputStream input) throws java.io.IOException { 782 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 783 } 784 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)785 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseFrom( 786 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 787 throws java.io.IOException { 788 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 789 PARSER, input, extensionRegistry); 790 } 791 792 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseDelimitedFrom(java.io.InputStream input)793 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { 794 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 795 } 796 797 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)798 parseDelimitedFrom( 799 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 800 throws java.io.IOException { 801 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 802 PARSER, input, extensionRegistry); 803 } 804 parseFrom( com.google.protobuf.CodedInputStream input)805 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseFrom( 806 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 807 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 808 } 809 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)810 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains parseFrom( 811 com.google.protobuf.CodedInputStream input, 812 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 813 throws java.io.IOException { 814 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 815 PARSER, input, extensionRegistry); 816 } 817 818 @java.lang.Override newBuilderForType()819 public Builder newBuilderForType() { 820 return newBuilder(); 821 } 822 newBuilder()823 public static Builder newBuilder() { 824 return DEFAULT_INSTANCE.toBuilder(); 825 } 826 newBuilder( com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains prototype)827 public static Builder newBuilder( 828 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains prototype) { 829 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 830 } 831 832 @java.lang.Override toBuilder()833 public Builder toBuilder() { 834 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 835 } 836 837 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)838 protected Builder newBuilderForType( 839 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 840 Builder builder = new Builder(parent); 841 return builder; 842 } 843 /** 844 * 845 * 846 * <pre> 847 * Certificate chains needed to verify the attestation. 848 * Certificates in chains are PEM-encoded and are ordered based on 849 * https://tools.ietf.org/html/rfc5246#section-7.4.2. 850 * </pre> 851 * 852 * Protobuf type {@code google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} 853 */ 854 public static final class Builder 855 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 856 implements 857 // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.KeyOperationAttestation.CertificateChains) 858 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChainsOrBuilder { getDescriptor()859 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 860 return com.google.cloud.kms.v1.KmsResourcesProto 861 .internal_static_google_cloud_kms_v1_KeyOperationAttestation_CertificateChains_descriptor; 862 } 863 864 @java.lang.Override 865 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()866 internalGetFieldAccessorTable() { 867 return com.google.cloud.kms.v1.KmsResourcesProto 868 .internal_static_google_cloud_kms_v1_KeyOperationAttestation_CertificateChains_fieldAccessorTable 869 .ensureFieldAccessorsInitialized( 870 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.class, 871 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.Builder.class); 872 } 873 874 // Construct using 875 // com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.newBuilder() Builder()876 private Builder() {} 877 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)878 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 879 super(parent); 880 } 881 882 @java.lang.Override clear()883 public Builder clear() { 884 super.clear(); 885 bitField0_ = 0; 886 caviumCerts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 887 bitField0_ = (bitField0_ & ~0x00000001); 888 googleCardCerts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 889 bitField0_ = (bitField0_ & ~0x00000002); 890 googlePartitionCerts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 891 bitField0_ = (bitField0_ & ~0x00000004); 892 return this; 893 } 894 895 @java.lang.Override getDescriptorForType()896 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 897 return com.google.cloud.kms.v1.KmsResourcesProto 898 .internal_static_google_cloud_kms_v1_KeyOperationAttestation_CertificateChains_descriptor; 899 } 900 901 @java.lang.Override 902 public com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains getDefaultInstanceForType()903 getDefaultInstanceForType() { 904 return com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains 905 .getDefaultInstance(); 906 } 907 908 @java.lang.Override build()909 public com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains build() { 910 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains result = buildPartial(); 911 if (!result.isInitialized()) { 912 throw newUninitializedMessageException(result); 913 } 914 return result; 915 } 916 917 @java.lang.Override buildPartial()918 public com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains buildPartial() { 919 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains result = 920 new com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains(this); 921 buildPartialRepeatedFields(result); 922 if (bitField0_ != 0) { 923 buildPartial0(result); 924 } 925 onBuilt(); 926 return result; 927 } 928 buildPartialRepeatedFields( com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains result)929 private void buildPartialRepeatedFields( 930 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains result) { 931 if (((bitField0_ & 0x00000001) != 0)) { 932 caviumCerts_ = caviumCerts_.getUnmodifiableView(); 933 bitField0_ = (bitField0_ & ~0x00000001); 934 } 935 result.caviumCerts_ = caviumCerts_; 936 if (((bitField0_ & 0x00000002) != 0)) { 937 googleCardCerts_ = googleCardCerts_.getUnmodifiableView(); 938 bitField0_ = (bitField0_ & ~0x00000002); 939 } 940 result.googleCardCerts_ = googleCardCerts_; 941 if (((bitField0_ & 0x00000004) != 0)) { 942 googlePartitionCerts_ = googlePartitionCerts_.getUnmodifiableView(); 943 bitField0_ = (bitField0_ & ~0x00000004); 944 } 945 result.googlePartitionCerts_ = googlePartitionCerts_; 946 } 947 buildPartial0( com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains result)948 private void buildPartial0( 949 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains result) { 950 int from_bitField0_ = bitField0_; 951 } 952 953 @java.lang.Override clone()954 public Builder clone() { 955 return super.clone(); 956 } 957 958 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)959 public Builder setField( 960 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 961 return super.setField(field, value); 962 } 963 964 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)965 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 966 return super.clearField(field); 967 } 968 969 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)970 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 971 return super.clearOneof(oneof); 972 } 973 974 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)975 public Builder setRepeatedField( 976 com.google.protobuf.Descriptors.FieldDescriptor field, 977 int index, 978 java.lang.Object value) { 979 return super.setRepeatedField(field, index, value); 980 } 981 982 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)983 public Builder addRepeatedField( 984 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 985 return super.addRepeatedField(field, value); 986 } 987 988 @java.lang.Override mergeFrom(com.google.protobuf.Message other)989 public Builder mergeFrom(com.google.protobuf.Message other) { 990 if (other instanceof com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains) { 991 return mergeFrom( 992 (com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains) other); 993 } else { 994 super.mergeFrom(other); 995 return this; 996 } 997 } 998 mergeFrom( com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains other)999 public Builder mergeFrom( 1000 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains other) { 1001 if (other 1002 == com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains 1003 .getDefaultInstance()) return this; 1004 if (!other.caviumCerts_.isEmpty()) { 1005 if (caviumCerts_.isEmpty()) { 1006 caviumCerts_ = other.caviumCerts_; 1007 bitField0_ = (bitField0_ & ~0x00000001); 1008 } else { 1009 ensureCaviumCertsIsMutable(); 1010 caviumCerts_.addAll(other.caviumCerts_); 1011 } 1012 onChanged(); 1013 } 1014 if (!other.googleCardCerts_.isEmpty()) { 1015 if (googleCardCerts_.isEmpty()) { 1016 googleCardCerts_ = other.googleCardCerts_; 1017 bitField0_ = (bitField0_ & ~0x00000002); 1018 } else { 1019 ensureGoogleCardCertsIsMutable(); 1020 googleCardCerts_.addAll(other.googleCardCerts_); 1021 } 1022 onChanged(); 1023 } 1024 if (!other.googlePartitionCerts_.isEmpty()) { 1025 if (googlePartitionCerts_.isEmpty()) { 1026 googlePartitionCerts_ = other.googlePartitionCerts_; 1027 bitField0_ = (bitField0_ & ~0x00000004); 1028 } else { 1029 ensureGooglePartitionCertsIsMutable(); 1030 googlePartitionCerts_.addAll(other.googlePartitionCerts_); 1031 } 1032 onChanged(); 1033 } 1034 this.mergeUnknownFields(other.getUnknownFields()); 1035 onChanged(); 1036 return this; 1037 } 1038 1039 @java.lang.Override isInitialized()1040 public final boolean isInitialized() { 1041 return true; 1042 } 1043 1044 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1045 public Builder mergeFrom( 1046 com.google.protobuf.CodedInputStream input, 1047 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1048 throws java.io.IOException { 1049 if (extensionRegistry == null) { 1050 throw new java.lang.NullPointerException(); 1051 } 1052 try { 1053 boolean done = false; 1054 while (!done) { 1055 int tag = input.readTag(); 1056 switch (tag) { 1057 case 0: 1058 done = true; 1059 break; 1060 case 10: 1061 { 1062 java.lang.String s = input.readStringRequireUtf8(); 1063 ensureCaviumCertsIsMutable(); 1064 caviumCerts_.add(s); 1065 break; 1066 } // case 10 1067 case 18: 1068 { 1069 java.lang.String s = input.readStringRequireUtf8(); 1070 ensureGoogleCardCertsIsMutable(); 1071 googleCardCerts_.add(s); 1072 break; 1073 } // case 18 1074 case 26: 1075 { 1076 java.lang.String s = input.readStringRequireUtf8(); 1077 ensureGooglePartitionCertsIsMutable(); 1078 googlePartitionCerts_.add(s); 1079 break; 1080 } // case 26 1081 default: 1082 { 1083 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1084 done = true; // was an endgroup tag 1085 } 1086 break; 1087 } // default: 1088 } // switch (tag) 1089 } // while (!done) 1090 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1091 throw e.unwrapIOException(); 1092 } finally { 1093 onChanged(); 1094 } // finally 1095 return this; 1096 } 1097 1098 private int bitField0_; 1099 1100 private com.google.protobuf.LazyStringList caviumCerts_ = 1101 com.google.protobuf.LazyStringArrayList.EMPTY; 1102 ensureCaviumCertsIsMutable()1103 private void ensureCaviumCertsIsMutable() { 1104 if (!((bitField0_ & 0x00000001) != 0)) { 1105 caviumCerts_ = new com.google.protobuf.LazyStringArrayList(caviumCerts_); 1106 bitField0_ |= 0x00000001; 1107 } 1108 } 1109 /** 1110 * 1111 * 1112 * <pre> 1113 * Cavium certificate chain corresponding to the attestation. 1114 * </pre> 1115 * 1116 * <code>repeated string cavium_certs = 1;</code> 1117 * 1118 * @return A list containing the caviumCerts. 1119 */ getCaviumCertsList()1120 public com.google.protobuf.ProtocolStringList getCaviumCertsList() { 1121 return caviumCerts_.getUnmodifiableView(); 1122 } 1123 /** 1124 * 1125 * 1126 * <pre> 1127 * Cavium certificate chain corresponding to the attestation. 1128 * </pre> 1129 * 1130 * <code>repeated string cavium_certs = 1;</code> 1131 * 1132 * @return The count of caviumCerts. 1133 */ getCaviumCertsCount()1134 public int getCaviumCertsCount() { 1135 return caviumCerts_.size(); 1136 } 1137 /** 1138 * 1139 * 1140 * <pre> 1141 * Cavium certificate chain corresponding to the attestation. 1142 * </pre> 1143 * 1144 * <code>repeated string cavium_certs = 1;</code> 1145 * 1146 * @param index The index of the element to return. 1147 * @return The caviumCerts at the given index. 1148 */ getCaviumCerts(int index)1149 public java.lang.String getCaviumCerts(int index) { 1150 return caviumCerts_.get(index); 1151 } 1152 /** 1153 * 1154 * 1155 * <pre> 1156 * Cavium certificate chain corresponding to the attestation. 1157 * </pre> 1158 * 1159 * <code>repeated string cavium_certs = 1;</code> 1160 * 1161 * @param index The index of the value to return. 1162 * @return The bytes of the caviumCerts at the given index. 1163 */ getCaviumCertsBytes(int index)1164 public com.google.protobuf.ByteString getCaviumCertsBytes(int index) { 1165 return caviumCerts_.getByteString(index); 1166 } 1167 /** 1168 * 1169 * 1170 * <pre> 1171 * Cavium certificate chain corresponding to the attestation. 1172 * </pre> 1173 * 1174 * <code>repeated string cavium_certs = 1;</code> 1175 * 1176 * @param index The index to set the value at. 1177 * @param value The caviumCerts to set. 1178 * @return This builder for chaining. 1179 */ setCaviumCerts(int index, java.lang.String value)1180 public Builder setCaviumCerts(int index, java.lang.String value) { 1181 if (value == null) { 1182 throw new NullPointerException(); 1183 } 1184 ensureCaviumCertsIsMutable(); 1185 caviumCerts_.set(index, value); 1186 onChanged(); 1187 return this; 1188 } 1189 /** 1190 * 1191 * 1192 * <pre> 1193 * Cavium certificate chain corresponding to the attestation. 1194 * </pre> 1195 * 1196 * <code>repeated string cavium_certs = 1;</code> 1197 * 1198 * @param value The caviumCerts to add. 1199 * @return This builder for chaining. 1200 */ addCaviumCerts(java.lang.String value)1201 public Builder addCaviumCerts(java.lang.String value) { 1202 if (value == null) { 1203 throw new NullPointerException(); 1204 } 1205 ensureCaviumCertsIsMutable(); 1206 caviumCerts_.add(value); 1207 onChanged(); 1208 return this; 1209 } 1210 /** 1211 * 1212 * 1213 * <pre> 1214 * Cavium certificate chain corresponding to the attestation. 1215 * </pre> 1216 * 1217 * <code>repeated string cavium_certs = 1;</code> 1218 * 1219 * @param values The caviumCerts to add. 1220 * @return This builder for chaining. 1221 */ addAllCaviumCerts(java.lang.Iterable<java.lang.String> values)1222 public Builder addAllCaviumCerts(java.lang.Iterable<java.lang.String> values) { 1223 ensureCaviumCertsIsMutable(); 1224 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, caviumCerts_); 1225 onChanged(); 1226 return this; 1227 } 1228 /** 1229 * 1230 * 1231 * <pre> 1232 * Cavium certificate chain corresponding to the attestation. 1233 * </pre> 1234 * 1235 * <code>repeated string cavium_certs = 1;</code> 1236 * 1237 * @return This builder for chaining. 1238 */ clearCaviumCerts()1239 public Builder clearCaviumCerts() { 1240 caviumCerts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1241 bitField0_ = (bitField0_ & ~0x00000001); 1242 onChanged(); 1243 return this; 1244 } 1245 /** 1246 * 1247 * 1248 * <pre> 1249 * Cavium certificate chain corresponding to the attestation. 1250 * </pre> 1251 * 1252 * <code>repeated string cavium_certs = 1;</code> 1253 * 1254 * @param value The bytes of the caviumCerts to add. 1255 * @return This builder for chaining. 1256 */ addCaviumCertsBytes(com.google.protobuf.ByteString value)1257 public Builder addCaviumCertsBytes(com.google.protobuf.ByteString value) { 1258 if (value == null) { 1259 throw new NullPointerException(); 1260 } 1261 checkByteStringIsUtf8(value); 1262 ensureCaviumCertsIsMutable(); 1263 caviumCerts_.add(value); 1264 onChanged(); 1265 return this; 1266 } 1267 1268 private com.google.protobuf.LazyStringList googleCardCerts_ = 1269 com.google.protobuf.LazyStringArrayList.EMPTY; 1270 ensureGoogleCardCertsIsMutable()1271 private void ensureGoogleCardCertsIsMutable() { 1272 if (!((bitField0_ & 0x00000002) != 0)) { 1273 googleCardCerts_ = new com.google.protobuf.LazyStringArrayList(googleCardCerts_); 1274 bitField0_ |= 0x00000002; 1275 } 1276 } 1277 /** 1278 * 1279 * 1280 * <pre> 1281 * Google card certificate chain corresponding to the attestation. 1282 * </pre> 1283 * 1284 * <code>repeated string google_card_certs = 2;</code> 1285 * 1286 * @return A list containing the googleCardCerts. 1287 */ getGoogleCardCertsList()1288 public com.google.protobuf.ProtocolStringList getGoogleCardCertsList() { 1289 return googleCardCerts_.getUnmodifiableView(); 1290 } 1291 /** 1292 * 1293 * 1294 * <pre> 1295 * Google card certificate chain corresponding to the attestation. 1296 * </pre> 1297 * 1298 * <code>repeated string google_card_certs = 2;</code> 1299 * 1300 * @return The count of googleCardCerts. 1301 */ getGoogleCardCertsCount()1302 public int getGoogleCardCertsCount() { 1303 return googleCardCerts_.size(); 1304 } 1305 /** 1306 * 1307 * 1308 * <pre> 1309 * Google card certificate chain corresponding to the attestation. 1310 * </pre> 1311 * 1312 * <code>repeated string google_card_certs = 2;</code> 1313 * 1314 * @param index The index of the element to return. 1315 * @return The googleCardCerts at the given index. 1316 */ getGoogleCardCerts(int index)1317 public java.lang.String getGoogleCardCerts(int index) { 1318 return googleCardCerts_.get(index); 1319 } 1320 /** 1321 * 1322 * 1323 * <pre> 1324 * Google card certificate chain corresponding to the attestation. 1325 * </pre> 1326 * 1327 * <code>repeated string google_card_certs = 2;</code> 1328 * 1329 * @param index The index of the value to return. 1330 * @return The bytes of the googleCardCerts at the given index. 1331 */ getGoogleCardCertsBytes(int index)1332 public com.google.protobuf.ByteString getGoogleCardCertsBytes(int index) { 1333 return googleCardCerts_.getByteString(index); 1334 } 1335 /** 1336 * 1337 * 1338 * <pre> 1339 * Google card certificate chain corresponding to the attestation. 1340 * </pre> 1341 * 1342 * <code>repeated string google_card_certs = 2;</code> 1343 * 1344 * @param index The index to set the value at. 1345 * @param value The googleCardCerts to set. 1346 * @return This builder for chaining. 1347 */ setGoogleCardCerts(int index, java.lang.String value)1348 public Builder setGoogleCardCerts(int index, java.lang.String value) { 1349 if (value == null) { 1350 throw new NullPointerException(); 1351 } 1352 ensureGoogleCardCertsIsMutable(); 1353 googleCardCerts_.set(index, value); 1354 onChanged(); 1355 return this; 1356 } 1357 /** 1358 * 1359 * 1360 * <pre> 1361 * Google card certificate chain corresponding to the attestation. 1362 * </pre> 1363 * 1364 * <code>repeated string google_card_certs = 2;</code> 1365 * 1366 * @param value The googleCardCerts to add. 1367 * @return This builder for chaining. 1368 */ addGoogleCardCerts(java.lang.String value)1369 public Builder addGoogleCardCerts(java.lang.String value) { 1370 if (value == null) { 1371 throw new NullPointerException(); 1372 } 1373 ensureGoogleCardCertsIsMutable(); 1374 googleCardCerts_.add(value); 1375 onChanged(); 1376 return this; 1377 } 1378 /** 1379 * 1380 * 1381 * <pre> 1382 * Google card certificate chain corresponding to the attestation. 1383 * </pre> 1384 * 1385 * <code>repeated string google_card_certs = 2;</code> 1386 * 1387 * @param values The googleCardCerts to add. 1388 * @return This builder for chaining. 1389 */ addAllGoogleCardCerts(java.lang.Iterable<java.lang.String> values)1390 public Builder addAllGoogleCardCerts(java.lang.Iterable<java.lang.String> values) { 1391 ensureGoogleCardCertsIsMutable(); 1392 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, googleCardCerts_); 1393 onChanged(); 1394 return this; 1395 } 1396 /** 1397 * 1398 * 1399 * <pre> 1400 * Google card certificate chain corresponding to the attestation. 1401 * </pre> 1402 * 1403 * <code>repeated string google_card_certs = 2;</code> 1404 * 1405 * @return This builder for chaining. 1406 */ clearGoogleCardCerts()1407 public Builder clearGoogleCardCerts() { 1408 googleCardCerts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1409 bitField0_ = (bitField0_ & ~0x00000002); 1410 onChanged(); 1411 return this; 1412 } 1413 /** 1414 * 1415 * 1416 * <pre> 1417 * Google card certificate chain corresponding to the attestation. 1418 * </pre> 1419 * 1420 * <code>repeated string google_card_certs = 2;</code> 1421 * 1422 * @param value The bytes of the googleCardCerts to add. 1423 * @return This builder for chaining. 1424 */ addGoogleCardCertsBytes(com.google.protobuf.ByteString value)1425 public Builder addGoogleCardCertsBytes(com.google.protobuf.ByteString value) { 1426 if (value == null) { 1427 throw new NullPointerException(); 1428 } 1429 checkByteStringIsUtf8(value); 1430 ensureGoogleCardCertsIsMutable(); 1431 googleCardCerts_.add(value); 1432 onChanged(); 1433 return this; 1434 } 1435 1436 private com.google.protobuf.LazyStringList googlePartitionCerts_ = 1437 com.google.protobuf.LazyStringArrayList.EMPTY; 1438 ensureGooglePartitionCertsIsMutable()1439 private void ensureGooglePartitionCertsIsMutable() { 1440 if (!((bitField0_ & 0x00000004) != 0)) { 1441 googlePartitionCerts_ = 1442 new com.google.protobuf.LazyStringArrayList(googlePartitionCerts_); 1443 bitField0_ |= 0x00000004; 1444 } 1445 } 1446 /** 1447 * 1448 * 1449 * <pre> 1450 * Google partition certificate chain corresponding to the attestation. 1451 * </pre> 1452 * 1453 * <code>repeated string google_partition_certs = 3;</code> 1454 * 1455 * @return A list containing the googlePartitionCerts. 1456 */ getGooglePartitionCertsList()1457 public com.google.protobuf.ProtocolStringList getGooglePartitionCertsList() { 1458 return googlePartitionCerts_.getUnmodifiableView(); 1459 } 1460 /** 1461 * 1462 * 1463 * <pre> 1464 * Google partition certificate chain corresponding to the attestation. 1465 * </pre> 1466 * 1467 * <code>repeated string google_partition_certs = 3;</code> 1468 * 1469 * @return The count of googlePartitionCerts. 1470 */ getGooglePartitionCertsCount()1471 public int getGooglePartitionCertsCount() { 1472 return googlePartitionCerts_.size(); 1473 } 1474 /** 1475 * 1476 * 1477 * <pre> 1478 * Google partition certificate chain corresponding to the attestation. 1479 * </pre> 1480 * 1481 * <code>repeated string google_partition_certs = 3;</code> 1482 * 1483 * @param index The index of the element to return. 1484 * @return The googlePartitionCerts at the given index. 1485 */ getGooglePartitionCerts(int index)1486 public java.lang.String getGooglePartitionCerts(int index) { 1487 return googlePartitionCerts_.get(index); 1488 } 1489 /** 1490 * 1491 * 1492 * <pre> 1493 * Google partition certificate chain corresponding to the attestation. 1494 * </pre> 1495 * 1496 * <code>repeated string google_partition_certs = 3;</code> 1497 * 1498 * @param index The index of the value to return. 1499 * @return The bytes of the googlePartitionCerts at the given index. 1500 */ getGooglePartitionCertsBytes(int index)1501 public com.google.protobuf.ByteString getGooglePartitionCertsBytes(int index) { 1502 return googlePartitionCerts_.getByteString(index); 1503 } 1504 /** 1505 * 1506 * 1507 * <pre> 1508 * Google partition certificate chain corresponding to the attestation. 1509 * </pre> 1510 * 1511 * <code>repeated string google_partition_certs = 3;</code> 1512 * 1513 * @param index The index to set the value at. 1514 * @param value The googlePartitionCerts to set. 1515 * @return This builder for chaining. 1516 */ setGooglePartitionCerts(int index, java.lang.String value)1517 public Builder setGooglePartitionCerts(int index, java.lang.String value) { 1518 if (value == null) { 1519 throw new NullPointerException(); 1520 } 1521 ensureGooglePartitionCertsIsMutable(); 1522 googlePartitionCerts_.set(index, value); 1523 onChanged(); 1524 return this; 1525 } 1526 /** 1527 * 1528 * 1529 * <pre> 1530 * Google partition certificate chain corresponding to the attestation. 1531 * </pre> 1532 * 1533 * <code>repeated string google_partition_certs = 3;</code> 1534 * 1535 * @param value The googlePartitionCerts to add. 1536 * @return This builder for chaining. 1537 */ addGooglePartitionCerts(java.lang.String value)1538 public Builder addGooglePartitionCerts(java.lang.String value) { 1539 if (value == null) { 1540 throw new NullPointerException(); 1541 } 1542 ensureGooglePartitionCertsIsMutable(); 1543 googlePartitionCerts_.add(value); 1544 onChanged(); 1545 return this; 1546 } 1547 /** 1548 * 1549 * 1550 * <pre> 1551 * Google partition certificate chain corresponding to the attestation. 1552 * </pre> 1553 * 1554 * <code>repeated string google_partition_certs = 3;</code> 1555 * 1556 * @param values The googlePartitionCerts to add. 1557 * @return This builder for chaining. 1558 */ addAllGooglePartitionCerts(java.lang.Iterable<java.lang.String> values)1559 public Builder addAllGooglePartitionCerts(java.lang.Iterable<java.lang.String> values) { 1560 ensureGooglePartitionCertsIsMutable(); 1561 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, googlePartitionCerts_); 1562 onChanged(); 1563 return this; 1564 } 1565 /** 1566 * 1567 * 1568 * <pre> 1569 * Google partition certificate chain corresponding to the attestation. 1570 * </pre> 1571 * 1572 * <code>repeated string google_partition_certs = 3;</code> 1573 * 1574 * @return This builder for chaining. 1575 */ clearGooglePartitionCerts()1576 public Builder clearGooglePartitionCerts() { 1577 googlePartitionCerts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1578 bitField0_ = (bitField0_ & ~0x00000004); 1579 onChanged(); 1580 return this; 1581 } 1582 /** 1583 * 1584 * 1585 * <pre> 1586 * Google partition certificate chain corresponding to the attestation. 1587 * </pre> 1588 * 1589 * <code>repeated string google_partition_certs = 3;</code> 1590 * 1591 * @param value The bytes of the googlePartitionCerts to add. 1592 * @return This builder for chaining. 1593 */ addGooglePartitionCertsBytes(com.google.protobuf.ByteString value)1594 public Builder addGooglePartitionCertsBytes(com.google.protobuf.ByteString value) { 1595 if (value == null) { 1596 throw new NullPointerException(); 1597 } 1598 checkByteStringIsUtf8(value); 1599 ensureGooglePartitionCertsIsMutable(); 1600 googlePartitionCerts_.add(value); 1601 onChanged(); 1602 return this; 1603 } 1604 1605 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1606 public final Builder setUnknownFields( 1607 final com.google.protobuf.UnknownFieldSet unknownFields) { 1608 return super.setUnknownFields(unknownFields); 1609 } 1610 1611 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1612 public final Builder mergeUnknownFields( 1613 final com.google.protobuf.UnknownFieldSet unknownFields) { 1614 return super.mergeUnknownFields(unknownFields); 1615 } 1616 1617 // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.KeyOperationAttestation.CertificateChains) 1618 } 1619 1620 // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.KeyOperationAttestation.CertificateChains) 1621 private static final com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains 1622 DEFAULT_INSTANCE; 1623 1624 static { 1625 DEFAULT_INSTANCE = new com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains(); 1626 } 1627 1628 public static com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains getDefaultInstance()1629 getDefaultInstance() { 1630 return DEFAULT_INSTANCE; 1631 } 1632 1633 private static final com.google.protobuf.Parser<CertificateChains> PARSER = 1634 new com.google.protobuf.AbstractParser<CertificateChains>() { 1635 @java.lang.Override 1636 public CertificateChains parsePartialFrom( 1637 com.google.protobuf.CodedInputStream input, 1638 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1639 throws com.google.protobuf.InvalidProtocolBufferException { 1640 Builder builder = newBuilder(); 1641 try { 1642 builder.mergeFrom(input, extensionRegistry); 1643 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1644 throw e.setUnfinishedMessage(builder.buildPartial()); 1645 } catch (com.google.protobuf.UninitializedMessageException e) { 1646 throw e.asInvalidProtocolBufferException() 1647 .setUnfinishedMessage(builder.buildPartial()); 1648 } catch (java.io.IOException e) { 1649 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1650 .setUnfinishedMessage(builder.buildPartial()); 1651 } 1652 return builder.buildPartial(); 1653 } 1654 }; 1655 parser()1656 public static com.google.protobuf.Parser<CertificateChains> parser() { 1657 return PARSER; 1658 } 1659 1660 @java.lang.Override getParserForType()1661 public com.google.protobuf.Parser<CertificateChains> getParserForType() { 1662 return PARSER; 1663 } 1664 1665 @java.lang.Override 1666 public com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains getDefaultInstanceForType()1667 getDefaultInstanceForType() { 1668 return DEFAULT_INSTANCE; 1669 } 1670 } 1671 1672 public static final int FORMAT_FIELD_NUMBER = 4; 1673 private int format_ = 0; 1674 /** 1675 * 1676 * 1677 * <pre> 1678 * Output only. The format of the attestation data. 1679 * </pre> 1680 * 1681 * <code> 1682 * .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1683 * </code> 1684 * 1685 * @return The enum numeric value on the wire for format. 1686 */ 1687 @java.lang.Override getFormatValue()1688 public int getFormatValue() { 1689 return format_; 1690 } 1691 /** 1692 * 1693 * 1694 * <pre> 1695 * Output only. The format of the attestation data. 1696 * </pre> 1697 * 1698 * <code> 1699 * .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1700 * </code> 1701 * 1702 * @return The format. 1703 */ 1704 @java.lang.Override getFormat()1705 public com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat getFormat() { 1706 com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat result = 1707 com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat.forNumber(format_); 1708 return result == null 1709 ? com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat.UNRECOGNIZED 1710 : result; 1711 } 1712 1713 public static final int CONTENT_FIELD_NUMBER = 5; 1714 private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; 1715 /** 1716 * 1717 * 1718 * <pre> 1719 * Output only. The attestation data provided by the HSM when the key 1720 * operation was performed. 1721 * </pre> 1722 * 1723 * <code>bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1724 * 1725 * @return The content. 1726 */ 1727 @java.lang.Override getContent()1728 public com.google.protobuf.ByteString getContent() { 1729 return content_; 1730 } 1731 1732 public static final int CERT_CHAINS_FIELD_NUMBER = 6; 1733 private com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains certChains_; 1734 /** 1735 * 1736 * 1737 * <pre> 1738 * Output only. The certificate chains needed to validate the attestation 1739 * </pre> 1740 * 1741 * <code> 1742 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1743 * </code> 1744 * 1745 * @return Whether the certChains field is set. 1746 */ 1747 @java.lang.Override hasCertChains()1748 public boolean hasCertChains() { 1749 return certChains_ != null; 1750 } 1751 /** 1752 * 1753 * 1754 * <pre> 1755 * Output only. The certificate chains needed to validate the attestation 1756 * </pre> 1757 * 1758 * <code> 1759 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1760 * </code> 1761 * 1762 * @return The certChains. 1763 */ 1764 @java.lang.Override getCertChains()1765 public com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains getCertChains() { 1766 return certChains_ == null 1767 ? com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.getDefaultInstance() 1768 : certChains_; 1769 } 1770 /** 1771 * 1772 * 1773 * <pre> 1774 * Output only. The certificate chains needed to validate the attestation 1775 * </pre> 1776 * 1777 * <code> 1778 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1779 * </code> 1780 */ 1781 @java.lang.Override 1782 public com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChainsOrBuilder getCertChainsOrBuilder()1783 getCertChainsOrBuilder() { 1784 return certChains_ == null 1785 ? com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.getDefaultInstance() 1786 : certChains_; 1787 } 1788 1789 private byte memoizedIsInitialized = -1; 1790 1791 @java.lang.Override isInitialized()1792 public final boolean isInitialized() { 1793 byte isInitialized = memoizedIsInitialized; 1794 if (isInitialized == 1) return true; 1795 if (isInitialized == 0) return false; 1796 1797 memoizedIsInitialized = 1; 1798 return true; 1799 } 1800 1801 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1802 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1803 if (format_ 1804 != com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat 1805 .ATTESTATION_FORMAT_UNSPECIFIED 1806 .getNumber()) { 1807 output.writeEnum(4, format_); 1808 } 1809 if (!content_.isEmpty()) { 1810 output.writeBytes(5, content_); 1811 } 1812 if (certChains_ != null) { 1813 output.writeMessage(6, getCertChains()); 1814 } 1815 getUnknownFields().writeTo(output); 1816 } 1817 1818 @java.lang.Override getSerializedSize()1819 public int getSerializedSize() { 1820 int size = memoizedSize; 1821 if (size != -1) return size; 1822 1823 size = 0; 1824 if (format_ 1825 != com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat 1826 .ATTESTATION_FORMAT_UNSPECIFIED 1827 .getNumber()) { 1828 size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, format_); 1829 } 1830 if (!content_.isEmpty()) { 1831 size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, content_); 1832 } 1833 if (certChains_ != null) { 1834 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCertChains()); 1835 } 1836 size += getUnknownFields().getSerializedSize(); 1837 memoizedSize = size; 1838 return size; 1839 } 1840 1841 @java.lang.Override equals(final java.lang.Object obj)1842 public boolean equals(final java.lang.Object obj) { 1843 if (obj == this) { 1844 return true; 1845 } 1846 if (!(obj instanceof com.google.cloud.kms.v1.KeyOperationAttestation)) { 1847 return super.equals(obj); 1848 } 1849 com.google.cloud.kms.v1.KeyOperationAttestation other = 1850 (com.google.cloud.kms.v1.KeyOperationAttestation) obj; 1851 1852 if (format_ != other.format_) return false; 1853 if (!getContent().equals(other.getContent())) return false; 1854 if (hasCertChains() != other.hasCertChains()) return false; 1855 if (hasCertChains()) { 1856 if (!getCertChains().equals(other.getCertChains())) return false; 1857 } 1858 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1859 return true; 1860 } 1861 1862 @java.lang.Override hashCode()1863 public int hashCode() { 1864 if (memoizedHashCode != 0) { 1865 return memoizedHashCode; 1866 } 1867 int hash = 41; 1868 hash = (19 * hash) + getDescriptor().hashCode(); 1869 hash = (37 * hash) + FORMAT_FIELD_NUMBER; 1870 hash = (53 * hash) + format_; 1871 hash = (37 * hash) + CONTENT_FIELD_NUMBER; 1872 hash = (53 * hash) + getContent().hashCode(); 1873 if (hasCertChains()) { 1874 hash = (37 * hash) + CERT_CHAINS_FIELD_NUMBER; 1875 hash = (53 * hash) + getCertChains().hashCode(); 1876 } 1877 hash = (29 * hash) + getUnknownFields().hashCode(); 1878 memoizedHashCode = hash; 1879 return hash; 1880 } 1881 parseFrom(java.nio.ByteBuffer data)1882 public static com.google.cloud.kms.v1.KeyOperationAttestation parseFrom(java.nio.ByteBuffer data) 1883 throws com.google.protobuf.InvalidProtocolBufferException { 1884 return PARSER.parseFrom(data); 1885 } 1886 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1887 public static com.google.cloud.kms.v1.KeyOperationAttestation parseFrom( 1888 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1889 throws com.google.protobuf.InvalidProtocolBufferException { 1890 return PARSER.parseFrom(data, extensionRegistry); 1891 } 1892 parseFrom( com.google.protobuf.ByteString data)1893 public static com.google.cloud.kms.v1.KeyOperationAttestation parseFrom( 1894 com.google.protobuf.ByteString data) 1895 throws com.google.protobuf.InvalidProtocolBufferException { 1896 return PARSER.parseFrom(data); 1897 } 1898 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1899 public static com.google.cloud.kms.v1.KeyOperationAttestation parseFrom( 1900 com.google.protobuf.ByteString data, 1901 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1902 throws com.google.protobuf.InvalidProtocolBufferException { 1903 return PARSER.parseFrom(data, extensionRegistry); 1904 } 1905 parseFrom(byte[] data)1906 public static com.google.cloud.kms.v1.KeyOperationAttestation parseFrom(byte[] data) 1907 throws com.google.protobuf.InvalidProtocolBufferException { 1908 return PARSER.parseFrom(data); 1909 } 1910 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1911 public static com.google.cloud.kms.v1.KeyOperationAttestation parseFrom( 1912 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1913 throws com.google.protobuf.InvalidProtocolBufferException { 1914 return PARSER.parseFrom(data, extensionRegistry); 1915 } 1916 parseFrom(java.io.InputStream input)1917 public static com.google.cloud.kms.v1.KeyOperationAttestation parseFrom(java.io.InputStream input) 1918 throws java.io.IOException { 1919 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1920 } 1921 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1922 public static com.google.cloud.kms.v1.KeyOperationAttestation parseFrom( 1923 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1924 throws java.io.IOException { 1925 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1926 PARSER, input, extensionRegistry); 1927 } 1928 parseDelimitedFrom( java.io.InputStream input)1929 public static com.google.cloud.kms.v1.KeyOperationAttestation parseDelimitedFrom( 1930 java.io.InputStream input) throws java.io.IOException { 1931 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1932 } 1933 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1934 public static com.google.cloud.kms.v1.KeyOperationAttestation parseDelimitedFrom( 1935 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1936 throws java.io.IOException { 1937 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1938 PARSER, input, extensionRegistry); 1939 } 1940 parseFrom( com.google.protobuf.CodedInputStream input)1941 public static com.google.cloud.kms.v1.KeyOperationAttestation parseFrom( 1942 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1943 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1944 } 1945 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1946 public static com.google.cloud.kms.v1.KeyOperationAttestation parseFrom( 1947 com.google.protobuf.CodedInputStream input, 1948 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1949 throws java.io.IOException { 1950 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1951 PARSER, input, extensionRegistry); 1952 } 1953 1954 @java.lang.Override newBuilderForType()1955 public Builder newBuilderForType() { 1956 return newBuilder(); 1957 } 1958 newBuilder()1959 public static Builder newBuilder() { 1960 return DEFAULT_INSTANCE.toBuilder(); 1961 } 1962 newBuilder(com.google.cloud.kms.v1.KeyOperationAttestation prototype)1963 public static Builder newBuilder(com.google.cloud.kms.v1.KeyOperationAttestation prototype) { 1964 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1965 } 1966 1967 @java.lang.Override toBuilder()1968 public Builder toBuilder() { 1969 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1970 } 1971 1972 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1973 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1974 Builder builder = new Builder(parent); 1975 return builder; 1976 } 1977 /** 1978 * 1979 * 1980 * <pre> 1981 * Contains an HSM-generated attestation about a key operation. For more 1982 * information, see [Verifying attestations] 1983 * (https://cloud.google.com/kms/docs/attest-key). 1984 * </pre> 1985 * 1986 * Protobuf type {@code google.cloud.kms.v1.KeyOperationAttestation} 1987 */ 1988 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1989 implements 1990 // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.KeyOperationAttestation) 1991 com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder { getDescriptor()1992 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1993 return com.google.cloud.kms.v1.KmsResourcesProto 1994 .internal_static_google_cloud_kms_v1_KeyOperationAttestation_descriptor; 1995 } 1996 1997 @java.lang.Override 1998 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1999 internalGetFieldAccessorTable() { 2000 return com.google.cloud.kms.v1.KmsResourcesProto 2001 .internal_static_google_cloud_kms_v1_KeyOperationAttestation_fieldAccessorTable 2002 .ensureFieldAccessorsInitialized( 2003 com.google.cloud.kms.v1.KeyOperationAttestation.class, 2004 com.google.cloud.kms.v1.KeyOperationAttestation.Builder.class); 2005 } 2006 2007 // Construct using com.google.cloud.kms.v1.KeyOperationAttestation.newBuilder() Builder()2008 private Builder() {} 2009 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2010 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 2011 super(parent); 2012 } 2013 2014 @java.lang.Override clear()2015 public Builder clear() { 2016 super.clear(); 2017 bitField0_ = 0; 2018 format_ = 0; 2019 content_ = com.google.protobuf.ByteString.EMPTY; 2020 certChains_ = null; 2021 if (certChainsBuilder_ != null) { 2022 certChainsBuilder_.dispose(); 2023 certChainsBuilder_ = null; 2024 } 2025 return this; 2026 } 2027 2028 @java.lang.Override getDescriptorForType()2029 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 2030 return com.google.cloud.kms.v1.KmsResourcesProto 2031 .internal_static_google_cloud_kms_v1_KeyOperationAttestation_descriptor; 2032 } 2033 2034 @java.lang.Override getDefaultInstanceForType()2035 public com.google.cloud.kms.v1.KeyOperationAttestation getDefaultInstanceForType() { 2036 return com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance(); 2037 } 2038 2039 @java.lang.Override build()2040 public com.google.cloud.kms.v1.KeyOperationAttestation build() { 2041 com.google.cloud.kms.v1.KeyOperationAttestation result = buildPartial(); 2042 if (!result.isInitialized()) { 2043 throw newUninitializedMessageException(result); 2044 } 2045 return result; 2046 } 2047 2048 @java.lang.Override buildPartial()2049 public com.google.cloud.kms.v1.KeyOperationAttestation buildPartial() { 2050 com.google.cloud.kms.v1.KeyOperationAttestation result = 2051 new com.google.cloud.kms.v1.KeyOperationAttestation(this); 2052 if (bitField0_ != 0) { 2053 buildPartial0(result); 2054 } 2055 onBuilt(); 2056 return result; 2057 } 2058 buildPartial0(com.google.cloud.kms.v1.KeyOperationAttestation result)2059 private void buildPartial0(com.google.cloud.kms.v1.KeyOperationAttestation result) { 2060 int from_bitField0_ = bitField0_; 2061 if (((from_bitField0_ & 0x00000001) != 0)) { 2062 result.format_ = format_; 2063 } 2064 if (((from_bitField0_ & 0x00000002) != 0)) { 2065 result.content_ = content_; 2066 } 2067 if (((from_bitField0_ & 0x00000004) != 0)) { 2068 result.certChains_ = certChainsBuilder_ == null ? certChains_ : certChainsBuilder_.build(); 2069 } 2070 } 2071 2072 @java.lang.Override clone()2073 public Builder clone() { 2074 return super.clone(); 2075 } 2076 2077 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2078 public Builder setField( 2079 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 2080 return super.setField(field, value); 2081 } 2082 2083 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2084 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 2085 return super.clearField(field); 2086 } 2087 2088 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2089 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 2090 return super.clearOneof(oneof); 2091 } 2092 2093 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2094 public Builder setRepeatedField( 2095 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 2096 return super.setRepeatedField(field, index, value); 2097 } 2098 2099 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2100 public Builder addRepeatedField( 2101 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 2102 return super.addRepeatedField(field, value); 2103 } 2104 2105 @java.lang.Override mergeFrom(com.google.protobuf.Message other)2106 public Builder mergeFrom(com.google.protobuf.Message other) { 2107 if (other instanceof com.google.cloud.kms.v1.KeyOperationAttestation) { 2108 return mergeFrom((com.google.cloud.kms.v1.KeyOperationAttestation) other); 2109 } else { 2110 super.mergeFrom(other); 2111 return this; 2112 } 2113 } 2114 mergeFrom(com.google.cloud.kms.v1.KeyOperationAttestation other)2115 public Builder mergeFrom(com.google.cloud.kms.v1.KeyOperationAttestation other) { 2116 if (other == com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()) 2117 return this; 2118 if (other.format_ != 0) { 2119 setFormatValue(other.getFormatValue()); 2120 } 2121 if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { 2122 setContent(other.getContent()); 2123 } 2124 if (other.hasCertChains()) { 2125 mergeCertChains(other.getCertChains()); 2126 } 2127 this.mergeUnknownFields(other.getUnknownFields()); 2128 onChanged(); 2129 return this; 2130 } 2131 2132 @java.lang.Override isInitialized()2133 public final boolean isInitialized() { 2134 return true; 2135 } 2136 2137 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2138 public Builder mergeFrom( 2139 com.google.protobuf.CodedInputStream input, 2140 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2141 throws java.io.IOException { 2142 if (extensionRegistry == null) { 2143 throw new java.lang.NullPointerException(); 2144 } 2145 try { 2146 boolean done = false; 2147 while (!done) { 2148 int tag = input.readTag(); 2149 switch (tag) { 2150 case 0: 2151 done = true; 2152 break; 2153 case 32: 2154 { 2155 format_ = input.readEnum(); 2156 bitField0_ |= 0x00000001; 2157 break; 2158 } // case 32 2159 case 42: 2160 { 2161 content_ = input.readBytes(); 2162 bitField0_ |= 0x00000002; 2163 break; 2164 } // case 42 2165 case 50: 2166 { 2167 input.readMessage(getCertChainsFieldBuilder().getBuilder(), extensionRegistry); 2168 bitField0_ |= 0x00000004; 2169 break; 2170 } // case 50 2171 default: 2172 { 2173 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 2174 done = true; // was an endgroup tag 2175 } 2176 break; 2177 } // default: 2178 } // switch (tag) 2179 } // while (!done) 2180 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2181 throw e.unwrapIOException(); 2182 } finally { 2183 onChanged(); 2184 } // finally 2185 return this; 2186 } 2187 2188 private int bitField0_; 2189 2190 private int format_ = 0; 2191 /** 2192 * 2193 * 2194 * <pre> 2195 * Output only. The format of the attestation data. 2196 * </pre> 2197 * 2198 * <code> 2199 * .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2200 * </code> 2201 * 2202 * @return The enum numeric value on the wire for format. 2203 */ 2204 @java.lang.Override getFormatValue()2205 public int getFormatValue() { 2206 return format_; 2207 } 2208 /** 2209 * 2210 * 2211 * <pre> 2212 * Output only. The format of the attestation data. 2213 * </pre> 2214 * 2215 * <code> 2216 * .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2217 * </code> 2218 * 2219 * @param value The enum numeric value on the wire for format to set. 2220 * @return This builder for chaining. 2221 */ setFormatValue(int value)2222 public Builder setFormatValue(int value) { 2223 format_ = value; 2224 bitField0_ |= 0x00000001; 2225 onChanged(); 2226 return this; 2227 } 2228 /** 2229 * 2230 * 2231 * <pre> 2232 * Output only. The format of the attestation data. 2233 * </pre> 2234 * 2235 * <code> 2236 * .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2237 * </code> 2238 * 2239 * @return The format. 2240 */ 2241 @java.lang.Override getFormat()2242 public com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat getFormat() { 2243 com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat result = 2244 com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat.forNumber(format_); 2245 return result == null 2246 ? com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat.UNRECOGNIZED 2247 : result; 2248 } 2249 /** 2250 * 2251 * 2252 * <pre> 2253 * Output only. The format of the attestation data. 2254 * </pre> 2255 * 2256 * <code> 2257 * .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2258 * </code> 2259 * 2260 * @param value The format to set. 2261 * @return This builder for chaining. 2262 */ setFormat( com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat value)2263 public Builder setFormat( 2264 com.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat value) { 2265 if (value == null) { 2266 throw new NullPointerException(); 2267 } 2268 bitField0_ |= 0x00000001; 2269 format_ = value.getNumber(); 2270 onChanged(); 2271 return this; 2272 } 2273 /** 2274 * 2275 * 2276 * <pre> 2277 * Output only. The format of the attestation data. 2278 * </pre> 2279 * 2280 * <code> 2281 * .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2282 * </code> 2283 * 2284 * @return This builder for chaining. 2285 */ clearFormat()2286 public Builder clearFormat() { 2287 bitField0_ = (bitField0_ & ~0x00000001); 2288 format_ = 0; 2289 onChanged(); 2290 return this; 2291 } 2292 2293 private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; 2294 /** 2295 * 2296 * 2297 * <pre> 2298 * Output only. The attestation data provided by the HSM when the key 2299 * operation was performed. 2300 * </pre> 2301 * 2302 * <code>bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2303 * 2304 * @return The content. 2305 */ 2306 @java.lang.Override getContent()2307 public com.google.protobuf.ByteString getContent() { 2308 return content_; 2309 } 2310 /** 2311 * 2312 * 2313 * <pre> 2314 * Output only. The attestation data provided by the HSM when the key 2315 * operation was performed. 2316 * </pre> 2317 * 2318 * <code>bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2319 * 2320 * @param value The content to set. 2321 * @return This builder for chaining. 2322 */ setContent(com.google.protobuf.ByteString value)2323 public Builder setContent(com.google.protobuf.ByteString value) { 2324 if (value == null) { 2325 throw new NullPointerException(); 2326 } 2327 content_ = value; 2328 bitField0_ |= 0x00000002; 2329 onChanged(); 2330 return this; 2331 } 2332 /** 2333 * 2334 * 2335 * <pre> 2336 * Output only. The attestation data provided by the HSM when the key 2337 * operation was performed. 2338 * </pre> 2339 * 2340 * <code>bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2341 * 2342 * @return This builder for chaining. 2343 */ clearContent()2344 public Builder clearContent() { 2345 bitField0_ = (bitField0_ & ~0x00000002); 2346 content_ = getDefaultInstance().getContent(); 2347 onChanged(); 2348 return this; 2349 } 2350 2351 private com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains certChains_; 2352 private com.google.protobuf.SingleFieldBuilderV3< 2353 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains, 2354 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.Builder, 2355 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChainsOrBuilder> 2356 certChainsBuilder_; 2357 /** 2358 * 2359 * 2360 * <pre> 2361 * Output only. The certificate chains needed to validate the attestation 2362 * </pre> 2363 * 2364 * <code> 2365 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2366 * </code> 2367 * 2368 * @return Whether the certChains field is set. 2369 */ hasCertChains()2370 public boolean hasCertChains() { 2371 return ((bitField0_ & 0x00000004) != 0); 2372 } 2373 /** 2374 * 2375 * 2376 * <pre> 2377 * Output only. The certificate chains needed to validate the attestation 2378 * </pre> 2379 * 2380 * <code> 2381 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2382 * </code> 2383 * 2384 * @return The certChains. 2385 */ getCertChains()2386 public com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains getCertChains() { 2387 if (certChainsBuilder_ == null) { 2388 return certChains_ == null 2389 ? com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.getDefaultInstance() 2390 : certChains_; 2391 } else { 2392 return certChainsBuilder_.getMessage(); 2393 } 2394 } 2395 /** 2396 * 2397 * 2398 * <pre> 2399 * Output only. The certificate chains needed to validate the attestation 2400 * </pre> 2401 * 2402 * <code> 2403 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2404 * </code> 2405 */ setCertChains( com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains value)2406 public Builder setCertChains( 2407 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains value) { 2408 if (certChainsBuilder_ == null) { 2409 if (value == null) { 2410 throw new NullPointerException(); 2411 } 2412 certChains_ = value; 2413 } else { 2414 certChainsBuilder_.setMessage(value); 2415 } 2416 bitField0_ |= 0x00000004; 2417 onChanged(); 2418 return this; 2419 } 2420 /** 2421 * 2422 * 2423 * <pre> 2424 * Output only. The certificate chains needed to validate the attestation 2425 * </pre> 2426 * 2427 * <code> 2428 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2429 * </code> 2430 */ setCertChains( com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.Builder builderForValue)2431 public Builder setCertChains( 2432 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.Builder builderForValue) { 2433 if (certChainsBuilder_ == null) { 2434 certChains_ = builderForValue.build(); 2435 } else { 2436 certChainsBuilder_.setMessage(builderForValue.build()); 2437 } 2438 bitField0_ |= 0x00000004; 2439 onChanged(); 2440 return this; 2441 } 2442 /** 2443 * 2444 * 2445 * <pre> 2446 * Output only. The certificate chains needed to validate the attestation 2447 * </pre> 2448 * 2449 * <code> 2450 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2451 * </code> 2452 */ mergeCertChains( com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains value)2453 public Builder mergeCertChains( 2454 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains value) { 2455 if (certChainsBuilder_ == null) { 2456 if (((bitField0_ & 0x00000004) != 0) 2457 && certChains_ != null 2458 && certChains_ 2459 != com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains 2460 .getDefaultInstance()) { 2461 getCertChainsBuilder().mergeFrom(value); 2462 } else { 2463 certChains_ = value; 2464 } 2465 } else { 2466 certChainsBuilder_.mergeFrom(value); 2467 } 2468 bitField0_ |= 0x00000004; 2469 onChanged(); 2470 return this; 2471 } 2472 /** 2473 * 2474 * 2475 * <pre> 2476 * Output only. The certificate chains needed to validate the attestation 2477 * </pre> 2478 * 2479 * <code> 2480 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2481 * </code> 2482 */ clearCertChains()2483 public Builder clearCertChains() { 2484 bitField0_ = (bitField0_ & ~0x00000004); 2485 certChains_ = null; 2486 if (certChainsBuilder_ != null) { 2487 certChainsBuilder_.dispose(); 2488 certChainsBuilder_ = null; 2489 } 2490 onChanged(); 2491 return this; 2492 } 2493 /** 2494 * 2495 * 2496 * <pre> 2497 * Output only. The certificate chains needed to validate the attestation 2498 * </pre> 2499 * 2500 * <code> 2501 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2502 * </code> 2503 */ 2504 public com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.Builder getCertChainsBuilder()2505 getCertChainsBuilder() { 2506 bitField0_ |= 0x00000004; 2507 onChanged(); 2508 return getCertChainsFieldBuilder().getBuilder(); 2509 } 2510 /** 2511 * 2512 * 2513 * <pre> 2514 * Output only. The certificate chains needed to validate the attestation 2515 * </pre> 2516 * 2517 * <code> 2518 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2519 * </code> 2520 */ 2521 public com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChainsOrBuilder getCertChainsOrBuilder()2522 getCertChainsOrBuilder() { 2523 if (certChainsBuilder_ != null) { 2524 return certChainsBuilder_.getMessageOrBuilder(); 2525 } else { 2526 return certChains_ == null 2527 ? com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.getDefaultInstance() 2528 : certChains_; 2529 } 2530 } 2531 /** 2532 * 2533 * 2534 * <pre> 2535 * Output only. The certificate chains needed to validate the attestation 2536 * </pre> 2537 * 2538 * <code> 2539 * .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2540 * </code> 2541 */ 2542 private com.google.protobuf.SingleFieldBuilderV3< 2543 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains, 2544 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.Builder, 2545 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChainsOrBuilder> getCertChainsFieldBuilder()2546 getCertChainsFieldBuilder() { 2547 if (certChainsBuilder_ == null) { 2548 certChainsBuilder_ = 2549 new com.google.protobuf.SingleFieldBuilderV3< 2550 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains, 2551 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.Builder, 2552 com.google.cloud.kms.v1.KeyOperationAttestation.CertificateChainsOrBuilder>( 2553 getCertChains(), getParentForChildren(), isClean()); 2554 certChains_ = null; 2555 } 2556 return certChainsBuilder_; 2557 } 2558 2559 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2560 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2561 return super.setUnknownFields(unknownFields); 2562 } 2563 2564 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2565 public final Builder mergeUnknownFields( 2566 final com.google.protobuf.UnknownFieldSet unknownFields) { 2567 return super.mergeUnknownFields(unknownFields); 2568 } 2569 2570 // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.KeyOperationAttestation) 2571 } 2572 2573 // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.KeyOperationAttestation) 2574 private static final com.google.cloud.kms.v1.KeyOperationAttestation DEFAULT_INSTANCE; 2575 2576 static { 2577 DEFAULT_INSTANCE = new com.google.cloud.kms.v1.KeyOperationAttestation(); 2578 } 2579 getDefaultInstance()2580 public static com.google.cloud.kms.v1.KeyOperationAttestation getDefaultInstance() { 2581 return DEFAULT_INSTANCE; 2582 } 2583 2584 private static final com.google.protobuf.Parser<KeyOperationAttestation> PARSER = 2585 new com.google.protobuf.AbstractParser<KeyOperationAttestation>() { 2586 @java.lang.Override 2587 public KeyOperationAttestation parsePartialFrom( 2588 com.google.protobuf.CodedInputStream input, 2589 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2590 throws com.google.protobuf.InvalidProtocolBufferException { 2591 Builder builder = newBuilder(); 2592 try { 2593 builder.mergeFrom(input, extensionRegistry); 2594 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2595 throw e.setUnfinishedMessage(builder.buildPartial()); 2596 } catch (com.google.protobuf.UninitializedMessageException e) { 2597 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2598 } catch (java.io.IOException e) { 2599 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2600 .setUnfinishedMessage(builder.buildPartial()); 2601 } 2602 return builder.buildPartial(); 2603 } 2604 }; 2605 parser()2606 public static com.google.protobuf.Parser<KeyOperationAttestation> parser() { 2607 return PARSER; 2608 } 2609 2610 @java.lang.Override getParserForType()2611 public com.google.protobuf.Parser<KeyOperationAttestation> getParserForType() { 2612 return PARSER; 2613 } 2614 2615 @java.lang.Override getDefaultInstanceForType()2616 public com.google.cloud.kms.v1.KeyOperationAttestation getDefaultInstanceForType() { 2617 return DEFAULT_INSTANCE; 2618 } 2619 } 2620