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