Skip to content

Commit 4db5bc4

Browse files
feat: [container] added configuration for the StatefulHA addon to the AddonsConfig (#10345)
* feat: added configuration for the StatefulHA addon to the AddonsConfig PiperOrigin-RevId: 604687474 Source-Link: googleapis/googleapis@8b16254 Source-Link: https://github.com/googleapis/googleapis-gen/commit/758959f1dd5f6152920ef42c71d54bcc2bff0283 Copy-Tag: eyJwIjoiamF2YS1jb250YWluZXIvLk93bEJvdC55YW1sIiwiaCI6Ijc1ODk1OWYxZGQ1ZjYxNTI5MjBlZjQyYzcxZDU0YmNjMmJmZjAyODMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 471fafd commit 4db5bc4

File tree

79 files changed

+3096
-2144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3096
-2144
lines changed

java-container/google-cloud-container/src/main/resources/META-INF/native-image/com.google.cloud.container.v1/reflect-config.json

+18
Original file line numberDiff line numberDiff line change
@@ -3617,6 +3617,24 @@
36173617
"allDeclaredClasses": true,
36183618
"allPublicClasses": true
36193619
},
3620+
{
3621+
"name": "com.google.container.v1.StatefulHAConfig",
3622+
"queryAllDeclaredConstructors": true,
3623+
"queryAllPublicConstructors": true,
3624+
"queryAllDeclaredMethods": true,
3625+
"allPublicMethods": true,
3626+
"allDeclaredClasses": true,
3627+
"allPublicClasses": true
3628+
},
3629+
{
3630+
"name": "com.google.container.v1.StatefulHAConfig$Builder",
3631+
"queryAllDeclaredConstructors": true,
3632+
"queryAllPublicConstructors": true,
3633+
"queryAllDeclaredMethods": true,
3634+
"allPublicMethods": true,
3635+
"allDeclaredClasses": true,
3636+
"allPublicClasses": true
3637+
},
36203638
{
36213639
"name": "com.google.container.v1.StatusCondition",
36223640
"queryAllDeclaredConstructors": true,

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

+295
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,62 @@ public com.google.container.v1.GcsFuseCsiDriverConfig getGcsFuseCsiDriverConfig(
672672
: gcsFuseCsiDriverConfig_;
673673
}
674674

675+
public static final int STATEFUL_HA_CONFIG_FIELD_NUMBER = 18;
676+
private com.google.container.v1.StatefulHAConfig statefulHaConfig_;
677+
/**
678+
*
679+
*
680+
* <pre>
681+
* Optional. Configuration for the StatefulHA add-on.
682+
* </pre>
683+
*
684+
* <code>
685+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
686+
* </code>
687+
*
688+
* @return Whether the statefulHaConfig field is set.
689+
*/
690+
@java.lang.Override
691+
public boolean hasStatefulHaConfig() {
692+
return ((bitField0_ & 0x00000800) != 0);
693+
}
694+
/**
695+
*
696+
*
697+
* <pre>
698+
* Optional. Configuration for the StatefulHA add-on.
699+
* </pre>
700+
*
701+
* <code>
702+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
703+
* </code>
704+
*
705+
* @return The statefulHaConfig.
706+
*/
707+
@java.lang.Override
708+
public com.google.container.v1.StatefulHAConfig getStatefulHaConfig() {
709+
return statefulHaConfig_ == null
710+
? com.google.container.v1.StatefulHAConfig.getDefaultInstance()
711+
: statefulHaConfig_;
712+
}
713+
/**
714+
*
715+
*
716+
* <pre>
717+
* Optional. Configuration for the StatefulHA add-on.
718+
* </pre>
719+
*
720+
* <code>
721+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
722+
* </code>
723+
*/
724+
@java.lang.Override
725+
public com.google.container.v1.StatefulHAConfigOrBuilder getStatefulHaConfigOrBuilder() {
726+
return statefulHaConfig_ == null
727+
? com.google.container.v1.StatefulHAConfig.getDefaultInstance()
728+
: statefulHaConfig_;
729+
}
730+
675731
private byte memoizedIsInitialized = -1;
676732

677733
@java.lang.Override
@@ -719,6 +775,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
719775
if (((bitField0_ & 0x00000400) != 0)) {
720776
output.writeMessage(17, getGcsFuseCsiDriverConfig());
721777
}
778+
if (((bitField0_ & 0x00000800) != 0)) {
779+
output.writeMessage(18, getStatefulHaConfig());
780+
}
722781
getUnknownFields().writeTo(output);
723782
}
724783

