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/service.proto 18 19 package com.google.cloud.kms.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Response message for 26 * [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]. 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.kms.v1.AsymmetricSignResponse} 30 */ 31 public final class AsymmetricSignResponse extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.AsymmetricSignResponse) 34 AsymmetricSignResponseOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use AsymmetricSignResponse.newBuilder() to construct. AsymmetricSignResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private AsymmetricSignResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 AsymmetricSignResponse()41 private AsymmetricSignResponse() { 42 signature_ = com.google.protobuf.ByteString.EMPTY; 43 name_ = ""; 44 protectionLevel_ = 0; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new AsymmetricSignResponse(); 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.KmsProto 60 .internal_static_google_cloud_kms_v1_AsymmetricSignResponse_descriptor; 61 } 62 63 @java.lang.Override 64 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()65 internalGetFieldAccessorTable() { 66 return com.google.cloud.kms.v1.KmsProto 67 .internal_static_google_cloud_kms_v1_AsymmetricSignResponse_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.cloud.kms.v1.AsymmetricSignResponse.class, 70 com.google.cloud.kms.v1.AsymmetricSignResponse.Builder.class); 71 } 72 73 public static final int SIGNATURE_FIELD_NUMBER = 1; 74 private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; 75 /** 76 * 77 * 78 * <pre> 79 * The created signature. 80 * </pre> 81 * 82 * <code>bytes signature = 1;</code> 83 * 84 * @return The signature. 85 */ 86 @java.lang.Override getSignature()87 public com.google.protobuf.ByteString getSignature() { 88 return signature_; 89 } 90 91 public static final int SIGNATURE_CRC32C_FIELD_NUMBER = 2; 92 private com.google.protobuf.Int64Value signatureCrc32C_; 93 /** 94 * 95 * 96 * <pre> 97 * Integrity verification field. A CRC32C checksum of the returned 98 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 99 * An integrity check of 100 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 101 * can be performed by computing the CRC32C checksum of 102 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 103 * and comparing your results to this field. Discard the response in case of 104 * non-matching checksum values, and perform a limited number of retries. A 105 * persistent mismatch may indicate an issue in your computation of the CRC32C 106 * checksum. Note: This field is defined as int64 for reasons of compatibility 107 * across different languages. However, it is a non-negative integer, which 108 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 109 * languages that support this type. 110 * </pre> 111 * 112 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 113 * 114 * @return Whether the signatureCrc32c field is set. 115 */ 116 @java.lang.Override hasSignatureCrc32C()117 public boolean hasSignatureCrc32C() { 118 return signatureCrc32C_ != null; 119 } 120 /** 121 * 122 * 123 * <pre> 124 * Integrity verification field. A CRC32C checksum of the returned 125 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 126 * An integrity check of 127 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 128 * can be performed by computing the CRC32C checksum of 129 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 130 * and comparing your results to this field. Discard the response in case of 131 * non-matching checksum values, and perform a limited number of retries. A 132 * persistent mismatch may indicate an issue in your computation of the CRC32C 133 * checksum. Note: This field is defined as int64 for reasons of compatibility 134 * across different languages. However, it is a non-negative integer, which 135 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 136 * languages that support this type. 137 * </pre> 138 * 139 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 140 * 141 * @return The signatureCrc32c. 142 */ 143 @java.lang.Override getSignatureCrc32C()144 public com.google.protobuf.Int64Value getSignatureCrc32C() { 145 return signatureCrc32C_ == null 146 ? com.google.protobuf.Int64Value.getDefaultInstance() 147 : signatureCrc32C_; 148 } 149 /** 150 * 151 * 152 * <pre> 153 * Integrity verification field. A CRC32C checksum of the returned 154 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 155 * An integrity check of 156 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 157 * can be performed by computing the CRC32C checksum of 158 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 159 * and comparing your results to this field. Discard the response in case of 160 * non-matching checksum values, and perform a limited number of retries. A 161 * persistent mismatch may indicate an issue in your computation of the CRC32C 162 * checksum. Note: This field is defined as int64 for reasons of compatibility 163 * across different languages. However, it is a non-negative integer, which 164 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 165 * languages that support this type. 166 * </pre> 167 * 168 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 169 */ 170 @java.lang.Override getSignatureCrc32COrBuilder()171 public com.google.protobuf.Int64ValueOrBuilder getSignatureCrc32COrBuilder() { 172 return signatureCrc32C_ == null 173 ? com.google.protobuf.Int64Value.getDefaultInstance() 174 : signatureCrc32C_; 175 } 176 177 public static final int VERIFIED_DIGEST_CRC32C_FIELD_NUMBER = 3; 178 private boolean verifiedDigestCrc32C_ = false; 179 /** 180 * 181 * 182 * <pre> 183 * Integrity verification field. A flag indicating whether 184 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 185 * was received by 186 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used 187 * for the integrity verification of the 188 * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value 189 * of this field indicates either that 190 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 191 * was left unset or that it was not delivered to 192 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've 193 * set 194 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 195 * but this field is still false, discard the response and perform a limited 196 * number of retries. 197 * </pre> 198 * 199 * <code>bool verified_digest_crc32c = 3;</code> 200 * 201 * @return The verifiedDigestCrc32c. 202 */ 203 @java.lang.Override getVerifiedDigestCrc32C()204 public boolean getVerifiedDigestCrc32C() { 205 return verifiedDigestCrc32C_; 206 } 207 208 public static final int NAME_FIELD_NUMBER = 4; 209 210 @SuppressWarnings("serial") 211 private volatile java.lang.Object name_ = ""; 212 /** 213 * 214 * 215 * <pre> 216 * The resource name of the 217 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 218 * Check this field to verify that the intended resource was used for signing. 219 * </pre> 220 * 221 * <code>string name = 4;</code> 222 * 223 * @return The name. 224 */ 225 @java.lang.Override getName()226 public java.lang.String getName() { 227 java.lang.Object ref = name_; 228 if (ref instanceof java.lang.String) { 229 return (java.lang.String) ref; 230 } else { 231 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 232 java.lang.String s = bs.toStringUtf8(); 233 name_ = s; 234 return s; 235 } 236 } 237 /** 238 * 239 * 240 * <pre> 241 * The resource name of the 242 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 243 * Check this field to verify that the intended resource was used for signing. 244 * </pre> 245 * 246 * <code>string name = 4;</code> 247 * 248 * @return The bytes for name. 249 */ 250 @java.lang.Override getNameBytes()251 public com.google.protobuf.ByteString getNameBytes() { 252 java.lang.Object ref = name_; 253 if (ref instanceof java.lang.String) { 254 com.google.protobuf.ByteString b = 255 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 256 name_ = b; 257 return b; 258 } else { 259 return (com.google.protobuf.ByteString) ref; 260 } 261 } 262 263 public static final int VERIFIED_DATA_CRC32C_FIELD_NUMBER = 5; 264 private boolean verifiedDataCrc32C_ = false; 265 /** 266 * 267 * 268 * <pre> 269 * Integrity verification field. A flag indicating whether 270 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 271 * was received by 272 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used 273 * for the integrity verification of the 274 * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of 275 * this field indicates either that 276 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 277 * was left unset or that it was not delivered to 278 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've 279 * set 280 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 281 * but this field is still false, discard the response and perform a limited 282 * number of retries. 283 * </pre> 284 * 285 * <code>bool verified_data_crc32c = 5;</code> 286 * 287 * @return The verifiedDataCrc32c. 288 */ 289 @java.lang.Override getVerifiedDataCrc32C()290 public boolean getVerifiedDataCrc32C() { 291 return verifiedDataCrc32C_; 292 } 293 294 public static final int PROTECTION_LEVEL_FIELD_NUMBER = 6; 295 private int protectionLevel_ = 0; 296 /** 297 * 298 * 299 * <pre> 300 * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the 301 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 302 * </pre> 303 * 304 * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 6;</code> 305 * 306 * @return The enum numeric value on the wire for protectionLevel. 307 */ 308 @java.lang.Override getProtectionLevelValue()309 public int getProtectionLevelValue() { 310 return protectionLevel_; 311 } 312 /** 313 * 314 * 315 * <pre> 316 * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the 317 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 318 * </pre> 319 * 320 * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 6;</code> 321 * 322 * @return The protectionLevel. 323 */ 324 @java.lang.Override getProtectionLevel()325 public com.google.cloud.kms.v1.ProtectionLevel getProtectionLevel() { 326 com.google.cloud.kms.v1.ProtectionLevel result = 327 com.google.cloud.kms.v1.ProtectionLevel.forNumber(protectionLevel_); 328 return result == null ? com.google.cloud.kms.v1.ProtectionLevel.UNRECOGNIZED : result; 329 } 330 331 private byte memoizedIsInitialized = -1; 332 333 @java.lang.Override isInitialized()334 public final boolean isInitialized() { 335 byte isInitialized = memoizedIsInitialized; 336 if (isInitialized == 1) return true; 337 if (isInitialized == 0) return false; 338 339 memoizedIsInitialized = 1; 340 return true; 341 } 342 343 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)344 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 345 if (!signature_.isEmpty()) { 346 output.writeBytes(1, signature_); 347 } 348 if (signatureCrc32C_ != null) { 349 output.writeMessage(2, getSignatureCrc32C()); 350 } 351 if (verifiedDigestCrc32C_ != false) { 352 output.writeBool(3, verifiedDigestCrc32C_); 353 } 354 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 355 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_); 356 } 357 if (verifiedDataCrc32C_ != false) { 358 output.writeBool(5, verifiedDataCrc32C_); 359 } 360 if (protectionLevel_ 361 != com.google.cloud.kms.v1.ProtectionLevel.PROTECTION_LEVEL_UNSPECIFIED.getNumber()) { 362 output.writeEnum(6, protectionLevel_); 363 } 364 getUnknownFields().writeTo(output); 365 } 366 367 @java.lang.Override getSerializedSize()368 public int getSerializedSize() { 369 int size = memoizedSize; 370 if (size != -1) return size; 371 372 size = 0; 373 if (!signature_.isEmpty()) { 374 size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, signature_); 375 } 376 if (signatureCrc32C_ != null) { 377 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSignatureCrc32C()); 378 } 379 if (verifiedDigestCrc32C_ != false) { 380 size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, verifiedDigestCrc32C_); 381 } 382 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 383 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_); 384 } 385 if (verifiedDataCrc32C_ != false) { 386 size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, verifiedDataCrc32C_); 387 } 388 if (protectionLevel_ 389 != com.google.cloud.kms.v1.ProtectionLevel.PROTECTION_LEVEL_UNSPECIFIED.getNumber()) { 390 size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, protectionLevel_); 391 } 392 size += getUnknownFields().getSerializedSize(); 393 memoizedSize = size; 394 return size; 395 } 396 397 @java.lang.Override equals(final java.lang.Object obj)398 public boolean equals(final java.lang.Object obj) { 399 if (obj == this) { 400 return true; 401 } 402 if (!(obj instanceof com.google.cloud.kms.v1.AsymmetricSignResponse)) { 403 return super.equals(obj); 404 } 405 com.google.cloud.kms.v1.AsymmetricSignResponse other = 406 (com.google.cloud.kms.v1.AsymmetricSignResponse) obj; 407 408 if (!getSignature().equals(other.getSignature())) return false; 409 if (hasSignatureCrc32C() != other.hasSignatureCrc32C()) return false; 410 if (hasSignatureCrc32C()) { 411 if (!getSignatureCrc32C().equals(other.getSignatureCrc32C())) return false; 412 } 413 if (getVerifiedDigestCrc32C() != other.getVerifiedDigestCrc32C()) return false; 414 if (!getName().equals(other.getName())) return false; 415 if (getVerifiedDataCrc32C() != other.getVerifiedDataCrc32C()) return false; 416 if (protectionLevel_ != other.protectionLevel_) return false; 417 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 418 return true; 419 } 420 421 @java.lang.Override hashCode()422 public int hashCode() { 423 if (memoizedHashCode != 0) { 424 return memoizedHashCode; 425 } 426 int hash = 41; 427 hash = (19 * hash) + getDescriptor().hashCode(); 428 hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; 429 hash = (53 * hash) + getSignature().hashCode(); 430 if (hasSignatureCrc32C()) { 431 hash = (37 * hash) + SIGNATURE_CRC32C_FIELD_NUMBER; 432 hash = (53 * hash) + getSignatureCrc32C().hashCode(); 433 } 434 hash = (37 * hash) + VERIFIED_DIGEST_CRC32C_FIELD_NUMBER; 435 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getVerifiedDigestCrc32C()); 436 hash = (37 * hash) + NAME_FIELD_NUMBER; 437 hash = (53 * hash) + getName().hashCode(); 438 hash = (37 * hash) + VERIFIED_DATA_CRC32C_FIELD_NUMBER; 439 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getVerifiedDataCrc32C()); 440 hash = (37 * hash) + PROTECTION_LEVEL_FIELD_NUMBER; 441 hash = (53 * hash) + protectionLevel_; 442 hash = (29 * hash) + getUnknownFields().hashCode(); 443 memoizedHashCode = hash; 444 return hash; 445 } 446 parseFrom(java.nio.ByteBuffer data)447 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseFrom(java.nio.ByteBuffer data) 448 throws com.google.protobuf.InvalidProtocolBufferException { 449 return PARSER.parseFrom(data); 450 } 451 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)452 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseFrom( 453 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 454 throws com.google.protobuf.InvalidProtocolBufferException { 455 return PARSER.parseFrom(data, extensionRegistry); 456 } 457 parseFrom( com.google.protobuf.ByteString data)458 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseFrom( 459 com.google.protobuf.ByteString data) 460 throws com.google.protobuf.InvalidProtocolBufferException { 461 return PARSER.parseFrom(data); 462 } 463 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)464 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseFrom( 465 com.google.protobuf.ByteString data, 466 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 467 throws com.google.protobuf.InvalidProtocolBufferException { 468 return PARSER.parseFrom(data, extensionRegistry); 469 } 470 parseFrom(byte[] data)471 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseFrom(byte[] data) 472 throws com.google.protobuf.InvalidProtocolBufferException { 473 return PARSER.parseFrom(data); 474 } 475 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)476 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseFrom( 477 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 478 throws com.google.protobuf.InvalidProtocolBufferException { 479 return PARSER.parseFrom(data, extensionRegistry); 480 } 481 parseFrom(java.io.InputStream input)482 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseFrom(java.io.InputStream input) 483 throws java.io.IOException { 484 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 485 } 486 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)487 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseFrom( 488 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 489 throws java.io.IOException { 490 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 491 PARSER, input, extensionRegistry); 492 } 493 parseDelimitedFrom( java.io.InputStream input)494 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseDelimitedFrom( 495 java.io.InputStream input) throws java.io.IOException { 496 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 497 } 498 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)499 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseDelimitedFrom( 500 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 501 throws java.io.IOException { 502 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 503 PARSER, input, extensionRegistry); 504 } 505 parseFrom( com.google.protobuf.CodedInputStream input)506 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseFrom( 507 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 508 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 509 } 510 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)511 public static com.google.cloud.kms.v1.AsymmetricSignResponse parseFrom( 512 com.google.protobuf.CodedInputStream input, 513 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 514 throws java.io.IOException { 515 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 516 PARSER, input, extensionRegistry); 517 } 518 519 @java.lang.Override newBuilderForType()520 public Builder newBuilderForType() { 521 return newBuilder(); 522 } 523 newBuilder()524 public static Builder newBuilder() { 525 return DEFAULT_INSTANCE.toBuilder(); 526 } 527 newBuilder(com.google.cloud.kms.v1.AsymmetricSignResponse prototype)528 public static Builder newBuilder(com.google.cloud.kms.v1.AsymmetricSignResponse prototype) { 529 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 530 } 531 532 @java.lang.Override toBuilder()533 public Builder toBuilder() { 534 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 535 } 536 537 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)538 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 539 Builder builder = new Builder(parent); 540 return builder; 541 } 542 /** 543 * 544 * 545 * <pre> 546 * Response message for 547 * [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]. 548 * </pre> 549 * 550 * Protobuf type {@code google.cloud.kms.v1.AsymmetricSignResponse} 551 */ 552 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 553 implements 554 // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.AsymmetricSignResponse) 555 com.google.cloud.kms.v1.AsymmetricSignResponseOrBuilder { getDescriptor()556 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 557 return com.google.cloud.kms.v1.KmsProto 558 .internal_static_google_cloud_kms_v1_AsymmetricSignResponse_descriptor; 559 } 560 561 @java.lang.Override 562 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()563 internalGetFieldAccessorTable() { 564 return com.google.cloud.kms.v1.KmsProto 565 .internal_static_google_cloud_kms_v1_AsymmetricSignResponse_fieldAccessorTable 566 .ensureFieldAccessorsInitialized( 567 com.google.cloud.kms.v1.AsymmetricSignResponse.class, 568 com.google.cloud.kms.v1.AsymmetricSignResponse.Builder.class); 569 } 570 571 // Construct using com.google.cloud.kms.v1.AsymmetricSignResponse.newBuilder() Builder()572 private Builder() {} 573 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)574 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 575 super(parent); 576 } 577 578 @java.lang.Override clear()579 public Builder clear() { 580 super.clear(); 581 bitField0_ = 0; 582 signature_ = com.google.protobuf.ByteString.EMPTY; 583 signatureCrc32C_ = null; 584 if (signatureCrc32CBuilder_ != null) { 585 signatureCrc32CBuilder_.dispose(); 586 signatureCrc32CBuilder_ = null; 587 } 588 verifiedDigestCrc32C_ = false; 589 name_ = ""; 590 verifiedDataCrc32C_ = false; 591 protectionLevel_ = 0; 592 return this; 593 } 594 595 @java.lang.Override getDescriptorForType()596 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 597 return com.google.cloud.kms.v1.KmsProto 598 .internal_static_google_cloud_kms_v1_AsymmetricSignResponse_descriptor; 599 } 600 601 @java.lang.Override getDefaultInstanceForType()602 public com.google.cloud.kms.v1.AsymmetricSignResponse getDefaultInstanceForType() { 603 return com.google.cloud.kms.v1.AsymmetricSignResponse.getDefaultInstance(); 604 } 605 606 @java.lang.Override build()607 public com.google.cloud.kms.v1.AsymmetricSignResponse build() { 608 com.google.cloud.kms.v1.AsymmetricSignResponse result = buildPartial(); 609 if (!result.isInitialized()) { 610 throw newUninitializedMessageException(result); 611 } 612 return result; 613 } 614 615 @java.lang.Override buildPartial()616 public com.google.cloud.kms.v1.AsymmetricSignResponse buildPartial() { 617 com.google.cloud.kms.v1.AsymmetricSignResponse result = 618 new com.google.cloud.kms.v1.AsymmetricSignResponse(this); 619 if (bitField0_ != 0) { 620 buildPartial0(result); 621 } 622 onBuilt(); 623 return result; 624 } 625 buildPartial0(com.google.cloud.kms.v1.AsymmetricSignResponse result)626 private void buildPartial0(com.google.cloud.kms.v1.AsymmetricSignResponse result) { 627 int from_bitField0_ = bitField0_; 628 if (((from_bitField0_ & 0x00000001) != 0)) { 629 result.signature_ = signature_; 630 } 631 if (((from_bitField0_ & 0x00000002) != 0)) { 632 result.signatureCrc32C_ = 633 signatureCrc32CBuilder_ == null ? signatureCrc32C_ : signatureCrc32CBuilder_.build(); 634 } 635 if (((from_bitField0_ & 0x00000004) != 0)) { 636 result.verifiedDigestCrc32C_ = verifiedDigestCrc32C_; 637 } 638 if (((from_bitField0_ & 0x00000008) != 0)) { 639 result.name_ = name_; 640 } 641 if (((from_bitField0_ & 0x00000010) != 0)) { 642 result.verifiedDataCrc32C_ = verifiedDataCrc32C_; 643 } 644 if (((from_bitField0_ & 0x00000020) != 0)) { 645 result.protectionLevel_ = protectionLevel_; 646 } 647 } 648 649 @java.lang.Override clone()650 public Builder clone() { 651 return super.clone(); 652 } 653 654 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)655 public Builder setField( 656 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 657 return super.setField(field, value); 658 } 659 660 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)661 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 662 return super.clearField(field); 663 } 664 665 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)666 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 667 return super.clearOneof(oneof); 668 } 669 670 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)671 public Builder setRepeatedField( 672 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 673 return super.setRepeatedField(field, index, value); 674 } 675 676 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)677 public Builder addRepeatedField( 678 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 679 return super.addRepeatedField(field, value); 680 } 681 682 @java.lang.Override mergeFrom(com.google.protobuf.Message other)683 public Builder mergeFrom(com.google.protobuf.Message other) { 684 if (other instanceof com.google.cloud.kms.v1.AsymmetricSignResponse) { 685 return mergeFrom((com.google.cloud.kms.v1.AsymmetricSignResponse) other); 686 } else { 687 super.mergeFrom(other); 688 return this; 689 } 690 } 691 mergeFrom(com.google.cloud.kms.v1.AsymmetricSignResponse other)692 public Builder mergeFrom(com.google.cloud.kms.v1.AsymmetricSignResponse other) { 693 if (other == com.google.cloud.kms.v1.AsymmetricSignResponse.getDefaultInstance()) return this; 694 if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) { 695 setSignature(other.getSignature()); 696 } 697 if (other.hasSignatureCrc32C()) { 698 mergeSignatureCrc32C(other.getSignatureCrc32C()); 699 } 700 if (other.getVerifiedDigestCrc32C() != false) { 701 setVerifiedDigestCrc32C(other.getVerifiedDigestCrc32C()); 702 } 703 if (!other.getName().isEmpty()) { 704 name_ = other.name_; 705 bitField0_ |= 0x00000008; 706 onChanged(); 707 } 708 if (other.getVerifiedDataCrc32C() != false) { 709 setVerifiedDataCrc32C(other.getVerifiedDataCrc32C()); 710 } 711 if (other.protectionLevel_ != 0) { 712 setProtectionLevelValue(other.getProtectionLevelValue()); 713 } 714 this.mergeUnknownFields(other.getUnknownFields()); 715 onChanged(); 716 return this; 717 } 718 719 @java.lang.Override isInitialized()720 public final boolean isInitialized() { 721 return true; 722 } 723 724 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)725 public Builder mergeFrom( 726 com.google.protobuf.CodedInputStream input, 727 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 728 throws java.io.IOException { 729 if (extensionRegistry == null) { 730 throw new java.lang.NullPointerException(); 731 } 732 try { 733 boolean done = false; 734 while (!done) { 735 int tag = input.readTag(); 736 switch (tag) { 737 case 0: 738 done = true; 739 break; 740 case 10: 741 { 742 signature_ = input.readBytes(); 743 bitField0_ |= 0x00000001; 744 break; 745 } // case 10 746 case 18: 747 { 748 input.readMessage(getSignatureCrc32CFieldBuilder().getBuilder(), extensionRegistry); 749 bitField0_ |= 0x00000002; 750 break; 751 } // case 18 752 case 24: 753 { 754 verifiedDigestCrc32C_ = input.readBool(); 755 bitField0_ |= 0x00000004; 756 break; 757 } // case 24 758 case 34: 759 { 760 name_ = input.readStringRequireUtf8(); 761 bitField0_ |= 0x00000008; 762 break; 763 } // case 34 764 case 40: 765 { 766 verifiedDataCrc32C_ = input.readBool(); 767 bitField0_ |= 0x00000010; 768 break; 769 } // case 40 770 case 48: 771 { 772 protectionLevel_ = input.readEnum(); 773 bitField0_ |= 0x00000020; 774 break; 775 } // case 48 776 default: 777 { 778 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 779 done = true; // was an endgroup tag 780 } 781 break; 782 } // default: 783 } // switch (tag) 784 } // while (!done) 785 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 786 throw e.unwrapIOException(); 787 } finally { 788 onChanged(); 789 } // finally 790 return this; 791 } 792 793 private int bitField0_; 794 795 private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; 796 /** 797 * 798 * 799 * <pre> 800 * The created signature. 801 * </pre> 802 * 803 * <code>bytes signature = 1;</code> 804 * 805 * @return The signature. 806 */ 807 @java.lang.Override getSignature()808 public com.google.protobuf.ByteString getSignature() { 809 return signature_; 810 } 811 /** 812 * 813 * 814 * <pre> 815 * The created signature. 816 * </pre> 817 * 818 * <code>bytes signature = 1;</code> 819 * 820 * @param value The signature to set. 821 * @return This builder for chaining. 822 */ setSignature(com.google.protobuf.ByteString value)823 public Builder setSignature(com.google.protobuf.ByteString value) { 824 if (value == null) { 825 throw new NullPointerException(); 826 } 827 signature_ = value; 828 bitField0_ |= 0x00000001; 829 onChanged(); 830 return this; 831 } 832 /** 833 * 834 * 835 * <pre> 836 * The created signature. 837 * </pre> 838 * 839 * <code>bytes signature = 1;</code> 840 * 841 * @return This builder for chaining. 842 */ clearSignature()843 public Builder clearSignature() { 844 bitField0_ = (bitField0_ & ~0x00000001); 845 signature_ = getDefaultInstance().getSignature(); 846 onChanged(); 847 return this; 848 } 849 850 private com.google.protobuf.Int64Value signatureCrc32C_; 851 private com.google.protobuf.SingleFieldBuilderV3< 852 com.google.protobuf.Int64Value, 853 com.google.protobuf.Int64Value.Builder, 854 com.google.protobuf.Int64ValueOrBuilder> 855 signatureCrc32CBuilder_; 856 /** 857 * 858 * 859 * <pre> 860 * Integrity verification field. A CRC32C checksum of the returned 861 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 862 * An integrity check of 863 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 864 * can be performed by computing the CRC32C checksum of 865 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 866 * and comparing your results to this field. Discard the response in case of 867 * non-matching checksum values, and perform a limited number of retries. A 868 * persistent mismatch may indicate an issue in your computation of the CRC32C 869 * checksum. Note: This field is defined as int64 for reasons of compatibility 870 * across different languages. However, it is a non-negative integer, which 871 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 872 * languages that support this type. 873 * </pre> 874 * 875 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 876 * 877 * @return Whether the signatureCrc32c field is set. 878 */ hasSignatureCrc32C()879 public boolean hasSignatureCrc32C() { 880 return ((bitField0_ & 0x00000002) != 0); 881 } 882 /** 883 * 884 * 885 * <pre> 886 * Integrity verification field. A CRC32C checksum of the returned 887 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 888 * An integrity check of 889 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 890 * can be performed by computing the CRC32C checksum of 891 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 892 * and comparing your results to this field. Discard the response in case of 893 * non-matching checksum values, and perform a limited number of retries. A 894 * persistent mismatch may indicate an issue in your computation of the CRC32C 895 * checksum. Note: This field is defined as int64 for reasons of compatibility 896 * across different languages. However, it is a non-negative integer, which 897 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 898 * languages that support this type. 899 * </pre> 900 * 901 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 902 * 903 * @return The signatureCrc32c. 904 */ getSignatureCrc32C()905 public com.google.protobuf.Int64Value getSignatureCrc32C() { 906 if (signatureCrc32CBuilder_ == null) { 907 return signatureCrc32C_ == null 908 ? com.google.protobuf.Int64Value.getDefaultInstance() 909 : signatureCrc32C_; 910 } else { 911 return signatureCrc32CBuilder_.getMessage(); 912 } 913 } 914 /** 915 * 916 * 917 * <pre> 918 * Integrity verification field. A CRC32C checksum of the returned 919 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 920 * An integrity check of 921 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 922 * can be performed by computing the CRC32C checksum of 923 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 924 * and comparing your results to this field. Discard the response in case of 925 * non-matching checksum values, and perform a limited number of retries. A 926 * persistent mismatch may indicate an issue in your computation of the CRC32C 927 * checksum. Note: This field is defined as int64 for reasons of compatibility 928 * across different languages. However, it is a non-negative integer, which 929 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 930 * languages that support this type. 931 * </pre> 932 * 933 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 934 */ setSignatureCrc32C(com.google.protobuf.Int64Value value)935 public Builder setSignatureCrc32C(com.google.protobuf.Int64Value value) { 936 if (signatureCrc32CBuilder_ == null) { 937 if (value == null) { 938 throw new NullPointerException(); 939 } 940 signatureCrc32C_ = value; 941 } else { 942 signatureCrc32CBuilder_.setMessage(value); 943 } 944 bitField0_ |= 0x00000002; 945 onChanged(); 946 return this; 947 } 948 /** 949 * 950 * 951 * <pre> 952 * Integrity verification field. A CRC32C checksum of the returned 953 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 954 * An integrity check of 955 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 956 * can be performed by computing the CRC32C checksum of 957 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 958 * and comparing your results to this field. Discard the response in case of 959 * non-matching checksum values, and perform a limited number of retries. A 960 * persistent mismatch may indicate an issue in your computation of the CRC32C 961 * checksum. Note: This field is defined as int64 for reasons of compatibility 962 * across different languages. However, it is a non-negative integer, which 963 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 964 * languages that support this type. 965 * </pre> 966 * 967 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 968 */ setSignatureCrc32C(com.google.protobuf.Int64Value.Builder builderForValue)969 public Builder setSignatureCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) { 970 if (signatureCrc32CBuilder_ == null) { 971 signatureCrc32C_ = builderForValue.build(); 972 } else { 973 signatureCrc32CBuilder_.setMessage(builderForValue.build()); 974 } 975 bitField0_ |= 0x00000002; 976 onChanged(); 977 return this; 978 } 979 /** 980 * 981 * 982 * <pre> 983 * Integrity verification field. A CRC32C checksum of the returned 984 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 985 * An integrity check of 986 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 987 * can be performed by computing the CRC32C checksum of 988 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 989 * and comparing your results to this field. Discard the response in case of 990 * non-matching checksum values, and perform a limited number of retries. A 991 * persistent mismatch may indicate an issue in your computation of the CRC32C 992 * checksum. Note: This field is defined as int64 for reasons of compatibility 993 * across different languages. However, it is a non-negative integer, which 994 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 995 * languages that support this type. 996 * </pre> 997 * 998 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 999 */ mergeSignatureCrc32C(com.google.protobuf.Int64Value value)1000 public Builder mergeSignatureCrc32C(com.google.protobuf.Int64Value value) { 1001 if (signatureCrc32CBuilder_ == null) { 1002 if (((bitField0_ & 0x00000002) != 0) 1003 && signatureCrc32C_ != null 1004 && signatureCrc32C_ != com.google.protobuf.Int64Value.getDefaultInstance()) { 1005 getSignatureCrc32CBuilder().mergeFrom(value); 1006 } else { 1007 signatureCrc32C_ = value; 1008 } 1009 } else { 1010 signatureCrc32CBuilder_.mergeFrom(value); 1011 } 1012 bitField0_ |= 0x00000002; 1013 onChanged(); 1014 return this; 1015 } 1016 /** 1017 * 1018 * 1019 * <pre> 1020 * Integrity verification field. A CRC32C checksum of the returned 1021 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 1022 * An integrity check of 1023 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 1024 * can be performed by computing the CRC32C checksum of 1025 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 1026 * and comparing your results to this field. Discard the response in case of 1027 * non-matching checksum values, and perform a limited number of retries. A 1028 * persistent mismatch may indicate an issue in your computation of the CRC32C 1029 * checksum. Note: This field is defined as int64 for reasons of compatibility 1030 * across different languages. However, it is a non-negative integer, which 1031 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 1032 * languages that support this type. 1033 * </pre> 1034 * 1035 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 1036 */ clearSignatureCrc32C()1037 public Builder clearSignatureCrc32C() { 1038 bitField0_ = (bitField0_ & ~0x00000002); 1039 signatureCrc32C_ = null; 1040 if (signatureCrc32CBuilder_ != null) { 1041 signatureCrc32CBuilder_.dispose(); 1042 signatureCrc32CBuilder_ = null; 1043 } 1044 onChanged(); 1045 return this; 1046 } 1047 /** 1048 * 1049 * 1050 * <pre> 1051 * Integrity verification field. A CRC32C checksum of the returned 1052 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 1053 * An integrity check of 1054 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 1055 * can be performed by computing the CRC32C checksum of 1056 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 1057 * and comparing your results to this field. Discard the response in case of 1058 * non-matching checksum values, and perform a limited number of retries. A 1059 * persistent mismatch may indicate an issue in your computation of the CRC32C 1060 * checksum. Note: This field is defined as int64 for reasons of compatibility 1061 * across different languages. However, it is a non-negative integer, which 1062 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 1063 * languages that support this type. 1064 * </pre> 1065 * 1066 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 1067 */ getSignatureCrc32CBuilder()1068 public com.google.protobuf.Int64Value.Builder getSignatureCrc32CBuilder() { 1069 bitField0_ |= 0x00000002; 1070 onChanged(); 1071 return getSignatureCrc32CFieldBuilder().getBuilder(); 1072 } 1073 /** 1074 * 1075 * 1076 * <pre> 1077 * Integrity verification field. A CRC32C checksum of the returned 1078 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 1079 * An integrity check of 1080 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 1081 * can be performed by computing the CRC32C checksum of 1082 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 1083 * and comparing your results to this field. Discard the response in case of 1084 * non-matching checksum values, and perform a limited number of retries. A 1085 * persistent mismatch may indicate an issue in your computation of the CRC32C 1086 * checksum. Note: This field is defined as int64 for reasons of compatibility 1087 * across different languages. However, it is a non-negative integer, which 1088 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 1089 * languages that support this type. 1090 * </pre> 1091 * 1092 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 1093 */ getSignatureCrc32COrBuilder()1094 public com.google.protobuf.Int64ValueOrBuilder getSignatureCrc32COrBuilder() { 1095 if (signatureCrc32CBuilder_ != null) { 1096 return signatureCrc32CBuilder_.getMessageOrBuilder(); 1097 } else { 1098 return signatureCrc32C_ == null 1099 ? com.google.protobuf.Int64Value.getDefaultInstance() 1100 : signatureCrc32C_; 1101 } 1102 } 1103 /** 1104 * 1105 * 1106 * <pre> 1107 * Integrity verification field. A CRC32C checksum of the returned 1108 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. 1109 * An integrity check of 1110 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 1111 * can be performed by computing the CRC32C checksum of 1112 * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] 1113 * and comparing your results to this field. Discard the response in case of 1114 * non-matching checksum values, and perform a limited number of retries. A 1115 * persistent mismatch may indicate an issue in your computation of the CRC32C 1116 * checksum. Note: This field is defined as int64 for reasons of compatibility 1117 * across different languages. However, it is a non-negative integer, which 1118 * will never exceed 2^32-1, and can be safely downconverted to uint32 in 1119 * languages that support this type. 1120 * </pre> 1121 * 1122 * <code>.google.protobuf.Int64Value signature_crc32c = 2;</code> 1123 */ 1124 private com.google.protobuf.SingleFieldBuilderV3< 1125 com.google.protobuf.Int64Value, 1126 com.google.protobuf.Int64Value.Builder, 1127 com.google.protobuf.Int64ValueOrBuilder> getSignatureCrc32CFieldBuilder()1128 getSignatureCrc32CFieldBuilder() { 1129 if (signatureCrc32CBuilder_ == null) { 1130 signatureCrc32CBuilder_ = 1131 new com.google.protobuf.SingleFieldBuilderV3< 1132 com.google.protobuf.Int64Value, 1133 com.google.protobuf.Int64Value.Builder, 1134 com.google.protobuf.Int64ValueOrBuilder>( 1135 getSignatureCrc32C(), getParentForChildren(), isClean()); 1136 signatureCrc32C_ = null; 1137 } 1138 return signatureCrc32CBuilder_; 1139 } 1140 1141 private boolean verifiedDigestCrc32C_; 1142 /** 1143 * 1144 * 1145 * <pre> 1146 * Integrity verification field. A flag indicating whether 1147 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 1148 * was received by 1149 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used 1150 * for the integrity verification of the 1151 * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value 1152 * of this field indicates either that 1153 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 1154 * was left unset or that it was not delivered to 1155 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've 1156 * set 1157 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 1158 * but this field is still false, discard the response and perform a limited 1159 * number of retries. 1160 * </pre> 1161 * 1162 * <code>bool verified_digest_crc32c = 3;</code> 1163 * 1164 * @return The verifiedDigestCrc32c. 1165 */ 1166 @java.lang.Override getVerifiedDigestCrc32C()1167 public boolean getVerifiedDigestCrc32C() { 1168 return verifiedDigestCrc32C_; 1169 } 1170 /** 1171 * 1172 * 1173 * <pre> 1174 * Integrity verification field. A flag indicating whether 1175 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 1176 * was received by 1177 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used 1178 * for the integrity verification of the 1179 * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value 1180 * of this field indicates either that 1181 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 1182 * was left unset or that it was not delivered to 1183 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've 1184 * set 1185 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 1186 * but this field is still false, discard the response and perform a limited 1187 * number of retries. 1188 * </pre> 1189 * 1190 * <code>bool verified_digest_crc32c = 3;</code> 1191 * 1192 * @param value The verifiedDigestCrc32c to set. 1193 * @return This builder for chaining. 1194 */ setVerifiedDigestCrc32C(boolean value)1195 public Builder setVerifiedDigestCrc32C(boolean value) { 1196 1197 verifiedDigestCrc32C_ = value; 1198 bitField0_ |= 0x00000004; 1199 onChanged(); 1200 return this; 1201 } 1202 /** 1203 * 1204 * 1205 * <pre> 1206 * Integrity verification field. A flag indicating whether 1207 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 1208 * was received by 1209 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used 1210 * for the integrity verification of the 1211 * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value 1212 * of this field indicates either that 1213 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 1214 * was left unset or that it was not delivered to 1215 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've 1216 * set 1217 * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] 1218 * but this field is still false, discard the response and perform a limited 1219 * number of retries. 1220 * </pre> 1221 * 1222 * <code>bool verified_digest_crc32c = 3;</code> 1223 * 1224 * @return This builder for chaining. 1225 */ clearVerifiedDigestCrc32C()1226 public Builder clearVerifiedDigestCrc32C() { 1227 bitField0_ = (bitField0_ & ~0x00000004); 1228 verifiedDigestCrc32C_ = false; 1229 onChanged(); 1230 return this; 1231 } 1232 1233 private java.lang.Object name_ = ""; 1234 /** 1235 * 1236 * 1237 * <pre> 1238 * The resource name of the 1239 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 1240 * Check this field to verify that the intended resource was used for signing. 1241 * </pre> 1242 * 1243 * <code>string name = 4;</code> 1244 * 1245 * @return The name. 1246 */ getName()1247 public java.lang.String getName() { 1248 java.lang.Object ref = name_; 1249 if (!(ref instanceof java.lang.String)) { 1250 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1251 java.lang.String s = bs.toStringUtf8(); 1252 name_ = s; 1253 return s; 1254 } else { 1255 return (java.lang.String) ref; 1256 } 1257 } 1258 /** 1259 * 1260 * 1261 * <pre> 1262 * The resource name of the 1263 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 1264 * Check this field to verify that the intended resource was used for signing. 1265 * </pre> 1266 * 1267 * <code>string name = 4;</code> 1268 * 1269 * @return The bytes for name. 1270 */ getNameBytes()1271 public com.google.protobuf.ByteString getNameBytes() { 1272 java.lang.Object ref = name_; 1273 if (ref instanceof String) { 1274 com.google.protobuf.ByteString b = 1275 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1276 name_ = b; 1277 return b; 1278 } else { 1279 return (com.google.protobuf.ByteString) ref; 1280 } 1281 } 1282 /** 1283 * 1284 * 1285 * <pre> 1286 * The resource name of the 1287 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 1288 * Check this field to verify that the intended resource was used for signing. 1289 * </pre> 1290 * 1291 * <code>string name = 4;</code> 1292 * 1293 * @param value The name to set. 1294 * @return This builder for chaining. 1295 */ setName(java.lang.String value)1296 public Builder setName(java.lang.String value) { 1297 if (value == null) { 1298 throw new NullPointerException(); 1299 } 1300 name_ = value; 1301 bitField0_ |= 0x00000008; 1302 onChanged(); 1303 return this; 1304 } 1305 /** 1306 * 1307 * 1308 * <pre> 1309 * The resource name of the 1310 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 1311 * Check this field to verify that the intended resource was used for signing. 1312 * </pre> 1313 * 1314 * <code>string name = 4;</code> 1315 * 1316 * @return This builder for chaining. 1317 */ clearName()1318 public Builder clearName() { 1319 name_ = getDefaultInstance().getName(); 1320 bitField0_ = (bitField0_ & ~0x00000008); 1321 onChanged(); 1322 return this; 1323 } 1324 /** 1325 * 1326 * 1327 * <pre> 1328 * The resource name of the 1329 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 1330 * Check this field to verify that the intended resource was used for signing. 1331 * </pre> 1332 * 1333 * <code>string name = 4;</code> 1334 * 1335 * @param value The bytes for name to set. 1336 * @return This builder for chaining. 1337 */ setNameBytes(com.google.protobuf.ByteString value)1338 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1339 if (value == null) { 1340 throw new NullPointerException(); 1341 } 1342 checkByteStringIsUtf8(value); 1343 name_ = value; 1344 bitField0_ |= 0x00000008; 1345 onChanged(); 1346 return this; 1347 } 1348 1349 private boolean verifiedDataCrc32C_; 1350 /** 1351 * 1352 * 1353 * <pre> 1354 * Integrity verification field. A flag indicating whether 1355 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 1356 * was received by 1357 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used 1358 * for the integrity verification of the 1359 * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of 1360 * this field indicates either that 1361 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 1362 * was left unset or that it was not delivered to 1363 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've 1364 * set 1365 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 1366 * but this field is still false, discard the response and perform a limited 1367 * number of retries. 1368 * </pre> 1369 * 1370 * <code>bool verified_data_crc32c = 5;</code> 1371 * 1372 * @return The verifiedDataCrc32c. 1373 */ 1374 @java.lang.Override getVerifiedDataCrc32C()1375 public boolean getVerifiedDataCrc32C() { 1376 return verifiedDataCrc32C_; 1377 } 1378 /** 1379 * 1380 * 1381 * <pre> 1382 * Integrity verification field. A flag indicating whether 1383 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 1384 * was received by 1385 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used 1386 * for the integrity verification of the 1387 * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of 1388 * this field indicates either that 1389 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 1390 * was left unset or that it was not delivered to 1391 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've 1392 * set 1393 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 1394 * but this field is still false, discard the response and perform a limited 1395 * number of retries. 1396 * </pre> 1397 * 1398 * <code>bool verified_data_crc32c = 5;</code> 1399 * 1400 * @param value The verifiedDataCrc32c to set. 1401 * @return This builder for chaining. 1402 */ setVerifiedDataCrc32C(boolean value)1403 public Builder setVerifiedDataCrc32C(boolean value) { 1404 1405 verifiedDataCrc32C_ = value; 1406 bitField0_ |= 0x00000010; 1407 onChanged(); 1408 return this; 1409 } 1410 /** 1411 * 1412 * 1413 * <pre> 1414 * Integrity verification field. A flag indicating whether 1415 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 1416 * was received by 1417 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used 1418 * for the integrity verification of the 1419 * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of 1420 * this field indicates either that 1421 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 1422 * was left unset or that it was not delivered to 1423 * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've 1424 * set 1425 * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] 1426 * but this field is still false, discard the response and perform a limited 1427 * number of retries. 1428 * </pre> 1429 * 1430 * <code>bool verified_data_crc32c = 5;</code> 1431 * 1432 * @return This builder for chaining. 1433 */ clearVerifiedDataCrc32C()1434 public Builder clearVerifiedDataCrc32C() { 1435 bitField0_ = (bitField0_ & ~0x00000010); 1436 verifiedDataCrc32C_ = false; 1437 onChanged(); 1438 return this; 1439 } 1440 1441 private int protectionLevel_ = 0; 1442 /** 1443 * 1444 * 1445 * <pre> 1446 * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the 1447 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 1448 * </pre> 1449 * 1450 * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 6;</code> 1451 * 1452 * @return The enum numeric value on the wire for protectionLevel. 1453 */ 1454 @java.lang.Override getProtectionLevelValue()1455 public int getProtectionLevelValue() { 1456 return protectionLevel_; 1457 } 1458 /** 1459 * 1460 * 1461 * <pre> 1462 * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the 1463 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 1464 * </pre> 1465 * 1466 * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 6;</code> 1467 * 1468 * @param value The enum numeric value on the wire for protectionLevel to set. 1469 * @return This builder for chaining. 1470 */ setProtectionLevelValue(int value)1471 public Builder setProtectionLevelValue(int value) { 1472 protectionLevel_ = value; 1473 bitField0_ |= 0x00000020; 1474 onChanged(); 1475 return this; 1476 } 1477 /** 1478 * 1479 * 1480 * <pre> 1481 * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the 1482 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 1483 * </pre> 1484 * 1485 * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 6;</code> 1486 * 1487 * @return The protectionLevel. 1488 */ 1489 @java.lang.Override getProtectionLevel()1490 public com.google.cloud.kms.v1.ProtectionLevel getProtectionLevel() { 1491 com.google.cloud.kms.v1.ProtectionLevel result = 1492 com.google.cloud.kms.v1.ProtectionLevel.forNumber(protectionLevel_); 1493 return result == null ? com.google.cloud.kms.v1.ProtectionLevel.UNRECOGNIZED : result; 1494 } 1495 /** 1496 * 1497 * 1498 * <pre> 1499 * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the 1500 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 1501 * </pre> 1502 * 1503 * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 6;</code> 1504 * 1505 * @param value The protectionLevel to set. 1506 * @return This builder for chaining. 1507 */ setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value)1508 public Builder setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value) { 1509 if (value == null) { 1510 throw new NullPointerException(); 1511 } 1512 bitField0_ |= 0x00000020; 1513 protectionLevel_ = value.getNumber(); 1514 onChanged(); 1515 return this; 1516 } 1517 /** 1518 * 1519 * 1520 * <pre> 1521 * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the 1522 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. 1523 * </pre> 1524 * 1525 * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 6;</code> 1526 * 1527 * @return This builder for chaining. 1528 */ clearProtectionLevel()1529 public Builder clearProtectionLevel() { 1530 bitField0_ = (bitField0_ & ~0x00000020); 1531 protectionLevel_ = 0; 1532 onChanged(); 1533 return this; 1534 } 1535 1536 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1537 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1538 return super.setUnknownFields(unknownFields); 1539 } 1540 1541 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1542 public final Builder mergeUnknownFields( 1543 final com.google.protobuf.UnknownFieldSet unknownFields) { 1544 return super.mergeUnknownFields(unknownFields); 1545 } 1546 1547 // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.AsymmetricSignResponse) 1548 } 1549 1550 // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.AsymmetricSignResponse) 1551 private static final com.google.cloud.kms.v1.AsymmetricSignResponse DEFAULT_INSTANCE; 1552 1553 static { 1554 DEFAULT_INSTANCE = new com.google.cloud.kms.v1.AsymmetricSignResponse(); 1555 } 1556 getDefaultInstance()1557 public static com.google.cloud.kms.v1.AsymmetricSignResponse getDefaultInstance() { 1558 return DEFAULT_INSTANCE; 1559 } 1560 1561 private static final com.google.protobuf.Parser<AsymmetricSignResponse> PARSER = 1562 new com.google.protobuf.AbstractParser<AsymmetricSignResponse>() { 1563 @java.lang.Override 1564 public AsymmetricSignResponse parsePartialFrom( 1565 com.google.protobuf.CodedInputStream input, 1566 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1567 throws com.google.protobuf.InvalidProtocolBufferException { 1568 Builder builder = newBuilder(); 1569 try { 1570 builder.mergeFrom(input, extensionRegistry); 1571 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1572 throw e.setUnfinishedMessage(builder.buildPartial()); 1573 } catch (com.google.protobuf.UninitializedMessageException e) { 1574 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1575 } catch (java.io.IOException e) { 1576 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1577 .setUnfinishedMessage(builder.buildPartial()); 1578 } 1579 return builder.buildPartial(); 1580 } 1581 }; 1582 parser()1583 public static com.google.protobuf.Parser<AsymmetricSignResponse> parser() { 1584 return PARSER; 1585 } 1586 1587 @java.lang.Override getParserForType()1588 public com.google.protobuf.Parser<AsymmetricSignResponse> getParserForType() { 1589 return PARSER; 1590 } 1591 1592 @java.lang.Override getDefaultInstanceForType()1593 public com.google.cloud.kms.v1.AsymmetricSignResponse getDefaultInstanceForType() { 1594 return DEFAULT_INSTANCE; 1595 } 1596 } 1597