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