@@ -770,6 +829,9 @@ public int getSerializedSize() {
770829
size +=
771830
com.google.protobuf.CodedOutputStream.computeMessageSize(17, getGcsFuseCsiDriverConfig());
772831
}
832+
if (((bitField0_ & 0x00000800) != 0)) {
833+
size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getStatefulHaConfig());
834+
}
773835
size += getUnknownFields().getSerializedSize();
774836
memoizedSize = size;
775837
return size;
@@ -832,6 +894,10 @@ public boolean equals(final java.lang.Object obj) {
832894
if (hasGcsFuseCsiDriverConfig()) {
833895
if (!getGcsFuseCsiDriverConfig().equals(other.getGcsFuseCsiDriverConfig())) return false;
834896
}
897+
if (hasStatefulHaConfig() != other.hasStatefulHaConfig()) return false;
898+
if (hasStatefulHaConfig()) {
899+
if (!getStatefulHaConfig().equals(other.getStatefulHaConfig())) return false;
900+
}
835901
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
836902
return true;
837903
}
@@ -887,6 +953,10 @@ public int hashCode() {
887953
hash = (37 * hash) + GCS_FUSE_CSI_DRIVER_CONFIG_FIELD_NUMBER;
888954
hash = (53 * hash) + getGcsFuseCsiDriverConfig().hashCode();
889955
}
956+
if (hasStatefulHaConfig()) {
957+
hash = (37 * hash) + STATEFUL_HA_CONFIG_FIELD_NUMBER;
958+
hash = (53 * hash) + getStatefulHaConfig().hashCode();
959+
}
890960
hash = (29 * hash) + getUnknownFields().hashCode();
891961
memoizedHashCode = hash;
892962
return hash;
@@ -1038,6 +1108,7 @@ private void maybeForceBuilderInitialization() {
10381108
getGcpFilestoreCsiDriverConfigFieldBuilder();
10391109
getGkeBackupAgentConfigFieldBuilder();
10401110
getGcsFuseCsiDriverConfigFieldBuilder();
1111+
getStatefulHaConfigFieldBuilder();
10411112
}
10421113
}
10431114

@@ -1100,6 +1171,11 @@ public Builder clear() {
11001171
gcsFuseCsiDriverConfigBuilder_.dispose();
11011172
gcsFuseCsiDriverConfigBuilder_ = null;
11021173
}
1174+
statefulHaConfig_ = null;
1175+
if (statefulHaConfigBuilder_ != null) {
1176+
statefulHaConfigBuilder_.dispose();
1177+
statefulHaConfigBuilder_ = null;
1178+
}
11031179
return this;
11041180
}
11051181

@@ -1209,6 +1285,11 @@ private void buildPartial0(com.google.container.v1.AddonsConfig result) {
12091285
: gcsFuseCsiDriverConfigBuilder_.build();
12101286
to_bitField0_ |= 0x00000400;
12111287
}
1288+
if (((from_bitField0_ & 0x00000800) != 0)) {
1289+
result.statefulHaConfig_ =
1290+
statefulHaConfigBuilder_ == null ? statefulHaConfig_ : statefulHaConfigBuilder_.build();
1291+
to_bitField0_ |= 0x00000800;
1292+
}
12121293
result.bitField0_ |= to_bitField0_;
12131294
}
12141295

