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.CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey]. 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.kms.v1.CreateCryptoKeyRequest} 30 */ 31 public final class CreateCryptoKeyRequest extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.CreateCryptoKeyRequest) 34 CreateCryptoKeyRequestOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use CreateCryptoKeyRequest.newBuilder() to construct. CreateCryptoKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private CreateCryptoKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 CreateCryptoKeyRequest()41 private CreateCryptoKeyRequest() { 42 parent_ = ""; 43 cryptoKeyId_ = ""; 44 } 45 46 @java.lang.Override 47 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)48 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 49 return new CreateCryptoKeyRequest(); 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_CreateCryptoKeyRequest_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_CreateCryptoKeyRequest_fieldAccessorTable 67 .ensureFieldAccessorsInitialized( 68 com.google.cloud.kms.v1.CreateCryptoKeyRequest.class, 69 com.google.cloud.kms.v1.CreateCryptoKeyRequest.Builder.class); 70 } 71 72 public static final int PARENT_FIELD_NUMBER = 1; 73 74 @SuppressWarnings("serial") 75 private volatile java.lang.Object parent_ = ""; 76 /** 77 * 78 * 79 * <pre> 80 * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing 81 * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. 82 * </pre> 83 * 84 * <code> 85 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 86 * </code> 87 * 88 * @return The parent. 89 */ 90 @java.lang.Override getParent()91 public java.lang.String getParent() { 92 java.lang.Object ref = parent_; 93 if (ref instanceof java.lang.String) { 94 return (java.lang.String) ref; 95 } else { 96 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 97 java.lang.String s = bs.toStringUtf8(); 98 parent_ = s; 99 return s; 100 } 101 } 102 /** 103 * 104 * 105 * <pre> 106 * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing 107 * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. 108 * </pre> 109 * 110 * <code> 111 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 112 * </code> 113 * 114 * @return The bytes for parent. 115 */ 116 @java.lang.Override getParentBytes()117 public com.google.protobuf.ByteString getParentBytes() { 118 java.lang.Object ref = parent_; 119 if (ref instanceof java.lang.String) { 120 com.google.protobuf.ByteString b = 121 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 122 parent_ = b; 123 return b; 124 } else { 125 return (com.google.protobuf.ByteString) ref; 126 } 127 } 128 129 public static final int CRYPTO_KEY_ID_FIELD_NUMBER = 2; 130 131 @SuppressWarnings("serial") 132 private volatile java.lang.Object cryptoKeyId_ = ""; 133 /** 134 * 135 * 136 * <pre> 137 * Required. It must be unique within a KeyRing and match the regular 138 * expression `[a-zA-Z0-9_-]{1,63}` 139 * </pre> 140 * 141 * <code>string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED];</code> 142 * 143 * @return The cryptoKeyId. 144 */ 145 @java.lang.Override getCryptoKeyId()146 public java.lang.String getCryptoKeyId() { 147 java.lang.Object ref = cryptoKeyId_; 148 if (ref instanceof java.lang.String) { 149 return (java.lang.String) ref; 150 } else { 151 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 152 java.lang.String s = bs.toStringUtf8(); 153 cryptoKeyId_ = s; 154 return s; 155 } 156 } 157 /** 158 * 159 * 160 * <pre> 161 * Required. It must be unique within a KeyRing and match the regular 162 * expression `[a-zA-Z0-9_-]{1,63}` 163 * </pre> 164 * 165 * <code>string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED];</code> 166 * 167 * @return The bytes for cryptoKeyId. 168 */ 169 @java.lang.Override getCryptoKeyIdBytes()170 public com.google.protobuf.ByteString getCryptoKeyIdBytes() { 171 java.lang.Object ref = cryptoKeyId_; 172 if (ref instanceof java.lang.String) { 173 com.google.protobuf.ByteString b = 174 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 175 cryptoKeyId_ = b; 176 return b; 177 } else { 178 return (com.google.protobuf.ByteString) ref; 179 } 180 } 181 182 public static final int CRYPTO_KEY_FIELD_NUMBER = 3; 183 private com.google.cloud.kms.v1.CryptoKey cryptoKey_; 184 /** 185 * 186 * 187 * <pre> 188 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 189 * values. 190 * </pre> 191 * 192 * <code>.google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 193 * </code> 194 * 195 * @return Whether the cryptoKey field is set. 196 */ 197 @java.lang.Override hasCryptoKey()198 public boolean hasCryptoKey() { 199 return cryptoKey_ != null; 200 } 201 /** 202 * 203 * 204 * <pre> 205 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 206 * values. 207 * </pre> 208 * 209 * <code>.google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 210 * </code> 211 * 212 * @return The cryptoKey. 213 */ 214 @java.lang.Override getCryptoKey()215 public com.google.cloud.kms.v1.CryptoKey getCryptoKey() { 216 return cryptoKey_ == null ? com.google.cloud.kms.v1.CryptoKey.getDefaultInstance() : cryptoKey_; 217 } 218 /** 219 * 220 * 221 * <pre> 222 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 223 * values. 224 * </pre> 225 * 226 * <code>.google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 227 * </code> 228 */ 229 @java.lang.Override getCryptoKeyOrBuilder()230 public com.google.cloud.kms.v1.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { 231 return cryptoKey_ == null ? com.google.cloud.kms.v1.CryptoKey.getDefaultInstance() : cryptoKey_; 232 } 233 234 public static final int SKIP_INITIAL_VERSION_CREATION_FIELD_NUMBER = 5; 235 private boolean skipInitialVersionCreation_ = false; 236 /** 237 * 238 * 239 * <pre> 240 * If set to true, the request will create a 241 * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any 242 * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must 243 * manually call 244 * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] 245 * or 246 * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] 247 * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. 248 * </pre> 249 * 250 * <code>bool skip_initial_version_creation = 5;</code> 251 * 252 * @return The skipInitialVersionCreation. 253 */ 254 @java.lang.Override getSkipInitialVersionCreation()255 public boolean getSkipInitialVersionCreation() { 256 return skipInitialVersionCreation_; 257 } 258 259 private byte memoizedIsInitialized = -1; 260 261 @java.lang.Override isInitialized()262 public final boolean isInitialized() { 263 byte isInitialized = memoizedIsInitialized; 264 if (isInitialized == 1) return true; 265 if (isInitialized == 0) return false; 266 267 memoizedIsInitialized = 1; 268 return true; 269 } 270 271 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)272 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 273 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { 274 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); 275 } 276 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cryptoKeyId_)) { 277 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cryptoKeyId_); 278 } 279 if (cryptoKey_ != null) { 280 output.writeMessage(3, getCryptoKey()); 281 } 282 if (skipInitialVersionCreation_ != false) { 283 output.writeBool(5, skipInitialVersionCreation_); 284 } 285 getUnknownFields().writeTo(output); 286 } 287 288 @java.lang.Override getSerializedSize()289 public int getSerializedSize() { 290 int size = memoizedSize; 291 if (size != -1) return size; 292 293 size = 0; 294 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { 295 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); 296 } 297 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cryptoKeyId_)) { 298 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cryptoKeyId_); 299 } 300 if (cryptoKey_ != null) { 301 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCryptoKey()); 302 } 303 if (skipInitialVersionCreation_ != false) { 304 size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, skipInitialVersionCreation_); 305 } 306 size += getUnknownFields().getSerializedSize(); 307 memoizedSize = size; 308 return size; 309 } 310 311 @java.lang.Override equals(final java.lang.Object obj)312 public boolean equals(final java.lang.Object obj) { 313 if (obj == this) { 314 return true; 315 } 316 if (!(obj instanceof com.google.cloud.kms.v1.CreateCryptoKeyRequest)) { 317 return super.equals(obj); 318 } 319 com.google.cloud.kms.v1.CreateCryptoKeyRequest other = 320 (com.google.cloud.kms.v1.CreateCryptoKeyRequest) obj; 321 322 if (!getParent().equals(other.getParent())) return false; 323 if (!getCryptoKeyId().equals(other.getCryptoKeyId())) return false; 324 if (hasCryptoKey() != other.hasCryptoKey()) return false; 325 if (hasCryptoKey()) { 326 if (!getCryptoKey().equals(other.getCryptoKey())) return false; 327 } 328 if (getSkipInitialVersionCreation() != other.getSkipInitialVersionCreation()) return false; 329 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 330 return true; 331 } 332 333 @java.lang.Override hashCode()334 public int hashCode() { 335 if (memoizedHashCode != 0) { 336 return memoizedHashCode; 337 } 338 int hash = 41; 339 hash = (19 * hash) + getDescriptor().hashCode(); 340 hash = (37 * hash) + PARENT_FIELD_NUMBER; 341 hash = (53 * hash) + getParent().hashCode(); 342 hash = (37 * hash) + CRYPTO_KEY_ID_FIELD_NUMBER; 343 hash = (53 * hash) + getCryptoKeyId().hashCode(); 344 if (hasCryptoKey()) { 345 hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; 346 hash = (53 * hash) + getCryptoKey().hashCode(); 347 } 348 hash = (37 * hash) + SKIP_INITIAL_VERSION_CREATION_FIELD_NUMBER; 349 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipInitialVersionCreation()); 350 hash = (29 * hash) + getUnknownFields().hashCode(); 351 memoizedHashCode = hash; 352 return hash; 353 } 354 parseFrom(java.nio.ByteBuffer data)355 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseFrom(java.nio.ByteBuffer data) 356 throws com.google.protobuf.InvalidProtocolBufferException { 357 return PARSER.parseFrom(data); 358 } 359 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)360 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseFrom( 361 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 362 throws com.google.protobuf.InvalidProtocolBufferException { 363 return PARSER.parseFrom(data, extensionRegistry); 364 } 365 parseFrom( com.google.protobuf.ByteString data)366 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseFrom( 367 com.google.protobuf.ByteString data) 368 throws com.google.protobuf.InvalidProtocolBufferException { 369 return PARSER.parseFrom(data); 370 } 371 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)372 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseFrom( 373 com.google.protobuf.ByteString data, 374 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 375 throws com.google.protobuf.InvalidProtocolBufferException { 376 return PARSER.parseFrom(data, extensionRegistry); 377 } 378 parseFrom(byte[] data)379 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseFrom(byte[] data) 380 throws com.google.protobuf.InvalidProtocolBufferException { 381 return PARSER.parseFrom(data); 382 } 383 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)384 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseFrom( 385 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 386 throws com.google.protobuf.InvalidProtocolBufferException { 387 return PARSER.parseFrom(data, extensionRegistry); 388 } 389 parseFrom(java.io.InputStream input)390 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseFrom(java.io.InputStream input) 391 throws java.io.IOException { 392 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 393 } 394 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)395 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseFrom( 396 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 397 throws java.io.IOException { 398 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 399 PARSER, input, extensionRegistry); 400 } 401 parseDelimitedFrom( java.io.InputStream input)402 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseDelimitedFrom( 403 java.io.InputStream input) throws java.io.IOException { 404 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 405 } 406 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)407 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseDelimitedFrom( 408 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 409 throws java.io.IOException { 410 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 411 PARSER, input, extensionRegistry); 412 } 413 parseFrom( com.google.protobuf.CodedInputStream input)414 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseFrom( 415 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 416 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 417 } 418 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)419 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest parseFrom( 420 com.google.protobuf.CodedInputStream input, 421 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 422 throws java.io.IOException { 423 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 424 PARSER, input, extensionRegistry); 425 } 426 427 @java.lang.Override newBuilderForType()428 public Builder newBuilderForType() { 429 return newBuilder(); 430 } 431 newBuilder()432 public static Builder newBuilder() { 433 return DEFAULT_INSTANCE.toBuilder(); 434 } 435 newBuilder(com.google.cloud.kms.v1.CreateCryptoKeyRequest prototype)436 public static Builder newBuilder(com.google.cloud.kms.v1.CreateCryptoKeyRequest prototype) { 437 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 438 } 439 440 @java.lang.Override toBuilder()441 public Builder toBuilder() { 442 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 443 } 444 445 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)446 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 447 Builder builder = new Builder(parent); 448 return builder; 449 } 450 /** 451 * 452 * 453 * <pre> 454 * Request message for 455 * [KeyManagementService.CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey]. 456 * </pre> 457 * 458 * Protobuf type {@code google.cloud.kms.v1.CreateCryptoKeyRequest} 459 */ 460 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 461 implements 462 // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.CreateCryptoKeyRequest) 463 com.google.cloud.kms.v1.CreateCryptoKeyRequestOrBuilder { getDescriptor()464 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 465 return com.google.cloud.kms.v1.KmsProto 466 .internal_static_google_cloud_kms_v1_CreateCryptoKeyRequest_descriptor; 467 } 468 469 @java.lang.Override 470 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()471 internalGetFieldAccessorTable() { 472 return com.google.cloud.kms.v1.KmsProto 473 .internal_static_google_cloud_kms_v1_CreateCryptoKeyRequest_fieldAccessorTable 474 .ensureFieldAccessorsInitialized( 475 com.google.cloud.kms.v1.CreateCryptoKeyRequest.class, 476 com.google.cloud.kms.v1.CreateCryptoKeyRequest.Builder.class); 477 } 478 479 // Construct using com.google.cloud.kms.v1.CreateCryptoKeyRequest.newBuilder() Builder()480 private Builder() {} 481 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)482 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 483 super(parent); 484 } 485 486 @java.lang.Override clear()487 public Builder clear() { 488 super.clear(); 489 bitField0_ = 0; 490 parent_ = ""; 491 cryptoKeyId_ = ""; 492 cryptoKey_ = null; 493 if (cryptoKeyBuilder_ != null) { 494 cryptoKeyBuilder_.dispose(); 495 cryptoKeyBuilder_ = null; 496 } 497 skipInitialVersionCreation_ = false; 498 return this; 499 } 500 501 @java.lang.Override getDescriptorForType()502 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 503 return com.google.cloud.kms.v1.KmsProto 504 .internal_static_google_cloud_kms_v1_CreateCryptoKeyRequest_descriptor; 505 } 506 507 @java.lang.Override getDefaultInstanceForType()508 public com.google.cloud.kms.v1.CreateCryptoKeyRequest getDefaultInstanceForType() { 509 return com.google.cloud.kms.v1.CreateCryptoKeyRequest.getDefaultInstance(); 510 } 511 512 @java.lang.Override build()513 public com.google.cloud.kms.v1.CreateCryptoKeyRequest build() { 514 com.google.cloud.kms.v1.CreateCryptoKeyRequest result = buildPartial(); 515 if (!result.isInitialized()) { 516 throw newUninitializedMessageException(result); 517 } 518 return result; 519 } 520 521 @java.lang.Override buildPartial()522 public com.google.cloud.kms.v1.CreateCryptoKeyRequest buildPartial() { 523 com.google.cloud.kms.v1.CreateCryptoKeyRequest result = 524 new com.google.cloud.kms.v1.CreateCryptoKeyRequest(this); 525 if (bitField0_ != 0) { 526 buildPartial0(result); 527 } 528 onBuilt(); 529 return result; 530 } 531 buildPartial0(com.google.cloud.kms.v1.CreateCryptoKeyRequest result)532 private void buildPartial0(com.google.cloud.kms.v1.CreateCryptoKeyRequest result) { 533 int from_bitField0_ = bitField0_; 534 if (((from_bitField0_ & 0x00000001) != 0)) { 535 result.parent_ = parent_; 536 } 537 if (((from_bitField0_ & 0x00000002) != 0)) { 538 result.cryptoKeyId_ = cryptoKeyId_; 539 } 540 if (((from_bitField0_ & 0x00000004) != 0)) { 541 result.cryptoKey_ = cryptoKeyBuilder_ == null ? cryptoKey_ : cryptoKeyBuilder_.build(); 542 } 543 if (((from_bitField0_ & 0x00000008) != 0)) { 544 result.skipInitialVersionCreation_ = skipInitialVersionCreation_; 545 } 546 } 547 548 @java.lang.Override clone()549 public Builder clone() { 550 return super.clone(); 551 } 552 553 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)554 public Builder setField( 555 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 556 return super.setField(field, value); 557 } 558 559 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)560 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 561 return super.clearField(field); 562 } 563 564 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)565 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 566 return super.clearOneof(oneof); 567 } 568 569 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)570 public Builder setRepeatedField( 571 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 572 return super.setRepeatedField(field, index, value); 573 } 574 575 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)576 public Builder addRepeatedField( 577 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 578 return super.addRepeatedField(field, value); 579 } 580 581 @java.lang.Override mergeFrom(com.google.protobuf.Message other)582 public Builder mergeFrom(com.google.protobuf.Message other) { 583 if (other instanceof com.google.cloud.kms.v1.CreateCryptoKeyRequest) { 584 return mergeFrom((com.google.cloud.kms.v1.CreateCryptoKeyRequest) other); 585 } else { 586 super.mergeFrom(other); 587 return this; 588 } 589 } 590 mergeFrom(com.google.cloud.kms.v1.CreateCryptoKeyRequest other)591 public Builder mergeFrom(com.google.cloud.kms.v1.CreateCryptoKeyRequest other) { 592 if (other == com.google.cloud.kms.v1.CreateCryptoKeyRequest.getDefaultInstance()) return this; 593 if (!other.getParent().isEmpty()) { 594 parent_ = other.parent_; 595 bitField0_ |= 0x00000001; 596 onChanged(); 597 } 598 if (!other.getCryptoKeyId().isEmpty()) { 599 cryptoKeyId_ = other.cryptoKeyId_; 600 bitField0_ |= 0x00000002; 601 onChanged(); 602 } 603 if (other.hasCryptoKey()) { 604 mergeCryptoKey(other.getCryptoKey()); 605 } 606 if (other.getSkipInitialVersionCreation() != false) { 607 setSkipInitialVersionCreation(other.getSkipInitialVersionCreation()); 608 } 609 this.mergeUnknownFields(other.getUnknownFields()); 610 onChanged(); 611 return this; 612 } 613 614 @java.lang.Override isInitialized()615 public final boolean isInitialized() { 616 return true; 617 } 618 619 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)620 public Builder mergeFrom( 621 com.google.protobuf.CodedInputStream input, 622 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 623 throws java.io.IOException { 624 if (extensionRegistry == null) { 625 throw new java.lang.NullPointerException(); 626 } 627 try { 628 boolean done = false; 629 while (!done) { 630 int tag = input.readTag(); 631 switch (tag) { 632 case 0: 633 done = true; 634 break; 635 case 10: 636 { 637 parent_ = input.readStringRequireUtf8(); 638 bitField0_ |= 0x00000001; 639 break; 640 } // case 10 641 case 18: 642 { 643 cryptoKeyId_ = input.readStringRequireUtf8(); 644 bitField0_ |= 0x00000002; 645 break; 646 } // case 18 647 case 26: 648 { 649 input.readMessage(getCryptoKeyFieldBuilder().getBuilder(), extensionRegistry); 650 bitField0_ |= 0x00000004; 651 break; 652 } // case 26 653 case 40: 654 { 655 skipInitialVersionCreation_ = input.readBool(); 656 bitField0_ |= 0x00000008; 657 break; 658 } // case 40 659 default: 660 { 661 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 662 done = true; // was an endgroup tag 663 } 664 break; 665 } // default: 666 } // switch (tag) 667 } // while (!done) 668 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 669 throw e.unwrapIOException(); 670 } finally { 671 onChanged(); 672 } // finally 673 return this; 674 } 675 676 private int bitField0_; 677 678 private java.lang.Object parent_ = ""; 679 /** 680 * 681 * 682 * <pre> 683 * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing 684 * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. 685 * </pre> 686 * 687 * <code> 688 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 689 * </code> 690 * 691 * @return The parent. 692 */ getParent()693 public java.lang.String getParent() { 694 java.lang.Object ref = parent_; 695 if (!(ref instanceof java.lang.String)) { 696 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 697 java.lang.String s = bs.toStringUtf8(); 698 parent_ = s; 699 return s; 700 } else { 701 return (java.lang.String) ref; 702 } 703 } 704 /** 705 * 706 * 707 * <pre> 708 * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing 709 * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. 710 * </pre> 711 * 712 * <code> 713 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 714 * </code> 715 * 716 * @return The bytes for parent. 717 */ getParentBytes()718 public com.google.protobuf.ByteString getParentBytes() { 719 java.lang.Object ref = parent_; 720 if (ref instanceof String) { 721 com.google.protobuf.ByteString b = 722 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 723 parent_ = b; 724 return b; 725 } else { 726 return (com.google.protobuf.ByteString) ref; 727 } 728 } 729 /** 730 * 731 * 732 * <pre> 733 * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing 734 * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. 735 * </pre> 736 * 737 * <code> 738 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 739 * </code> 740 * 741 * @param value The parent to set. 742 * @return This builder for chaining. 743 */ setParent(java.lang.String value)744 public Builder setParent(java.lang.String value) { 745 if (value == null) { 746 throw new NullPointerException(); 747 } 748 parent_ = value; 749 bitField0_ |= 0x00000001; 750 onChanged(); 751 return this; 752 } 753 /** 754 * 755 * 756 * <pre> 757 * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing 758 * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. 759 * </pre> 760 * 761 * <code> 762 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 763 * </code> 764 * 765 * @return This builder for chaining. 766 */ clearParent()767 public Builder clearParent() { 768 parent_ = getDefaultInstance().getParent(); 769 bitField0_ = (bitField0_ & ~0x00000001); 770 onChanged(); 771 return this; 772 } 773 /** 774 * 775 * 776 * <pre> 777 * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing 778 * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. 779 * </pre> 780 * 781 * <code> 782 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 783 * </code> 784 * 785 * @param value The bytes for parent to set. 786 * @return This builder for chaining. 787 */ setParentBytes(com.google.protobuf.ByteString value)788 public Builder setParentBytes(com.google.protobuf.ByteString value) { 789 if (value == null) { 790 throw new NullPointerException(); 791 } 792 checkByteStringIsUtf8(value); 793 parent_ = value; 794 bitField0_ |= 0x00000001; 795 onChanged(); 796 return this; 797 } 798 799 private java.lang.Object cryptoKeyId_ = ""; 800 /** 801 * 802 * 803 * <pre> 804 * Required. It must be unique within a KeyRing and match the regular 805 * expression `[a-zA-Z0-9_-]{1,63}` 806 * </pre> 807 * 808 * <code>string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED];</code> 809 * 810 * @return The cryptoKeyId. 811 */ getCryptoKeyId()812 public java.lang.String getCryptoKeyId() { 813 java.lang.Object ref = cryptoKeyId_; 814 if (!(ref instanceof java.lang.String)) { 815 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 816 java.lang.String s = bs.toStringUtf8(); 817 cryptoKeyId_ = s; 818 return s; 819 } else { 820 return (java.lang.String) ref; 821 } 822 } 823 /** 824 * 825 * 826 * <pre> 827 * Required. It must be unique within a KeyRing and match the regular 828 * expression `[a-zA-Z0-9_-]{1,63}` 829 * </pre> 830 * 831 * <code>string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED];</code> 832 * 833 * @return The bytes for cryptoKeyId. 834 */ getCryptoKeyIdBytes()835 public com.google.protobuf.ByteString getCryptoKeyIdBytes() { 836 java.lang.Object ref = cryptoKeyId_; 837 if (ref instanceof String) { 838 com.google.protobuf.ByteString b = 839 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 840 cryptoKeyId_ = b; 841 return b; 842 } else { 843 return (com.google.protobuf.ByteString) ref; 844 } 845 } 846 /** 847 * 848 * 849 * <pre> 850 * Required. It must be unique within a KeyRing and match the regular 851 * expression `[a-zA-Z0-9_-]{1,63}` 852 * </pre> 853 * 854 * <code>string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED];</code> 855 * 856 * @param value The cryptoKeyId to set. 857 * @return This builder for chaining. 858 */ setCryptoKeyId(java.lang.String value)859 public Builder setCryptoKeyId(java.lang.String value) { 860 if (value == null) { 861 throw new NullPointerException(); 862 } 863 cryptoKeyId_ = value; 864 bitField0_ |= 0x00000002; 865 onChanged(); 866 return this; 867 } 868 /** 869 * 870 * 871 * <pre> 872 * Required. It must be unique within a KeyRing and match the regular 873 * expression `[a-zA-Z0-9_-]{1,63}` 874 * </pre> 875 * 876 * <code>string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED];</code> 877 * 878 * @return This builder for chaining. 879 */ clearCryptoKeyId()880 public Builder clearCryptoKeyId() { 881 cryptoKeyId_ = getDefaultInstance().getCryptoKeyId(); 882 bitField0_ = (bitField0_ & ~0x00000002); 883 onChanged(); 884 return this; 885 } 886 /** 887 * 888 * 889 * <pre> 890 * Required. It must be unique within a KeyRing and match the regular 891 * expression `[a-zA-Z0-9_-]{1,63}` 892 * </pre> 893 * 894 * <code>string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED];</code> 895 * 896 * @param value The bytes for cryptoKeyId to set. 897 * @return This builder for chaining. 898 */ setCryptoKeyIdBytes(com.google.protobuf.ByteString value)899 public Builder setCryptoKeyIdBytes(com.google.protobuf.ByteString value) { 900 if (value == null) { 901 throw new NullPointerException(); 902 } 903 checkByteStringIsUtf8(value); 904 cryptoKeyId_ = value; 905 bitField0_ |= 0x00000002; 906 onChanged(); 907 return this; 908 } 909 910 private com.google.cloud.kms.v1.CryptoKey cryptoKey_; 911 private com.google.protobuf.SingleFieldBuilderV3< 912 com.google.cloud.kms.v1.CryptoKey, 913 com.google.cloud.kms.v1.CryptoKey.Builder, 914 com.google.cloud.kms.v1.CryptoKeyOrBuilder> 915 cryptoKeyBuilder_; 916 /** 917 * 918 * 919 * <pre> 920 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 921 * values. 922 * </pre> 923 * 924 * <code> 925 * .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 926 * </code> 927 * 928 * @return Whether the cryptoKey field is set. 929 */ hasCryptoKey()930 public boolean hasCryptoKey() { 931 return ((bitField0_ & 0x00000004) != 0); 932 } 933 /** 934 * 935 * 936 * <pre> 937 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 938 * values. 939 * </pre> 940 * 941 * <code> 942 * .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 943 * </code> 944 * 945 * @return The cryptoKey. 946 */ getCryptoKey()947 public com.google.cloud.kms.v1.CryptoKey getCryptoKey() { 948 if (cryptoKeyBuilder_ == null) { 949 return cryptoKey_ == null 950 ? com.google.cloud.kms.v1.CryptoKey.getDefaultInstance() 951 : cryptoKey_; 952 } else { 953 return cryptoKeyBuilder_.getMessage(); 954 } 955 } 956 /** 957 * 958 * 959 * <pre> 960 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 961 * values. 962 * </pre> 963 * 964 * <code> 965 * .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 966 * </code> 967 */ setCryptoKey(com.google.cloud.kms.v1.CryptoKey value)968 public Builder setCryptoKey(com.google.cloud.kms.v1.CryptoKey value) { 969 if (cryptoKeyBuilder_ == null) { 970 if (value == null) { 971 throw new NullPointerException(); 972 } 973 cryptoKey_ = value; 974 } else { 975 cryptoKeyBuilder_.setMessage(value); 976 } 977 bitField0_ |= 0x00000004; 978 onChanged(); 979 return this; 980 } 981 /** 982 * 983 * 984 * <pre> 985 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 986 * values. 987 * </pre> 988 * 989 * <code> 990 * .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 991 * </code> 992 */ setCryptoKey(com.google.cloud.kms.v1.CryptoKey.Builder builderForValue)993 public Builder setCryptoKey(com.google.cloud.kms.v1.CryptoKey.Builder builderForValue) { 994 if (cryptoKeyBuilder_ == null) { 995 cryptoKey_ = builderForValue.build(); 996 } else { 997 cryptoKeyBuilder_.setMessage(builderForValue.build()); 998 } 999 bitField0_ |= 0x00000004; 1000 onChanged(); 1001 return this; 1002 } 1003 /** 1004 * 1005 * 1006 * <pre> 1007 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 1008 * values. 1009 * </pre> 1010 * 1011 * <code> 1012 * .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 1013 * </code> 1014 */ mergeCryptoKey(com.google.cloud.kms.v1.CryptoKey value)1015 public Builder mergeCryptoKey(com.google.cloud.kms.v1.CryptoKey value) { 1016 if (cryptoKeyBuilder_ == null) { 1017 if (((bitField0_ & 0x00000004) != 0) 1018 && cryptoKey_ != null 1019 && cryptoKey_ != com.google.cloud.kms.v1.CryptoKey.getDefaultInstance()) { 1020 getCryptoKeyBuilder().mergeFrom(value); 1021 } else { 1022 cryptoKey_ = value; 1023 } 1024 } else { 1025 cryptoKeyBuilder_.mergeFrom(value); 1026 } 1027 bitField0_ |= 0x00000004; 1028 onChanged(); 1029 return this; 1030 } 1031 /** 1032 * 1033 * 1034 * <pre> 1035 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 1036 * values. 1037 * </pre> 1038 * 1039 * <code> 1040 * .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 1041 * </code> 1042 */ clearCryptoKey()1043 public Builder clearCryptoKey() { 1044 bitField0_ = (bitField0_ & ~0x00000004); 1045 cryptoKey_ = null; 1046 if (cryptoKeyBuilder_ != null) { 1047 cryptoKeyBuilder_.dispose(); 1048 cryptoKeyBuilder_ = null; 1049 } 1050 onChanged(); 1051 return this; 1052 } 1053 /** 1054 * 1055 * 1056 * <pre> 1057 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 1058 * values. 1059 * </pre> 1060 * 1061 * <code> 1062 * .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 1063 * </code> 1064 */ getCryptoKeyBuilder()1065 public com.google.cloud.kms.v1.CryptoKey.Builder getCryptoKeyBuilder() { 1066 bitField0_ |= 0x00000004; 1067 onChanged(); 1068 return getCryptoKeyFieldBuilder().getBuilder(); 1069 } 1070 /** 1071 * 1072 * 1073 * <pre> 1074 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 1075 * values. 1076 * </pre> 1077 * 1078 * <code> 1079 * .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 1080 * </code> 1081 */ getCryptoKeyOrBuilder()1082 public com.google.cloud.kms.v1.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { 1083 if (cryptoKeyBuilder_ != null) { 1084 return cryptoKeyBuilder_.getMessageOrBuilder(); 1085 } else { 1086 return cryptoKey_ == null 1087 ? com.google.cloud.kms.v1.CryptoKey.getDefaultInstance() 1088 : cryptoKey_; 1089 } 1090 } 1091 /** 1092 * 1093 * 1094 * <pre> 1095 * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field 1096 * values. 1097 * </pre> 1098 * 1099 * <code> 1100 * .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; 1101 * </code> 1102 */ 1103 private com.google.protobuf.SingleFieldBuilderV3< 1104 com.google.cloud.kms.v1.CryptoKey, 1105 com.google.cloud.kms.v1.CryptoKey.Builder, 1106 com.google.cloud.kms.v1.CryptoKeyOrBuilder> getCryptoKeyFieldBuilder()1107 getCryptoKeyFieldBuilder() { 1108 if (cryptoKeyBuilder_ == null) { 1109 cryptoKeyBuilder_ = 1110 new com.google.protobuf.SingleFieldBuilderV3< 1111 com.google.cloud.kms.v1.CryptoKey, 1112 com.google.cloud.kms.v1.CryptoKey.Builder, 1113 com.google.cloud.kms.v1.CryptoKeyOrBuilder>( 1114 getCryptoKey(), getParentForChildren(), isClean()); 1115 cryptoKey_ = null; 1116 } 1117 return cryptoKeyBuilder_; 1118 } 1119 1120 private boolean skipInitialVersionCreation_; 1121 /** 1122 * 1123 * 1124 * <pre> 1125 * If set to true, the request will create a 1126 * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any 1127 * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must 1128 * manually call 1129 * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] 1130 * or 1131 * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] 1132 * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. 1133 * </pre> 1134 * 1135 * <code>bool skip_initial_version_creation = 5;</code> 1136 * 1137 * @return The skipInitialVersionCreation. 1138 */ 1139 @java.lang.Override getSkipInitialVersionCreation()1140 public boolean getSkipInitialVersionCreation() { 1141 return skipInitialVersionCreation_; 1142 } 1143 /** 1144 * 1145 * 1146 * <pre> 1147 * If set to true, the request will create a 1148 * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any 1149 * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must 1150 * manually call 1151 * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] 1152 * or 1153 * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] 1154 * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. 1155 * </pre> 1156 * 1157 * <code>bool skip_initial_version_creation = 5;</code> 1158 * 1159 * @param value The skipInitialVersionCreation to set. 1160 * @return This builder for chaining. 1161 */ setSkipInitialVersionCreation(boolean value)1162 public Builder setSkipInitialVersionCreation(boolean value) { 1163 1164 skipInitialVersionCreation_ = value; 1165 bitField0_ |= 0x00000008; 1166 onChanged(); 1167 return this; 1168 } 1169 /** 1170 * 1171 * 1172 * <pre> 1173 * If set to true, the request will create a 1174 * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any 1175 * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must 1176 * manually call 1177 * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] 1178 * or 1179 * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] 1180 * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. 1181 * </pre> 1182 * 1183 * <code>bool skip_initial_version_creation = 5;</code> 1184 * 1185 * @return This builder for chaining. 1186 */ clearSkipInitialVersionCreation()1187 public Builder clearSkipInitialVersionCreation() { 1188 bitField0_ = (bitField0_ & ~0x00000008); 1189 skipInitialVersionCreation_ = false; 1190 onChanged(); 1191 return this; 1192 } 1193 1194 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1195 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1196 return super.setUnknownFields(unknownFields); 1197 } 1198 1199 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1200 public final Builder mergeUnknownFields( 1201 final com.google.protobuf.UnknownFieldSet unknownFields) { 1202 return super.mergeUnknownFields(unknownFields); 1203 } 1204 1205 // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.CreateCryptoKeyRequest) 1206 } 1207 1208 // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.CreateCryptoKeyRequest) 1209 private static final com.google.cloud.kms.v1.CreateCryptoKeyRequest DEFAULT_INSTANCE; 1210 1211 static { 1212 DEFAULT_INSTANCE = new com.google.cloud.kms.v1.CreateCryptoKeyRequest(); 1213 } 1214 getDefaultInstance()1215 public static com.google.cloud.kms.v1.CreateCryptoKeyRequest getDefaultInstance() { 1216 return DEFAULT_INSTANCE; 1217 } 1218 1219 private static final com.google.protobuf.Parser<CreateCryptoKeyRequest> PARSER = 1220 new com.google.protobuf.AbstractParser<CreateCryptoKeyRequest>() { 1221 @java.lang.Override 1222 public CreateCryptoKeyRequest parsePartialFrom( 1223 com.google.protobuf.CodedInputStream input, 1224 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1225 throws com.google.protobuf.InvalidProtocolBufferException { 1226 Builder builder = newBuilder(); 1227 try { 1228 builder.mergeFrom(input, extensionRegistry); 1229 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1230 throw e.setUnfinishedMessage(builder.buildPartial()); 1231 } catch (com.google.protobuf.UninitializedMessageException e) { 1232 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1233 } catch (java.io.IOException e) { 1234 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1235 .setUnfinishedMessage(builder.buildPartial()); 1236 } 1237 return builder.buildPartial(); 1238 } 1239 }; 1240 parser()1241 public static com.google.protobuf.Parser<CreateCryptoKeyRequest> parser() { 1242 return PARSER; 1243 } 1244 1245 @java.lang.Override getParserForType()1246 public com.google.protobuf.Parser<CreateCryptoKeyRequest> getParserForType() { 1247 return PARSER; 1248 } 1249 1250 @java.lang.Override getDefaultInstanceForType()1251 public com.google.cloud.kms.v1.CreateCryptoKeyRequest getDefaultInstanceForType() { 1252 return DEFAULT_INSTANCE; 1253 } 1254 } 1255