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/compute/v1/compute.proto 18 19 package com.google.cloud.compute.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Guest OS features. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.GuestOsFeature} 29 */ 30 public final class GuestOsFeature extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.GuestOsFeature) 33 GuestOsFeatureOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use GuestOsFeature.newBuilder() to construct. GuestOsFeature(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private GuestOsFeature(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 GuestOsFeature()40 private GuestOsFeature() { 41 type_ = ""; 42 } 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new GuestOsFeature(); 48 } 49 50 @java.lang.Override getUnknownFields()51 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 52 return this.unknownFields; 53 } 54 getDescriptor()55 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 56 return com.google.cloud.compute.v1.Compute 57 .internal_static_google_cloud_compute_v1_GuestOsFeature_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.cloud.compute.v1.Compute 64 .internal_static_google_cloud_compute_v1_GuestOsFeature_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.cloud.compute.v1.GuestOsFeature.class, 67 com.google.cloud.compute.v1.GuestOsFeature.Builder.class); 68 } 69 70 /** 71 * 72 * 73 * <pre> 74 * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE - TDX_CAPABLE For more information, see Enabling guest operating system features. 75 * </pre> 76 * 77 * Protobuf enum {@code google.cloud.compute.v1.GuestOsFeature.Type} 78 */ 79 public enum Type implements com.google.protobuf.ProtocolMessageEnum { 80 /** 81 * 82 * 83 * <pre> 84 * A value indicating that the enum field is not set. 85 * </pre> 86 * 87 * <code>UNDEFINED_TYPE = 0;</code> 88 */ 89 UNDEFINED_TYPE(0), 90 /** <code>FEATURE_TYPE_UNSPECIFIED = 531767259;</code> */ 91 FEATURE_TYPE_UNSPECIFIED(531767259), 92 /** <code>GVNIC = 68209305;</code> */ 93 GVNIC(68209305), 94 /** <code>MULTI_IP_SUBNET = 151776719;</code> */ 95 MULTI_IP_SUBNET(151776719), 96 /** <code>SECURE_BOOT = 376811194;</code> */ 97 SECURE_BOOT(376811194), 98 /** <code>SEV_CAPABLE = 87083793;</code> */ 99 SEV_CAPABLE(87083793), 100 /** <code>SEV_LIVE_MIGRATABLE = 392039820;</code> */ 101 SEV_LIVE_MIGRATABLE(392039820), 102 /** <code>SEV_SNP_CAPABLE = 426919;</code> */ 103 SEV_SNP_CAPABLE(426919), 104 /** <code>UEFI_COMPATIBLE = 195865408;</code> */ 105 UEFI_COMPATIBLE(195865408), 106 /** <code>VIRTIO_SCSI_MULTIQUEUE = 201597069;</code> */ 107 VIRTIO_SCSI_MULTIQUEUE(201597069), 108 /** <code>WINDOWS = 456863331;</code> */ 109 WINDOWS(456863331), 110 UNRECOGNIZED(-1), 111 ; 112 113 /** 114 * 115 * 116 * <pre> 117 * A value indicating that the enum field is not set. 118 * </pre> 119 * 120 * <code>UNDEFINED_TYPE = 0;</code> 121 */ 122 public static final int UNDEFINED_TYPE_VALUE = 0; 123 /** <code>FEATURE_TYPE_UNSPECIFIED = 531767259;</code> */ 124 public static final int FEATURE_TYPE_UNSPECIFIED_VALUE = 531767259; 125 /** <code>GVNIC = 68209305;</code> */ 126 public static final int GVNIC_VALUE = 68209305; 127 /** <code>MULTI_IP_SUBNET = 151776719;</code> */ 128 public static final int MULTI_IP_SUBNET_VALUE = 151776719; 129 /** <code>SECURE_BOOT = 376811194;</code> */ 130 public static final int SECURE_BOOT_VALUE = 376811194; 131 /** <code>SEV_CAPABLE = 87083793;</code> */ 132 public static final int SEV_CAPABLE_VALUE = 87083793; 133 /** <code>SEV_LIVE_MIGRATABLE = 392039820;</code> */ 134 public static final int SEV_LIVE_MIGRATABLE_VALUE = 392039820; 135 /** <code>SEV_SNP_CAPABLE = 426919;</code> */ 136 public static final int SEV_SNP_CAPABLE_VALUE = 426919; 137 /** <code>UEFI_COMPATIBLE = 195865408;</code> */ 138 public static final int UEFI_COMPATIBLE_VALUE = 195865408; 139 /** <code>VIRTIO_SCSI_MULTIQUEUE = 201597069;</code> */ 140 public static final int VIRTIO_SCSI_MULTIQUEUE_VALUE = 201597069; 141 /** <code>WINDOWS = 456863331;</code> */ 142 public static final int WINDOWS_VALUE = 456863331; 143 getNumber()144 public final int getNumber() { 145 if (this == UNRECOGNIZED) { 146 throw new java.lang.IllegalArgumentException( 147 "Can't get the number of an unknown enum value."); 148 } 149 return value; 150 } 151 152 /** 153 * @param value The numeric wire value of the corresponding enum entry. 154 * @return The enum associated with the given numeric wire value. 155 * @deprecated Use {@link #forNumber(int)} instead. 156 */ 157 @java.lang.Deprecated valueOf(int value)158 public static Type valueOf(int value) { 159 return forNumber(value); 160 } 161 162 /** 163 * @param value The numeric wire value of the corresponding enum entry. 164 * @return The enum associated with the given numeric wire value. 165 */ forNumber(int value)166 public static Type forNumber(int value) { 167 switch (value) { 168 case 0: 169 return UNDEFINED_TYPE; 170 case 531767259: 171 return FEATURE_TYPE_UNSPECIFIED; 172 case 68209305: 173 return GVNIC; 174 case 151776719: 175 return MULTI_IP_SUBNET; 176 case 376811194: 177 return SECURE_BOOT; 178 case 87083793: 179 return SEV_CAPABLE; 180 case 392039820: 181 return SEV_LIVE_MIGRATABLE; 182 case 426919: 183 return SEV_SNP_CAPABLE; 184 case 195865408: 185 return UEFI_COMPATIBLE; 186 case 201597069: 187 return VIRTIO_SCSI_MULTIQUEUE; 188 case 456863331: 189 return WINDOWS; 190 default: 191 return null; 192 } 193 } 194 internalGetValueMap()195 public static com.google.protobuf.Internal.EnumLiteMap<Type> internalGetValueMap() { 196 return internalValueMap; 197 } 198 199 private static final com.google.protobuf.Internal.EnumLiteMap<Type> internalValueMap = 200 new com.google.protobuf.Internal.EnumLiteMap<Type>() { 201 public Type findValueByNumber(int number) { 202 return Type.forNumber(number); 203 } 204 }; 205 getValueDescriptor()206 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 207 if (this == UNRECOGNIZED) { 208 throw new java.lang.IllegalStateException( 209 "Can't get the descriptor of an unrecognized enum value."); 210 } 211 return getDescriptor().getValues().get(ordinal()); 212 } 213 getDescriptorForType()214 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 215 return getDescriptor(); 216 } 217 getDescriptor()218 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 219 return com.google.cloud.compute.v1.GuestOsFeature.getDescriptor().getEnumTypes().get(0); 220 } 221 222 private static final Type[] VALUES = values(); 223 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)224 public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 225 if (desc.getType() != getDescriptor()) { 226 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 227 } 228 if (desc.getIndex() == -1) { 229 return UNRECOGNIZED; 230 } 231 return VALUES[desc.getIndex()]; 232 } 233 234 private final int value; 235 Type(int value)236 private Type(int value) { 237 this.value = value; 238 } 239 240 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.GuestOsFeature.Type) 241 } 242 243 private int bitField0_; 244 public static final int TYPE_FIELD_NUMBER = 3575610; 245 246 @SuppressWarnings("serial") 247 private volatile java.lang.Object type_ = ""; 248 /** 249 * 250 * 251 * <pre> 252 * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE - TDX_CAPABLE For more information, see Enabling guest operating system features. 253 * Check the Type enum for the list of possible values. 254 * </pre> 255 * 256 * <code>optional string type = 3575610;</code> 257 * 258 * @return Whether the type field is set. 259 */ 260 @java.lang.Override hasType()261 public boolean hasType() { 262 return ((bitField0_ & 0x00000001) != 0); 263 } 264 /** 265 * 266 * 267 * <pre> 268 * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE - TDX_CAPABLE For more information, see Enabling guest operating system features. 269 * Check the Type enum for the list of possible values. 270 * </pre> 271 * 272 * <code>optional string type = 3575610;</code> 273 * 274 * @return The type. 275 */ 276 @java.lang.Override getType()277 public java.lang.String getType() { 278 java.lang.Object ref = type_; 279 if (ref instanceof java.lang.String) { 280 return (java.lang.String) ref; 281 } else { 282 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 283 java.lang.String s = bs.toStringUtf8(); 284 type_ = s; 285 return s; 286 } 287 } 288 /** 289 * 290 * 291 * <pre> 292 * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE - TDX_CAPABLE For more information, see Enabling guest operating system features. 293 * Check the Type enum for the list of possible values. 294 * </pre> 295 * 296 * <code>optional string type = 3575610;</code> 297 * 298 * @return The bytes for type. 299 */ 300 @java.lang.Override getTypeBytes()301 public com.google.protobuf.ByteString getTypeBytes() { 302 java.lang.Object ref = type_; 303 if (ref instanceof java.lang.String) { 304 com.google.protobuf.ByteString b = 305 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 306 type_ = b; 307 return b; 308 } else { 309 return (com.google.protobuf.ByteString) ref; 310 } 311 } 312 313 private byte memoizedIsInitialized = -1; 314 315 @java.lang.Override isInitialized()316 public final boolean isInitialized() { 317 byte isInitialized = memoizedIsInitialized; 318 if (isInitialized == 1) return true; 319 if (isInitialized == 0) return false; 320 321 memoizedIsInitialized = 1; 322 return true; 323 } 324 325 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)326 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 327 if (((bitField0_ & 0x00000001) != 0)) { 328 com.google.protobuf.GeneratedMessageV3.writeString(output, 3575610, type_); 329 } 330 getUnknownFields().writeTo(output); 331 } 332 333 @java.lang.Override getSerializedSize()334 public int getSerializedSize() { 335 int size = memoizedSize; 336 if (size != -1) return size; 337 338 size = 0; 339 if (((bitField0_ & 0x00000001) != 0)) { 340 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3575610, type_); 341 } 342 size += getUnknownFields().getSerializedSize(); 343 memoizedSize = size; 344 return size; 345 } 346 347 @java.lang.Override equals(final java.lang.Object obj)348 public boolean equals(final java.lang.Object obj) { 349 if (obj == this) { 350 return true; 351 } 352 if (!(obj instanceof com.google.cloud.compute.v1.GuestOsFeature)) { 353 return super.equals(obj); 354 } 355 com.google.cloud.compute.v1.GuestOsFeature other = 356 (com.google.cloud.compute.v1.GuestOsFeature) obj; 357 358 if (hasType() != other.hasType()) return false; 359 if (hasType()) { 360 if (!getType().equals(other.getType())) return false; 361 } 362 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 363 return true; 364 } 365 366 @java.lang.Override hashCode()367 public int hashCode() { 368 if (memoizedHashCode != 0) { 369 return memoizedHashCode; 370 } 371 int hash = 41; 372 hash = (19 * hash) + getDescriptor().hashCode(); 373 if (hasType()) { 374 hash = (37 * hash) + TYPE_FIELD_NUMBER; 375 hash = (53 * hash) + getType().hashCode(); 376 } 377 hash = (29 * hash) + getUnknownFields().hashCode(); 378 memoizedHashCode = hash; 379 return hash; 380 } 381 parseFrom(java.nio.ByteBuffer data)382 public static com.google.cloud.compute.v1.GuestOsFeature parseFrom(java.nio.ByteBuffer data) 383 throws com.google.protobuf.InvalidProtocolBufferException { 384 return PARSER.parseFrom(data); 385 } 386 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)387 public static com.google.cloud.compute.v1.GuestOsFeature parseFrom( 388 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 389 throws com.google.protobuf.InvalidProtocolBufferException { 390 return PARSER.parseFrom(data, extensionRegistry); 391 } 392 parseFrom( com.google.protobuf.ByteString data)393 public static com.google.cloud.compute.v1.GuestOsFeature parseFrom( 394 com.google.protobuf.ByteString data) 395 throws com.google.protobuf.InvalidProtocolBufferException { 396 return PARSER.parseFrom(data); 397 } 398 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)399 public static com.google.cloud.compute.v1.GuestOsFeature parseFrom( 400 com.google.protobuf.ByteString data, 401 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 402 throws com.google.protobuf.InvalidProtocolBufferException { 403 return PARSER.parseFrom(data, extensionRegistry); 404 } 405 parseFrom(byte[] data)406 public static com.google.cloud.compute.v1.GuestOsFeature parseFrom(byte[] data) 407 throws com.google.protobuf.InvalidProtocolBufferException { 408 return PARSER.parseFrom(data); 409 } 410 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)411 public static com.google.cloud.compute.v1.GuestOsFeature parseFrom( 412 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 413 throws com.google.protobuf.InvalidProtocolBufferException { 414 return PARSER.parseFrom(data, extensionRegistry); 415 } 416 parseFrom(java.io.InputStream input)417 public static com.google.cloud.compute.v1.GuestOsFeature parseFrom(java.io.InputStream input) 418 throws java.io.IOException { 419 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 420 } 421 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)422 public static com.google.cloud.compute.v1.GuestOsFeature parseFrom( 423 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 424 throws java.io.IOException { 425 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 426 PARSER, input, extensionRegistry); 427 } 428 parseDelimitedFrom( java.io.InputStream input)429 public static com.google.cloud.compute.v1.GuestOsFeature parseDelimitedFrom( 430 java.io.InputStream input) throws java.io.IOException { 431 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 432 } 433 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)434 public static com.google.cloud.compute.v1.GuestOsFeature parseDelimitedFrom( 435 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 436 throws java.io.IOException { 437 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 438 PARSER, input, extensionRegistry); 439 } 440 parseFrom( com.google.protobuf.CodedInputStream input)441 public static com.google.cloud.compute.v1.GuestOsFeature parseFrom( 442 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 443 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 444 } 445 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)446 public static com.google.cloud.compute.v1.GuestOsFeature parseFrom( 447 com.google.protobuf.CodedInputStream input, 448 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 449 throws java.io.IOException { 450 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 451 PARSER, input, extensionRegistry); 452 } 453 454 @java.lang.Override newBuilderForType()455 public Builder newBuilderForType() { 456 return newBuilder(); 457 } 458 newBuilder()459 public static Builder newBuilder() { 460 return DEFAULT_INSTANCE.toBuilder(); 461 } 462 newBuilder(com.google.cloud.compute.v1.GuestOsFeature prototype)463 public static Builder newBuilder(com.google.cloud.compute.v1.GuestOsFeature prototype) { 464 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 465 } 466 467 @java.lang.Override toBuilder()468 public Builder toBuilder() { 469 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 470 } 471 472 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)473 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 474 Builder builder = new Builder(parent); 475 return builder; 476 } 477 /** 478 * 479 * 480 * <pre> 481 * Guest OS features. 482 * </pre> 483 * 484 * Protobuf type {@code google.cloud.compute.v1.GuestOsFeature} 485 */ 486 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 487 implements 488 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.GuestOsFeature) 489 com.google.cloud.compute.v1.GuestOsFeatureOrBuilder { getDescriptor()490 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 491 return com.google.cloud.compute.v1.Compute 492 .internal_static_google_cloud_compute_v1_GuestOsFeature_descriptor; 493 } 494 495 @java.lang.Override 496 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()497 internalGetFieldAccessorTable() { 498 return com.google.cloud.compute.v1.Compute 499 .internal_static_google_cloud_compute_v1_GuestOsFeature_fieldAccessorTable 500 .ensureFieldAccessorsInitialized( 501 com.google.cloud.compute.v1.GuestOsFeature.class, 502 com.google.cloud.compute.v1.GuestOsFeature.Builder.class); 503 } 504 505 // Construct using com.google.cloud.compute.v1.GuestOsFeature.newBuilder() Builder()506 private Builder() {} 507 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)508 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 509 super(parent); 510 } 511 512 @java.lang.Override clear()513 public Builder clear() { 514 super.clear(); 515 bitField0_ = 0; 516 type_ = ""; 517 return this; 518 } 519 520 @java.lang.Override getDescriptorForType()521 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 522 return com.google.cloud.compute.v1.Compute 523 .internal_static_google_cloud_compute_v1_GuestOsFeature_descriptor; 524 } 525 526 @java.lang.Override getDefaultInstanceForType()527 public com.google.cloud.compute.v1.GuestOsFeature getDefaultInstanceForType() { 528 return com.google.cloud.compute.v1.GuestOsFeature.getDefaultInstance(); 529 } 530 531 @java.lang.Override build()532 public com.google.cloud.compute.v1.GuestOsFeature build() { 533 com.google.cloud.compute.v1.GuestOsFeature result = buildPartial(); 534 if (!result.isInitialized()) { 535 throw newUninitializedMessageException(result); 536 } 537 return result; 538 } 539 540 @java.lang.Override buildPartial()541 public com.google.cloud.compute.v1.GuestOsFeature buildPartial() { 542 com.google.cloud.compute.v1.GuestOsFeature result = 543 new com.google.cloud.compute.v1.GuestOsFeature(this); 544 if (bitField0_ != 0) { 545 buildPartial0(result); 546 } 547 onBuilt(); 548 return result; 549 } 550 buildPartial0(com.google.cloud.compute.v1.GuestOsFeature result)551 private void buildPartial0(com.google.cloud.compute.v1.GuestOsFeature result) { 552 int from_bitField0_ = bitField0_; 553 int to_bitField0_ = 0; 554 if (((from_bitField0_ & 0x00000001) != 0)) { 555 result.type_ = type_; 556 to_bitField0_ |= 0x00000001; 557 } 558 result.bitField0_ |= to_bitField0_; 559 } 560 561 @java.lang.Override clone()562 public Builder clone() { 563 return super.clone(); 564 } 565 566 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)567 public Builder setField( 568 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 569 return super.setField(field, value); 570 } 571 572 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)573 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 574 return super.clearField(field); 575 } 576 577 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)578 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 579 return super.clearOneof(oneof); 580 } 581 582 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)583 public Builder setRepeatedField( 584 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 585 return super.setRepeatedField(field, index, value); 586 } 587 588 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)589 public Builder addRepeatedField( 590 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 591 return super.addRepeatedField(field, value); 592 } 593 594 @java.lang.Override mergeFrom(com.google.protobuf.Message other)595 public Builder mergeFrom(com.google.protobuf.Message other) { 596 if (other instanceof com.google.cloud.compute.v1.GuestOsFeature) { 597 return mergeFrom((com.google.cloud.compute.v1.GuestOsFeature) other); 598 } else { 599 super.mergeFrom(other); 600 return this; 601 } 602 } 603 mergeFrom(com.google.cloud.compute.v1.GuestOsFeature other)604 public Builder mergeFrom(com.google.cloud.compute.v1.GuestOsFeature other) { 605 if (other == com.google.cloud.compute.v1.GuestOsFeature.getDefaultInstance()) return this; 606 if (other.hasType()) { 607 type_ = other.type_; 608 bitField0_ |= 0x00000001; 609 onChanged(); 610 } 611 this.mergeUnknownFields(other.getUnknownFields()); 612 onChanged(); 613 return this; 614 } 615 616 @java.lang.Override isInitialized()617 public final boolean isInitialized() { 618 return true; 619 } 620 621 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)622 public Builder mergeFrom( 623 com.google.protobuf.CodedInputStream input, 624 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 625 throws java.io.IOException { 626 if (extensionRegistry == null) { 627 throw new java.lang.NullPointerException(); 628 } 629 try { 630 boolean done = false; 631 while (!done) { 632 int tag = input.readTag(); 633 switch (tag) { 634 case 0: 635 done = true; 636 break; 637 case 28604882: 638 { 639 type_ = input.readStringRequireUtf8(); 640 bitField0_ |= 0x00000001; 641 break; 642 } // case 28604882 643 default: 644 { 645 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 646 done = true; // was an endgroup tag 647 } 648 break; 649 } // default: 650 } // switch (tag) 651 } // while (!done) 652 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 653 throw e.unwrapIOException(); 654 } finally { 655 onChanged(); 656 } // finally 657 return this; 658 } 659 660 private int bitField0_; 661 662 private java.lang.Object type_ = ""; 663 /** 664 * 665 * 666 * <pre> 667 * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE - TDX_CAPABLE For more information, see Enabling guest operating system features. 668 * Check the Type enum for the list of possible values. 669 * </pre> 670 * 671 * <code>optional string type = 3575610;</code> 672 * 673 * @return Whether the type field is set. 674 */ hasType()675 public boolean hasType() { 676 return ((bitField0_ & 0x00000001) != 0); 677 } 678 /** 679 * 680 * 681 * <pre> 682 * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE - TDX_CAPABLE For more information, see Enabling guest operating system features. 683 * Check the Type enum for the list of possible values. 684 * </pre> 685 * 686 * <code>optional string type = 3575610;</code> 687 * 688 * @return The type. 689 */ getType()690 public java.lang.String getType() { 691 java.lang.Object ref = type_; 692 if (!(ref instanceof java.lang.String)) { 693 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 694 java.lang.String s = bs.toStringUtf8(); 695 type_ = s; 696 return s; 697 } else { 698 return (java.lang.String) ref; 699 } 700 } 701 /** 702 * 703 * 704 * <pre> 705 * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE - TDX_CAPABLE For more information, see Enabling guest operating system features. 706 * Check the Type enum for the list of possible values. 707 * </pre> 708 * 709 * <code>optional string type = 3575610;</code> 710 * 711 * @return The bytes for type. 712 */ getTypeBytes()713 public com.google.protobuf.ByteString getTypeBytes() { 714 java.lang.Object ref = type_; 715 if (ref instanceof String) { 716 com.google.protobuf.ByteString b = 717 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 718 type_ = b; 719 return b; 720 } else { 721 return (com.google.protobuf.ByteString) ref; 722 } 723 } 724 /** 725 * 726 * 727 * <pre> 728 * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE - TDX_CAPABLE For more information, see Enabling guest operating system features. 729 * Check the Type enum for the list of possible values. 730 * </pre> 731 * 732 * <code>optional string type = 3575610;</code> 733 * 734 * @param value The type to set. 735 * @return This builder for chaining. 736 */ setType(java.lang.String value)737 public Builder setType(java.lang.String value) { 738 if (value == null) { 739 throw new NullPointerException(); 740 } 741 type_ = value; 742 bitField0_ |= 0x00000001; 743 onChanged(); 744 return this; 745 } 746 /** 747 * 748 * 749 * <pre> 750 * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE - TDX_CAPABLE For more information, see Enabling guest operating system features. 751 * Check the Type enum for the list of possible values. 752 * </pre> 753 * 754 * <code>optional string type = 3575610;</code> 755 * 756 * @return This builder for chaining. 757 */ clearType()758 public Builder clearType() { 759 type_ = getDefaultInstance().getType(); 760 bitField0_ = (bitField0_ & ~0x00000001); 761 onChanged(); 762 return this; 763 } 764 /** 765 * 766 * 767 * <pre> 768 * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE - TDX_CAPABLE For more information, see Enabling guest operating system features. 769 * Check the Type enum for the list of possible values. 770 * </pre> 771 * 772 * <code>optional string type = 3575610;</code> 773 * 774 * @param value The bytes for type to set. 775 * @return This builder for chaining. 776 */ setTypeBytes(com.google.protobuf.ByteString value)777 public Builder setTypeBytes(com.google.protobuf.ByteString value) { 778 if (value == null) { 779 throw new NullPointerException(); 780 } 781 checkByteStringIsUtf8(value); 782 type_ = value; 783 bitField0_ |= 0x00000001; 784 onChanged(); 785 return this; 786 } 787 788 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)789 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 790 return super.setUnknownFields(unknownFields); 791 } 792 793 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)794 public final Builder mergeUnknownFields( 795 final com.google.protobuf.UnknownFieldSet unknownFields) { 796 return super.mergeUnknownFields(unknownFields); 797 } 798 799 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.GuestOsFeature) 800 } 801 802 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.GuestOsFeature) 803 private static final com.google.cloud.compute.v1.GuestOsFeature DEFAULT_INSTANCE; 804 805 static { 806 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.GuestOsFeature(); 807 } 808 getDefaultInstance()809 public static com.google.cloud.compute.v1.GuestOsFeature getDefaultInstance() { 810 return DEFAULT_INSTANCE; 811 } 812 813 private static final com.google.protobuf.Parser<GuestOsFeature> PARSER = 814 new com.google.protobuf.AbstractParser<GuestOsFeature>() { 815 @java.lang.Override 816 public GuestOsFeature parsePartialFrom( 817 com.google.protobuf.CodedInputStream input, 818 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 819 throws com.google.protobuf.InvalidProtocolBufferException { 820 Builder builder = newBuilder(); 821 try { 822 builder.mergeFrom(input, extensionRegistry); 823 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 824 throw e.setUnfinishedMessage(builder.buildPartial()); 825 } catch (com.google.protobuf.UninitializedMessageException e) { 826 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 827 } catch (java.io.IOException e) { 828 throw new com.google.protobuf.InvalidProtocolBufferException(e) 829 .setUnfinishedMessage(builder.buildPartial()); 830 } 831 return builder.buildPartial(); 832 } 833 }; 834 parser()835 public static com.google.protobuf.Parser<GuestOsFeature> parser() { 836 return PARSER; 837 } 838 839 @java.lang.Override getParserForType()840 public com.google.protobuf.Parser<GuestOsFeature> getParserForType() { 841 return PARSER; 842 } 843 844 @java.lang.Override getDefaultInstanceForType()845 public com.google.cloud.compute.v1.GuestOsFeature getDefaultInstanceForType() { 846 return DEFAULT_INSTANCE; 847 } 848 } 849