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/aiplatform/v1/machine_resources.proto 18 19 package com.google.cloud.aiplatform.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Represents the spec of disk options. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.aiplatform.v1.DiskSpec} 29 */ 30 public final class DiskSpec extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DiskSpec) 33 DiskSpecOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use DiskSpec.newBuilder() to construct. DiskSpec(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private DiskSpec(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 DiskSpec()40 private DiskSpec() { 41 bootDiskType_ = ""; 42 } 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new DiskSpec(); 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.aiplatform.v1.MachineResourcesProto 57 .internal_static_google_cloud_aiplatform_v1_DiskSpec_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.cloud.aiplatform.v1.MachineResourcesProto 64 .internal_static_google_cloud_aiplatform_v1_DiskSpec_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.cloud.aiplatform.v1.DiskSpec.class, 67 com.google.cloud.aiplatform.v1.DiskSpec.Builder.class); 68 } 69 70 public static final int BOOT_DISK_TYPE_FIELD_NUMBER = 1; 71 72 @SuppressWarnings("serial") 73 private volatile java.lang.Object bootDiskType_ = ""; 74 /** 75 * 76 * 77 * <pre> 78 * Type of the boot disk (default is "pd-ssd"). 79 * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or 80 * "pd-standard" (Persistent Disk Hard Disk Drive). 81 * </pre> 82 * 83 * <code>string boot_disk_type = 1;</code> 84 * 85 * @return The bootDiskType. 86 */ 87 @java.lang.Override getBootDiskType()88 public java.lang.String getBootDiskType() { 89 java.lang.Object ref = bootDiskType_; 90 if (ref instanceof java.lang.String) { 91 return (java.lang.String) ref; 92 } else { 93 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 94 java.lang.String s = bs.toStringUtf8(); 95 bootDiskType_ = s; 96 return s; 97 } 98 } 99 /** 100 * 101 * 102 * <pre> 103 * Type of the boot disk (default is "pd-ssd"). 104 * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or 105 * "pd-standard" (Persistent Disk Hard Disk Drive). 106 * </pre> 107 * 108 * <code>string boot_disk_type = 1;</code> 109 * 110 * @return The bytes for bootDiskType. 111 */ 112 @java.lang.Override getBootDiskTypeBytes()113 public com.google.protobuf.ByteString getBootDiskTypeBytes() { 114 java.lang.Object ref = bootDiskType_; 115 if (ref instanceof java.lang.String) { 116 com.google.protobuf.ByteString b = 117 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 118 bootDiskType_ = b; 119 return b; 120 } else { 121 return (com.google.protobuf.ByteString) ref; 122 } 123 } 124 125 public static final int BOOT_DISK_SIZE_GB_FIELD_NUMBER = 2; 126 private int bootDiskSizeGb_ = 0; 127 /** 128 * 129 * 130 * <pre> 131 * Size in GB of the boot disk (default is 100GB). 132 * </pre> 133 * 134 * <code>int32 boot_disk_size_gb = 2;</code> 135 * 136 * @return The bootDiskSizeGb. 137 */ 138 @java.lang.Override getBootDiskSizeGb()139 public int getBootDiskSizeGb() { 140 return bootDiskSizeGb_; 141 } 142 143 private byte memoizedIsInitialized = -1; 144 145 @java.lang.Override isInitialized()146 public final boolean isInitialized() { 147 byte isInitialized = memoizedIsInitialized; 148 if (isInitialized == 1) return true; 149 if (isInitialized == 0) return false; 150 151 memoizedIsInitialized = 1; 152 return true; 153 } 154 155 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)156 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 157 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bootDiskType_)) { 158 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bootDiskType_); 159 } 160 if (bootDiskSizeGb_ != 0) { 161 output.writeInt32(2, bootDiskSizeGb_); 162 } 163 getUnknownFields().writeTo(output); 164 } 165 166 @java.lang.Override getSerializedSize()167 public int getSerializedSize() { 168 int size = memoizedSize; 169 if (size != -1) return size; 170 171 size = 0; 172 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bootDiskType_)) { 173 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bootDiskType_); 174 } 175 if (bootDiskSizeGb_ != 0) { 176 size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, bootDiskSizeGb_); 177 } 178 size += getUnknownFields().getSerializedSize(); 179 memoizedSize = size; 180 return size; 181 } 182 183 @java.lang.Override equals(final java.lang.Object obj)184 public boolean equals(final java.lang.Object obj) { 185 if (obj == this) { 186 return true; 187 } 188 if (!(obj instanceof com.google.cloud.aiplatform.v1.DiskSpec)) { 189 return super.equals(obj); 190 } 191 com.google.cloud.aiplatform.v1.DiskSpec other = (com.google.cloud.aiplatform.v1.DiskSpec) obj; 192 193 if (!getBootDiskType().equals(other.getBootDiskType())) return false; 194 if (getBootDiskSizeGb() != other.getBootDiskSizeGb()) return false; 195 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 196 return true; 197 } 198 199 @java.lang.Override hashCode()200 public int hashCode() { 201 if (memoizedHashCode != 0) { 202 return memoizedHashCode; 203 } 204 int hash = 41; 205 hash = (19 * hash) + getDescriptor().hashCode(); 206 hash = (37 * hash) + BOOT_DISK_TYPE_FIELD_NUMBER; 207 hash = (53 * hash) + getBootDiskType().hashCode(); 208 hash = (37 * hash) + BOOT_DISK_SIZE_GB_FIELD_NUMBER; 209 hash = (53 * hash) + getBootDiskSizeGb(); 210 hash = (29 * hash) + getUnknownFields().hashCode(); 211 memoizedHashCode = hash; 212 return hash; 213 } 214 parseFrom(java.nio.ByteBuffer data)215 public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom(java.nio.ByteBuffer data) 216 throws com.google.protobuf.InvalidProtocolBufferException { 217 return PARSER.parseFrom(data); 218 } 219 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)220 public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom( 221 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 222 throws com.google.protobuf.InvalidProtocolBufferException { 223 return PARSER.parseFrom(data, extensionRegistry); 224 } 225 parseFrom( com.google.protobuf.ByteString data)226 public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom( 227 com.google.protobuf.ByteString data) 228 throws com.google.protobuf.InvalidProtocolBufferException { 229 return PARSER.parseFrom(data); 230 } 231 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)232 public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom( 233 com.google.protobuf.ByteString data, 234 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 235 throws com.google.protobuf.InvalidProtocolBufferException { 236 return PARSER.parseFrom(data, extensionRegistry); 237 } 238 parseFrom(byte[] data)239 public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom(byte[] data) 240 throws com.google.protobuf.InvalidProtocolBufferException { 241 return PARSER.parseFrom(data); 242 } 243 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)244 public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom( 245 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 246 throws com.google.protobuf.InvalidProtocolBufferException { 247 return PARSER.parseFrom(data, extensionRegistry); 248 } 249 parseFrom(java.io.InputStream input)250 public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom(java.io.InputStream input) 251 throws java.io.IOException { 252 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 253 } 254 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)255 public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom( 256 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 257 throws java.io.IOException { 258 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 259 PARSER, input, extensionRegistry); 260 } 261 parseDelimitedFrom( java.io.InputStream input)262 public static com.google.cloud.aiplatform.v1.DiskSpec parseDelimitedFrom( 263 java.io.InputStream input) throws java.io.IOException { 264 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 265 } 266 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)267 public static com.google.cloud.aiplatform.v1.DiskSpec parseDelimitedFrom( 268 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 269 throws java.io.IOException { 270 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 271 PARSER, input, extensionRegistry); 272 } 273 parseFrom( com.google.protobuf.CodedInputStream input)274 public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom( 275 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 276 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 277 } 278 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)279 public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom( 280 com.google.protobuf.CodedInputStream input, 281 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 282 throws java.io.IOException { 283 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 284 PARSER, input, extensionRegistry); 285 } 286 287 @java.lang.Override newBuilderForType()288 public Builder newBuilderForType() { 289 return newBuilder(); 290 } 291 newBuilder()292 public static Builder newBuilder() { 293 return DEFAULT_INSTANCE.toBuilder(); 294 } 295 newBuilder(com.google.cloud.aiplatform.v1.DiskSpec prototype)296 public static Builder newBuilder(com.google.cloud.aiplatform.v1.DiskSpec prototype) { 297 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 298 } 299 300 @java.lang.Override toBuilder()301 public Builder toBuilder() { 302 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 303 } 304 305 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)306 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 307 Builder builder = new Builder(parent); 308 return builder; 309 } 310 /** 311 * 312 * 313 * <pre> 314 * Represents the spec of disk options. 315 * </pre> 316 * 317 * Protobuf type {@code google.cloud.aiplatform.v1.DiskSpec} 318 */ 319 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 320 implements 321 // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DiskSpec) 322 com.google.cloud.aiplatform.v1.DiskSpecOrBuilder { getDescriptor()323 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 324 return com.google.cloud.aiplatform.v1.MachineResourcesProto 325 .internal_static_google_cloud_aiplatform_v1_DiskSpec_descriptor; 326 } 327 328 @java.lang.Override 329 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()330 internalGetFieldAccessorTable() { 331 return com.google.cloud.aiplatform.v1.MachineResourcesProto 332 .internal_static_google_cloud_aiplatform_v1_DiskSpec_fieldAccessorTable 333 .ensureFieldAccessorsInitialized( 334 com.google.cloud.aiplatform.v1.DiskSpec.class, 335 com.google.cloud.aiplatform.v1.DiskSpec.Builder.class); 336 } 337 338 // Construct using com.google.cloud.aiplatform.v1.DiskSpec.newBuilder() Builder()339 private Builder() {} 340 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)341 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 342 super(parent); 343 } 344 345 @java.lang.Override clear()346 public Builder clear() { 347 super.clear(); 348 bitField0_ = 0; 349 bootDiskType_ = ""; 350 bootDiskSizeGb_ = 0; 351 return this; 352 } 353 354 @java.lang.Override getDescriptorForType()355 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 356 return com.google.cloud.aiplatform.v1.MachineResourcesProto 357 .internal_static_google_cloud_aiplatform_v1_DiskSpec_descriptor; 358 } 359 360 @java.lang.Override getDefaultInstanceForType()361 public com.google.cloud.aiplatform.v1.DiskSpec getDefaultInstanceForType() { 362 return com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance(); 363 } 364 365 @java.lang.Override build()366 public com.google.cloud.aiplatform.v1.DiskSpec build() { 367 com.google.cloud.aiplatform.v1.DiskSpec result = buildPartial(); 368 if (!result.isInitialized()) { 369 throw newUninitializedMessageException(result); 370 } 371 return result; 372 } 373 374 @java.lang.Override buildPartial()375 public com.google.cloud.aiplatform.v1.DiskSpec buildPartial() { 376 com.google.cloud.aiplatform.v1.DiskSpec result = 377 new com.google.cloud.aiplatform.v1.DiskSpec(this); 378 if (bitField0_ != 0) { 379 buildPartial0(result); 380 } 381 onBuilt(); 382 return result; 383 } 384 buildPartial0(com.google.cloud.aiplatform.v1.DiskSpec result)385 private void buildPartial0(com.google.cloud.aiplatform.v1.DiskSpec result) { 386 int from_bitField0_ = bitField0_; 387 if (((from_bitField0_ & 0x00000001) != 0)) { 388 result.bootDiskType_ = bootDiskType_; 389 } 390 if (((from_bitField0_ & 0x00000002) != 0)) { 391 result.bootDiskSizeGb_ = bootDiskSizeGb_; 392 } 393 } 394 395 @java.lang.Override clone()396 public Builder clone() { 397 return super.clone(); 398 } 399 400 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)401 public Builder setField( 402 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 403 return super.setField(field, value); 404 } 405 406 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)407 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 408 return super.clearField(field); 409 } 410 411 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)412 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 413 return super.clearOneof(oneof); 414 } 415 416 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)417 public Builder setRepeatedField( 418 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 419 return super.setRepeatedField(field, index, value); 420 } 421 422 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)423 public Builder addRepeatedField( 424 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 425 return super.addRepeatedField(field, value); 426 } 427 428 @java.lang.Override mergeFrom(com.google.protobuf.Message other)429 public Builder mergeFrom(com.google.protobuf.Message other) { 430 if (other instanceof com.google.cloud.aiplatform.v1.DiskSpec) { 431 return mergeFrom((com.google.cloud.aiplatform.v1.DiskSpec) other); 432 } else { 433 super.mergeFrom(other); 434 return this; 435 } 436 } 437 mergeFrom(com.google.cloud.aiplatform.v1.DiskSpec other)438 public Builder mergeFrom(com.google.cloud.aiplatform.v1.DiskSpec other) { 439 if (other == com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance()) return this; 440 if (!other.getBootDiskType().isEmpty()) { 441 bootDiskType_ = other.bootDiskType_; 442 bitField0_ |= 0x00000001; 443 onChanged(); 444 } 445 if (other.getBootDiskSizeGb() != 0) { 446 setBootDiskSizeGb(other.getBootDiskSizeGb()); 447 } 448 this.mergeUnknownFields(other.getUnknownFields()); 449 onChanged(); 450 return this; 451 } 452 453 @java.lang.Override isInitialized()454 public final boolean isInitialized() { 455 return true; 456 } 457 458 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)459 public Builder mergeFrom( 460 com.google.protobuf.CodedInputStream input, 461 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 462 throws java.io.IOException { 463 if (extensionRegistry == null) { 464 throw new java.lang.NullPointerException(); 465 } 466 try { 467 boolean done = false; 468 while (!done) { 469 int tag = input.readTag(); 470 switch (tag) { 471 case 0: 472 done = true; 473 break; 474 case 10: 475 { 476 bootDiskType_ = input.readStringRequireUtf8(); 477 bitField0_ |= 0x00000001; 478 break; 479 } // case 10 480 case 16: 481 { 482 bootDiskSizeGb_ = input.readInt32(); 483 bitField0_ |= 0x00000002; 484 break; 485 } // case 16 486 default: 487 { 488 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 489 done = true; // was an endgroup tag 490 } 491 break; 492 } // default: 493 } // switch (tag) 494 } // while (!done) 495 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 496 throw e.unwrapIOException(); 497 } finally { 498 onChanged(); 499 } // finally 500 return this; 501 } 502 503 private int bitField0_; 504 505 private java.lang.Object bootDiskType_ = ""; 506 /** 507 * 508 * 509 * <pre> 510 * Type of the boot disk (default is "pd-ssd"). 511 * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or 512 * "pd-standard" (Persistent Disk Hard Disk Drive). 513 * </pre> 514 * 515 * <code>string boot_disk_type = 1;</code> 516 * 517 * @return The bootDiskType. 518 */ getBootDiskType()519 public java.lang.String getBootDiskType() { 520 java.lang.Object ref = bootDiskType_; 521 if (!(ref instanceof java.lang.String)) { 522 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 523 java.lang.String s = bs.toStringUtf8(); 524 bootDiskType_ = s; 525 return s; 526 } else { 527 return (java.lang.String) ref; 528 } 529 } 530 /** 531 * 532 * 533 * <pre> 534 * Type of the boot disk (default is "pd-ssd"). 535 * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or 536 * "pd-standard" (Persistent Disk Hard Disk Drive). 537 * </pre> 538 * 539 * <code>string boot_disk_type = 1;</code> 540 * 541 * @return The bytes for bootDiskType. 542 */ getBootDiskTypeBytes()543 public com.google.protobuf.ByteString getBootDiskTypeBytes() { 544 java.lang.Object ref = bootDiskType_; 545 if (ref instanceof String) { 546 com.google.protobuf.ByteString b = 547 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 548 bootDiskType_ = b; 549 return b; 550 } else { 551 return (com.google.protobuf.ByteString) ref; 552 } 553 } 554 /** 555 * 556 * 557 * <pre> 558 * Type of the boot disk (default is "pd-ssd"). 559 * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or 560 * "pd-standard" (Persistent Disk Hard Disk Drive). 561 * </pre> 562 * 563 * <code>string boot_disk_type = 1;</code> 564 * 565 * @param value The bootDiskType to set. 566 * @return This builder for chaining. 567 */ setBootDiskType(java.lang.String value)568 public Builder setBootDiskType(java.lang.String value) { 569 if (value == null) { 570 throw new NullPointerException(); 571 } 572 bootDiskType_ = value; 573 bitField0_ |= 0x00000001; 574 onChanged(); 575 return this; 576 } 577 /** 578 * 579 * 580 * <pre> 581 * Type of the boot disk (default is "pd-ssd"). 582 * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or 583 * "pd-standard" (Persistent Disk Hard Disk Drive). 584 * </pre> 585 * 586 * <code>string boot_disk_type = 1;</code> 587 * 588 * @return This builder for chaining. 589 */ clearBootDiskType()590 public Builder clearBootDiskType() { 591 bootDiskType_ = getDefaultInstance().getBootDiskType(); 592 bitField0_ = (bitField0_ & ~0x00000001); 593 onChanged(); 594 return this; 595 } 596 /** 597 * 598 * 599 * <pre> 600 * Type of the boot disk (default is "pd-ssd"). 601 * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or 602 * "pd-standard" (Persistent Disk Hard Disk Drive). 603 * </pre> 604 * 605 * <code>string boot_disk_type = 1;</code> 606 * 607 * @param value The bytes for bootDiskType to set. 608 * @return This builder for chaining. 609 */ setBootDiskTypeBytes(com.google.protobuf.ByteString value)610 public Builder setBootDiskTypeBytes(com.google.protobuf.ByteString value) { 611 if (value == null) { 612 throw new NullPointerException(); 613 } 614 checkByteStringIsUtf8(value); 615 bootDiskType_ = value; 616 bitField0_ |= 0x00000001; 617 onChanged(); 618 return this; 619 } 620 621 private int bootDiskSizeGb_; 622 /** 623 * 624 * 625 * <pre> 626 * Size in GB of the boot disk (default is 100GB). 627 * </pre> 628 * 629 * <code>int32 boot_disk_size_gb = 2;</code> 630 * 631 * @return The bootDiskSizeGb. 632 */ 633 @java.lang.Override getBootDiskSizeGb()634 public int getBootDiskSizeGb() { 635 return bootDiskSizeGb_; 636 } 637 /** 638 * 639 * 640 * <pre> 641 * Size in GB of the boot disk (default is 100GB). 642 * </pre> 643 * 644 * <code>int32 boot_disk_size_gb = 2;</code> 645 * 646 * @param value The bootDiskSizeGb to set. 647 * @return This builder for chaining. 648 */ setBootDiskSizeGb(int value)649 public Builder setBootDiskSizeGb(int value) { 650 651 bootDiskSizeGb_ = value; 652 bitField0_ |= 0x00000002; 653 onChanged(); 654 return this; 655 } 656 /** 657 * 658 * 659 * <pre> 660 * Size in GB of the boot disk (default is 100GB). 661 * </pre> 662 * 663 * <code>int32 boot_disk_size_gb = 2;</code> 664 * 665 * @return This builder for chaining. 666 */ clearBootDiskSizeGb()667 public Builder clearBootDiskSizeGb() { 668 bitField0_ = (bitField0_ & ~0x00000002); 669 bootDiskSizeGb_ = 0; 670 onChanged(); 671 return this; 672 } 673 674 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)675 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 676 return super.setUnknownFields(unknownFields); 677 } 678 679 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)680 public final Builder mergeUnknownFields( 681 final com.google.protobuf.UnknownFieldSet unknownFields) { 682 return super.mergeUnknownFields(unknownFields); 683 } 684 685 // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DiskSpec) 686 } 687 688 // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DiskSpec) 689 private static final com.google.cloud.aiplatform.v1.DiskSpec DEFAULT_INSTANCE; 690 691 static { 692 DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DiskSpec(); 693 } 694 getDefaultInstance()695 public static com.google.cloud.aiplatform.v1.DiskSpec getDefaultInstance() { 696 return DEFAULT_INSTANCE; 697 } 698 699 private static final com.google.protobuf.Parser<DiskSpec> PARSER = 700 new com.google.protobuf.AbstractParser<DiskSpec>() { 701 @java.lang.Override 702 public DiskSpec parsePartialFrom( 703 com.google.protobuf.CodedInputStream input, 704 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 705 throws com.google.protobuf.InvalidProtocolBufferException { 706 Builder builder = newBuilder(); 707 try { 708 builder.mergeFrom(input, extensionRegistry); 709 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 710 throw e.setUnfinishedMessage(builder.buildPartial()); 711 } catch (com.google.protobuf.UninitializedMessageException e) { 712 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 713 } catch (java.io.IOException e) { 714 throw new com.google.protobuf.InvalidProtocolBufferException(e) 715 .setUnfinishedMessage(builder.buildPartial()); 716 } 717 return builder.buildPartial(); 718 } 719 }; 720 parser()721 public static com.google.protobuf.Parser<DiskSpec> parser() { 722 return PARSER; 723 } 724 725 @java.lang.Override getParserForType()726 public com.google.protobuf.Parser<DiskSpec> getParserForType() { 727 return PARSER; 728 } 729 730 @java.lang.Override getDefaultInstanceForType()731 public com.google.cloud.aiplatform.v1.DiskSpec getDefaultInstanceForType() { 732 return DEFAULT_INSTANCE; 733 } 734 } 735