Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit c1cbff1

Browse files
feat: support for NodeAutoprovisioning ImageType (#474)
PiperOrigin-RevId: 378163331 Source-Author: Google APIs <noreply@google.com> Source-Date: Tue Jun 8 08:53:55 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: e610c3bbc75e66fcfd5d7c46fab225c5978700df Source-Link: googleapis/googleapis@e610c3b
1 parent 2a354ae commit c1cbff1

File tree

5 files changed

+537
-329
lines changed

5 files changed

+537
-329
lines changed

proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AutoprovisioningNodePoolDefaults.java

+179
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ private AutoprovisioningNodePoolDefaults() {
4545
minCpuPlatform_ = "";
4646
diskType_ = "";
4747
bootDiskKmsKey_ = "";
48+
imageType_ = "";
4849
}
4950

5051
@java.lang.Override
@@ -168,6 +169,13 @@ private AutoprovisioningNodePoolDefaults(
168169
bootDiskKmsKey_ = s;
169170
break;
170171
}
172+
case 82:
173+
{
174+
java.lang.String s = input.readStringRequireUtf8();
175+
176+
imageType_ = s;
177+
break;
178+
}
171179
default:
172180
{
173181
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -657,6 +665,55 @@ public com.google.protobuf.ByteString getBootDiskKmsKeyBytes() {
657665
}
658666
}
659667

668+
public static final int IMAGE_TYPE_FIELD_NUMBER = 10;
669+
private volatile java.lang.Object imageType_;
670+
/**
671+
*
672+
*
673+
* <pre>
674+
* The image type to use for NAP created node.
675+
* </pre>
676+
*
677+
* <code>string image_type = 10;</code>
678+
*
679+
* @return The imageType.
680+
*/
681+
@java.lang.Override
682+
public java.lang.String getImageType() {
683+
java.lang.Object ref = imageType_;
684+
if (ref instanceof java.lang.String) {
685+
return (java.lang.String) ref;
686+
} else {
687+
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
688+
java.lang.String s = bs.toStringUtf8();
689+
imageType_ = s;
690+
return s;
691+
}
692+
}
693+
/**
694+
*
695+
*
696+
* <pre>
697+
* The image type to use for NAP created node.
698+
* </pre>
699+
*
700+
* <code>string image_type = 10;</code>
701+
*
702+
* @return The bytes for imageType.
703+
*/
704+
@java.lang.Override
705+
public com.google.protobuf.ByteString getImageTypeBytes() {
706+
java.lang.Object ref = imageType_;
707+
if (ref instanceof java.lang.String) {
708+
com.google.protobuf.ByteString b =
709+
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
710+
imageType_ = b;
711+
return b;
712+
} else {
713+
return (com.google.protobuf.ByteString) ref;
714+
}
715+
}
716+
660717
private byte memoizedIsInitialized = -1;
661718

662719
@java.lang.Override
@@ -698,6 +755,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
698755
if (!getBootDiskKmsKeyBytes().isEmpty()) {
699756
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, bootDiskKmsKey_);
700757
}
758+
if (!getImageTypeBytes().isEmpty()) {
759+
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, imageType_);
760+
}
701761
unknownFields.writeTo(output);
702762
}
703763

@@ -740,6 +800,9 @@ public int getSerializedSize() {
740800
if (!getBootDiskKmsKeyBytes().isEmpty()) {
741801
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, bootDiskKmsKey_);
742802
}
803+
if (!getImageTypeBytes().isEmpty()) {
804+
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, imageType_);
805+
}
743806
size += unknownFields.getSerializedSize();
744807
memoizedSize = size;
745808
return size;
@@ -774,6 +837,7 @@ public boolean equals(final java.lang.Object obj) {
774837
if (!getShieldedInstanceConfig().equals(other.getShieldedInstanceConfig())) return false;
775838
}
776839
if (!getBootDiskKmsKey().equals(other.getBootDiskKmsKey())) return false;
840+
if (!getImageType().equals(other.getImageType())) return false;
777841
if (!unknownFields.equals(other.unknownFields)) return false;
778842
return true;
779843
}
@@ -811,6 +875,8 @@ public int hashCode() {
811875
}
812876
hash = (37 * hash) + BOOT_DISK_KMS_KEY_FIELD_NUMBER;
813877
hash = (53 * hash) + getBootDiskKmsKey().hashCode();
878+
hash = (37 * hash) + IMAGE_TYPE_FIELD_NUMBER;
879+
hash = (53 * hash) + getImageType().hashCode();
814880
hash = (29 * hash) + unknownFields.hashCode();
815881
memoizedHashCode = hash;
816882
return hash;
@@ -988,6 +1054,8 @@ public Builder clear() {
9881054
}
9891055
bootDiskKmsKey_ = "";
9901056

1057+
imageType_ = "";
1058+
9911059
return this;
9921060
}
9931061

