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