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

feat: support for NodeAutoprovisioning ImageType #474

Merged
merged 1 commit into from Jun 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -45,6 +45,7 @@ private AutoprovisioningNodePoolDefaults() {
minCpuPlatform_ = "";
diskType_ = "";
bootDiskKmsKey_ = "";
imageType_ = "";
}

@java.lang.Override
Expand Down Expand Up @@ -168,6 +169,13 @@ private AutoprovisioningNodePoolDefaults(
bootDiskKmsKey_ = s;
break;
}
case 82:
{
java.lang.String s = input.readStringRequireUtf8();

imageType_ = s;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
Expand Down Expand Up @@ -657,6 +665,55 @@ public com.google.protobuf.ByteString getBootDiskKmsKeyBytes() {
}
}

public static final int IMAGE_TYPE_FIELD_NUMBER = 10;
private volatile java.lang.Object imageType_;
/**
*
*
* <pre>
* The image type to use for NAP created node.
* </pre>
*
* <code>string image_type = 10;</code>
*
* @return The imageType.
*/
@java.lang.Override
public java.lang.String getImageType() {
java.lang.Object ref = imageType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
imageType_ = s;
return s;
}
}
/**
*
*
* <pre>
* The image type to use for NAP created node.
* </pre>
*
* <code>string image_type = 10;</code>
*
* @return The bytes for imageType.
*/
@java.lang.Override
public com.google.protobuf.ByteString getImageTypeBytes() {
java.lang.Object ref = imageType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
imageType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand Down Expand Up @@ -698,6 +755,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!getBootDiskKmsKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, bootDiskKmsKey_);
}
if (!getImageTypeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, imageType_);
}
unknownFields.writeTo(output);
}

Expand Down Expand Up @@ -740,6 +800,9 @@ public int getSerializedSize() {
if (!getBootDiskKmsKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, bootDiskKmsKey_);
}
if (!getImageTypeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, imageType_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
Expand Down Expand Up @@ -774,6 +837,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getShieldedInstanceConfig().equals(other.getShieldedInstanceConfig())) return false;
}
if (!getBootDiskKmsKey().equals(other.getBootDiskKmsKey())) return false;
if (!getImageType().equals(other.getImageType())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
Expand Down Expand Up @@ -811,6 +875,8 @@ public int hashCode() {
}
hash = (37 * hash) + BOOT_DISK_KMS_KEY_FIELD_NUMBER;
hash = (53 * hash) + getBootDiskKmsKey().hashCode();
hash = (37 * hash) + IMAGE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getImageType().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
Expand Down Expand Up @@ -988,6 +1054,8 @@ public Builder clear() {
}
bootDiskKmsKey_ = "";

imageType_ = "";

return this;
}

Expand Down Expand Up @@ -1041,6 +1109,7 @@ public com.google.container.v1.AutoprovisioningNodePoolDefaults buildPartial() {
result.shieldedInstanceConfig_ = shieldedInstanceConfigBuilder_.build();
}
result.bootDiskKmsKey_ = bootDiskKmsKey_;
result.imageType_ = imageType_;
onBuilt();
return result;
}
Expand Down Expand Up @@ -1129,6 +1198,10 @@ public Builder mergeFrom(com.google.container.v1.AutoprovisioningNodePoolDefault
bootDiskKmsKey_ = other.bootDiskKmsKey_;
onChanged();
}
if (!other.getImageType().isEmpty()) {
imageType_ = other.imageType_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
Expand Down Expand Up @@ -2446,6 +2519,112 @@ public Builder setBootDiskKmsKeyBytes(com.google.protobuf.ByteString value) {
return this;
}

private java.lang.Object imageType_ = "";
/**
*
*
* <pre>
* The image type to use for NAP created node.
* </pre>
*
* <code>string image_type = 10;</code>
*
* @return The imageType.
*/
public java.lang.String getImageType() {
java.lang.Object ref = imageType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
imageType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
* <pre>
* The image type to use for NAP created node.
* </pre>
*
* <code>string image_type = 10;</code>
*
* @return The bytes for imageType.
*/
public com.google.protobuf.ByteString getImageTypeBytes() {
java.lang.Object ref = imageType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
imageType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
* <pre>
* The image type to use for NAP created node.
* </pre>
*
* <code>string image_type = 10;</code>
*
* @param value The imageType to set.
* @return This builder for chaining.
*/
public Builder setImageType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}

imageType_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* The image type to use for NAP created node.
* </pre>
*
* <code>string image_type = 10;</code>
*
* @return This builder for chaining.
*/
public Builder clearImageType() {

imageType_ = getDefaultInstance().getImageType();
onChanged();
return this;
}
/**
*
*
* <pre>
* The image type to use for NAP created node.
* </pre>
*
* <code>string image_type = 10;</code>
*
* @param value The bytes for imageType to set.
* @return This builder for chaining.
*/
public Builder setImageTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);

imageType_ = value;
onChanged();
return this;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Expand Up @@ -323,4 +323,29 @@ public interface AutoprovisioningNodePoolDefaultsOrBuilder
* @return The bytes for bootDiskKmsKey.
*/
com.google.protobuf.ByteString getBootDiskKmsKeyBytes();

/**
*
*
* <pre>
* The image type to use for NAP created node.
* </pre>
*
* <code>string image_type = 10;</code>
*
* @return The imageType.
*/
java.lang.String getImageType();
/**
*
*
* <pre>
* The image type to use for NAP created node.
* </pre>
*
* <code>string image_type = 10;</code>
*
* @return The bytes for imageType.
*/
com.google.protobuf.ByteString getImageTypeBytes();
}