@@ -1041,6 +1109,7 @@ public com.google.container.v1.AutoprovisioningNodePoolDefaults buildPartial() {
10411109
result.shieldedInstanceConfig_ = shieldedInstanceConfigBuilder_.build();
10421110
}
10431111
result.bootDiskKmsKey_ = bootDiskKmsKey_;
1112+
result.imageType_ = imageType_;
10441113
onBuilt();
10451114
return result;
10461115
}
@@ -1129,6 +1198,10 @@ public Builder mergeFrom(com.google.container.v1.AutoprovisioningNodePoolDefault
11291198
bootDiskKmsKey_ = other.bootDiskKmsKey_;
11301199
onChanged();
11311200
}
1201+
if (!other.getImageType().isEmpty()) {
1202+
imageType_ = other.imageType_;
1203+
onChanged();
1204+
}
11321205
this.mergeUnknownFields(other.unknownFields);
11331206
onChanged();
11341207
return this;
@@ -2446,6 +2519,112 @@ public Builder setBootDiskKmsKeyBytes(com.google.protobuf.ByteString value) {
24462519
return this;
24472520
}
24482521

2522+
private java.lang.Object imageType_ = "";
2523+
/**
2524+
*
2525+
*
2526+
* <pre>
2527+
* The image type to use for NAP created node.
2528+
* </pre>
2529+
*
2530+
* <code>string image_type = 10;</code>
2531+
*
2532+
* @return The imageType.
2533+
*/
2534+
public java.lang.String getImageType() {
2535+
java.lang.Object ref = imageType_;
2536+
if (!(ref instanceof java.lang.String)) {
2537+
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2538+
java.lang.String s = bs.toStringUtf8();
2539+
imageType_ = s;
2540+
return s;
2541+
} else {
2542+
return (java.lang.String) ref;
2543+
}
2544+
}
2545+
/**
2546+
*
2547+
*
2548+
* <pre>
2549+
* The image type to use for NAP created node.
2550+
* </pre>
2551+
*
2552+
* <code>string image_type = 10;</code>
2553+
*
2554+
* @return The bytes for imageType.
2555+
*/
2556+
public com.google.protobuf.ByteString getImageTypeBytes() {
2557+
java.lang.Object ref = imageType_;
2558+
if (ref instanceof String) {
2559+
com.google.protobuf.ByteString b =
2560+
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2561+
imageType_ = b;
2562+
return b;
2563+
} else {
2564+
return (com.google.protobuf.ByteString) ref;
2565+
}
2566+
}
2567+
/**
2568+
*
2569+
*
2570+
* <pre>
2571+
* The image type to use for NAP created node.
2572+
* </pre>
2573+
*
2574+
* <code>string image_type = 10;</code>
2575+
*
2576+
* @param value The imageType to set.
2577+
* @return This builder for chaining.
2578+
*/
2579+
public Builder setImageType(java.lang.String value) {
2580+
if (value == null) {
2581+
throw new NullPointerException();
2582+
}
2583+
2584+
imageType_ = value;
2585+
onChanged();
2586+
return this;
2587+
}
2588+
/**
2589+
*
2590+
*
2591+
* <pre>
2592+
* The image type to use for NAP created node.
2593+
* </pre>
2594+
*
2595+
* <code>string image_type = 10;</code>
2596+
*
2597+
* @return This builder for chaining.
2598+
*/
2599+
public Builder clearImageType() {
2600+
2601+
imageType_ = getDefaultInstance().getImageType();
2602+
onChanged();
2603+
return this;
2604+
}
2605+
/**
2606+
*
2607+
*
2608+
* <pre>
2609+
* The image type to use for NAP created node.
2610+
* </pre>
2611+
*
2612+
* <code>string image_type = 10;</code>
2613+
*
2614+
* @param value The bytes for imageType to set.
2615+
* @return This builder for chaining.
2616+
*/
2617+
public Builder setImageTypeBytes(com.google.protobuf.ByteString value) {
2618+
if (value == null) {
2619+
throw new NullPointerException();
2620+
}
2621+
checkByteStringIsUtf8(value);
2622+
2623+
imageType_ = value;
2624+
onChanged();
2625+
return this;
2626+
}
2627+
24492628
@java.lang.Override
24502629
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
24512630
return super.setUnknownFields(unknownFields);

proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AutoprovisioningNodePoolDefaultsOrBuilder.java

+25
Original file line numberDiff line numberDiff line change
@@ -323,4 +323,29 @@ public interface AutoprovisioningNodePoolDefaultsOrBuilder
323323
* @return The bytes for bootDiskKmsKey.
324324
*/
325325
com.google.protobuf.ByteString getBootDiskKmsKeyBytes();
326+
327+
/**
328+
*
329+
*
330+
* <pre>
331+
* The image type to use for NAP created node.
332+
* </pre>
333+
*
334+
* <code>string image_type = 10;</code>
335+
*
336+
* @return The imageType.
337+
*/
338+
java.lang.String getImageType();
339+
/**
340+
*
341+
*
342+
* <pre>
343+
* The image type to use for NAP created node.
344+
* </pre>
345+
*
346+
* <code>string image_type = 10;</code>
347+
*
348+
* @return The bytes for imageType.
349+
*/
350+
com.google.protobuf.ByteString getImageTypeBytes();
326351
}

0 commit comments

Comments
 (0)