@@ -1290,6 +1371,9 @@ public Builder mergeFrom(com.google.container.v1.AddonsConfig other) {
12901371
if (other.hasGcsFuseCsiDriverConfig()) {
12911372
mergeGcsFuseCsiDriverConfig(other.getGcsFuseCsiDriverConfig());
12921373
}
1374+
if (other.hasStatefulHaConfig()) {
1375+
mergeStatefulHaConfig(other.getStatefulHaConfig());
1376+
}
12931377
this.mergeUnknownFields(other.getUnknownFields());
12941378
onChanged();
12951379
return this;
@@ -1392,6 +1476,13 @@ public Builder mergeFrom(
13921476
bitField0_ |= 0x00000400;
13931477
break;
13941478
} // case 138
1479+
case 146:
1480+
{
1481+
input.readMessage(
1482+
getStatefulHaConfigFieldBuilder().getBuilder(), extensionRegistry);
1483+
bitField0_ |= 0x00000800;
1484+
break;
1485+
} // case 146
13951486
default:
13961487
{
13971488
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -3632,6 +3723,210 @@ public Builder clearGcsFuseCsiDriverConfig() {
36323723
return gcsFuseCsiDriverConfigBuilder_;
36333724
}
36343725

3726+
private com.google.container.v1.StatefulHAConfig statefulHaConfig_;
3727+
private com.google.protobuf.SingleFieldBuilderV3<
3728+
com.google.container.v1.StatefulHAConfig,
3729+
com.google.container.v1.StatefulHAConfig.Builder,
3730+
com.google.container.v1.StatefulHAConfigOrBuilder>
3731+
statefulHaConfigBuilder_;
3732+
/**
3733+
*
3734+
*
3735+
* <pre>
3736+
* Optional. Configuration for the StatefulHA add-on.
3737+
* </pre>
3738+
*
3739+
* <code>
3740+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
3741+
* </code>
3742+
*
3743+
* @return Whether the statefulHaConfig field is set.
3744+
*/
3745+
public boolean hasStatefulHaConfig() {
3746+
return ((bitField0_ & 0x00000800) != 0);
3747+
}
3748+
/**
3749+
*
3750+
*
3751+
* <pre>
3752+
* Optional. Configuration for the StatefulHA add-on.
3753+
* </pre>
3754+
*
3755+
* <code>
3756+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
3757+
* </code>
3758+
*
3759+
* @return The statefulHaConfig.
3760+
*/
3761+
public com.google.container.v1.StatefulHAConfig getStatefulHaConfig() {
3762+
if (statefulHaConfigBuilder_ == null) {
3763+
return statefulHaConfig_ == null
3764+
? com.google.container.v1.StatefulHAConfig.getDefaultInstance()
3765+
: statefulHaConfig_;
3766+
} else {
3767+
return statefulHaConfigBuilder_.getMessage();
3768+
}
3769+
}
3770+
/**
3771+
*
3772+
*
3773+
* <pre>
3774+
* Optional. Configuration for the StatefulHA add-on.
3775+
* </pre>
3776+
*
3777+
* <code>
3778+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
3779+
* </code>
3780+
*/
3781+
public Builder setStatefulHaConfig(com.google.container.v1.StatefulHAConfig value) {
3782+
if (statefulHaConfigBuilder_ == null) {
3783+
if (value == null) {
3784+
throw new NullPointerException();
3785+
}
3786+
statefulHaConfig_ = value;
3787+
} else {
3788+
statefulHaConfigBuilder_.setMessage(value);
3789+
}
3790+
bitField0_ |= 0x00000800;
3791+
onChanged();
3792+
return this;
3793+
}
3794+
/**
3795+
*
3796+
*
3797+
* <pre>
3798+
* Optional. Configuration for the StatefulHA add-on.
3799+
* </pre>
3800+
*
3801+
* <code>
3802+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
3803+
* </code>
3804+
*/
3805+
public Builder setStatefulHaConfig(
3806+
com.google.container.v1.StatefulHAConfig.Builder builderForValue) {
3807+
if (statefulHaConfigBuilder_ == null) {
3808+
statefulHaConfig_ = builderForValue.build();
3809+
} else {
3810+
statefulHaConfigBuilder_.setMessage(builderForValue.build());
3811+
}
3812+
bitField0_ |= 0x00000800;
3813+
onChanged();
3814+
return this;
3815+
}
3816+
/**
3817+
*
3818+
*
3819+
* <pre>
3820+
* Optional. Configuration for the StatefulHA add-on.
3821+
* </pre>
3822+
*
3823+
* <code>
3824+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
3825+
* </code>
3826+
*/
3827+
public Builder mergeStatefulHaConfig(com.google.container.v1.StatefulHAConfig value) {
3828+
if (statefulHaConfigBuilder_ == null) {
3829+
if (((bitField0_ & 0x00000800) != 0)
3830+
&& statefulHaConfig_ != null
3831+
&& statefulHaConfig_ != com.google.container.v1.StatefulHAConfig.getDefaultInstance()) {
3832+
getStatefulHaConfigBuilder().mergeFrom(value);
3833+
} else {
3834+
statefulHaConfig_ = value;
3835+
}
3836+
} else {
3837+
statefulHaConfigBuilder_.mergeFrom(value);
3838+
}
3839+
if (statefulHaConfig_ != null) {
3840+
bitField0_ |= 0x00000800;
3841+
onChanged();
3842+
}
3843+
return this;
3844+
}
3845+
/**
3846+
*
3847+
*
3848+
* <pre>
3849+
* Optional. Configuration for the StatefulHA add-on.
3850+
* </pre>
3851+
*
3852+
* <code>
3853+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
3854+
* </code>
3855+
*/
3856+
public Builder clearStatefulHaConfig() {
3857+
bitField0_ = (bitField0_ & ~0x00000800);
3858+
statefulHaConfig_ = null;
3859+
if (statefulHaConfigBuilder_ != null) {
3860+
statefulHaConfigBuilder_.dispose();
3861+
statefulHaConfigBuilder_ = null;
3862+
}
3863+
onChanged();
3864+
return this;
3865+
}
3866+
/**
3867+
*
3868+
*
3869+
* <pre>
3870+
* Optional. Configuration for the StatefulHA add-on.
3871+
* </pre>
3872+
*
3873+
* <code>
3874+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
3875+
* </code>
3876+
*/
3877+
public com.google.container.v1.StatefulHAConfig.Builder getStatefulHaConfigBuilder() {
3878+
bitField0_ |= 0x00000800;
3879+
onChanged();
3880+
return getStatefulHaConfigFieldBuilder().getBuilder();
3881+
}
3882+
/**
3883+
*
3884+
*
3885+
* <pre>
3886+
* Optional. Configuration for the StatefulHA add-on.
3887+
* </pre>
3888+
*
3889+
* <code>
3890+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
3891+
* </code>
3892+
*/
3893+
public com.google.container.v1.StatefulHAConfigOrBuilder getStatefulHaConfigOrBuilder() {
3894+
if (statefulHaConfigBuilder_ != null) {
3895+
return statefulHaConfigBuilder_.getMessageOrBuilder();
3896+
} else {
3897+
return statefulHaConfig_ == null
3898+
? com.google.container.v1.StatefulHAConfig.getDefaultInstance()
3899+
: statefulHaConfig_;
3900+
}
3901+
}
3902+
/**
3903+
*
3904+
*
3905+
* <pre>
3906+
* Optional. Configuration for the StatefulHA add-on.
3907+
* </pre>
3908+
*
3909+
* <code>
3910+
* .google.container.v1.StatefulHAConfig stateful_ha_config = 18 [(.google.api.field_behavior) = OPTIONAL];
3911+
* </code>
3912+
*/
3913+
private com.google.protobuf.SingleFieldBuilderV3<
3914+
com.google.container.v1.StatefulHAConfig,
3915+
com.google.container.v1.StatefulHAConfig.Builder,
3916+
com.google.container.v1.StatefulHAConfigOrBuilder>
3917+
getStatefulHaConfigFieldBuilder() {
3918+
if (statefulHaConfigBuilder_ == null) {
3919+
statefulHaConfigBuilder_ =
3920+
new com.google.protobuf.SingleFieldBuilderV3<
3921+
com.google.container.v1.StatefulHAConfig,
3922+
com.google.container.v1.StatefulHAConfig.Builder,
3923+
com.google.container.v1.StatefulHAConfigOrBuilder>(
3924+
getStatefulHaConfig(), getParentForChildren(), isClean());
3925+
statefulHaConfig_ = null;
3926+
}
3927+
return statefulHaConfigBuilder_;
3928+
}
3929+
36353930
@java.lang.Override
36363931
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
36373932
return super.setUnknownFields(unknownFields);

0 commit comments

Comments
 (0)