Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: [container] improve API documentation for Binary Authorization #10063

Merged
merged 10 commits into from Nov 27, 2023
4 changes: 2 additions & 2 deletions java-container/README.md
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.26.0</version>
<version>26.27.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-container.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-container/2.32.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-container/2.33.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Expand Up @@ -2501,6 +2501,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.container.v1.NodePool$QueuedProvisioning",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.container.v1.NodePool$QueuedProvisioning$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.container.v1.NodePool$Status",
"queryAllDeclaredConstructors": true,
Expand Down
Expand Up @@ -593,6 +593,33 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.container.v1beta1.AutopilotConversionStatus",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.container.v1beta1.AutopilotConversionStatus$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.container.v1beta1.AutopilotConversionStatus$State",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.container.v1beta1.AutoprovisioningNodePoolDefaults",
"queryAllDeclaredConstructors": true,
Expand Down Expand Up @@ -2753,6 +2780,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.container.v1beta1.NodePool$QueuedProvisioning",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.container.v1beta1.NodePool$QueuedProvisioning$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.container.v1beta1.NodePool$Status",
"queryAllDeclaredConstructors": true,
Expand Down
Expand Up @@ -2094,6 +2094,7 @@ public void getNodePoolTest() throws Exception {
.setPlacementPolicy(NodePool.PlacementPolicy.newBuilder().build())
.setUpdateInfo(NodePool.UpdateInfo.newBuilder().build())
.setEtag("etag3123477")
.setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build())
.setBestEffortProvisioning(BestEffortProvisioning.newBuilder().build())
.build();
mockClusterManager.addResponse(expectedResponse);
Expand Down Expand Up @@ -2150,6 +2151,7 @@ public void getNodePoolTest2() throws Exception {
.setPlacementPolicy(NodePool.PlacementPolicy.newBuilder().build())
.setUpdateInfo(NodePool.UpdateInfo.newBuilder().build())
.setEtag("etag3123477")
.setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build())
.setBestEffortProvisioning(BestEffortProvisioning.newBuilder().build())
.build();
mockClusterManager.addResponse(expectedResponse);
Expand Down
Expand Up @@ -1389,6 +1389,7 @@ public void getNodePoolTest() throws Exception {
.setPlacementPolicy(NodePool.PlacementPolicy.newBuilder().build())
.setUpdateInfo(NodePool.UpdateInfo.newBuilder().build())
.setEtag("etag3123477")
.setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build())
.setBestEffortProvisioning(BestEffortProvisioning.newBuilder().build())
.build();
mockClusterManager.addResponse(expectedResponse);
Expand Down
Expand Up @@ -246,6 +246,7 @@ private RelayMode(int value) {
// @@protoc_insertion_point(enum_scope:google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode)
}

private int bitField0_;
public static final int ENABLE_METRICS_FIELD_NUMBER = 1;
private boolean enableMetrics_ = false;
/**
Expand Down Expand Up @@ -301,6 +302,39 @@ public com.google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode get
: result;
}

public static final int ENABLE_RELAY_FIELD_NUMBER = 3;
private boolean enableRelay_ = false;
/**
*
*
* <pre>
* Enable Relay component
* </pre>
*
* <code>optional bool enable_relay = 3;</code>
*
* @return Whether the enableRelay field is set.
*/
@java.lang.Override
public boolean hasEnableRelay() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
* <pre>
* Enable Relay component
* </pre>
*
* <code>optional bool enable_relay = 3;</code>
*
* @return The enableRelay.
*/
@java.lang.Override
public boolean getEnableRelay() {
return enableRelay_;
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand All @@ -324,6 +358,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
.getNumber()) {
output.writeEnum(2, relayMode_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeBool(3, enableRelay_);
}
getUnknownFields().writeTo(output);
}

Expand All @@ -342,6 +379,9 @@ public int getSerializedSize() {
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, relayMode_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableRelay_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
Expand All @@ -360,6 +400,10 @@ public boolean equals(final java.lang.Object obj) {

if (getEnableMetrics() != other.getEnableMetrics()) return false;
if (relayMode_ != other.relayMode_) return false;
if (hasEnableRelay() != other.hasEnableRelay()) return false;
if (hasEnableRelay()) {
if (getEnableRelay() != other.getEnableRelay()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
Expand All @@ -375,6 +419,10 @@ public int hashCode() {
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableMetrics());
hash = (37 * hash) + RELAY_MODE_FIELD_NUMBER;
hash = (53 * hash) + relayMode_;
if (hasEnableRelay()) {
hash = (37 * hash) + ENABLE_RELAY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableRelay());
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
Expand Down Expand Up @@ -518,6 +566,7 @@ public Builder clear() {
bitField0_ = 0;
enableMetrics_ = false;
relayMode_ = 0;
enableRelay_ = false;
return this;
}

Expand Down Expand Up @@ -560,6 +609,12 @@ private void buildPartial0(com.google.container.v1.AdvancedDatapathObservability
if (((from_bitField0_ & 0x00000002) != 0)) {
result.relayMode_ = relayMode_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.enableRelay_ = enableRelay_;
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}

@java.lang.Override
Expand Down Expand Up @@ -614,6 +669,9 @@ public Builder mergeFrom(com.google.container.v1.AdvancedDatapathObservabilityCo
if (other.relayMode_ != 0) {
setRelayModeValue(other.getRelayModeValue());
}
if (other.hasEnableRelay()) {
setEnableRelay(other.getEnableRelay());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
Expand Down Expand Up @@ -652,6 +710,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000002;
break;
} // case 16
case 24:
{
enableRelay_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
Expand Down Expand Up @@ -823,6 +887,74 @@ public Builder clearRelayMode() {
return this;
}

private boolean enableRelay_;
/**
*
*
* <pre>
* Enable Relay component
* </pre>
*
* <code>optional bool enable_relay = 3;</code>
*
* @return Whether the enableRelay field is set.
*/
@java.lang.Override
public boolean hasEnableRelay() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
* <pre>
* Enable Relay component
* </pre>
*
* <code>optional bool enable_relay = 3;</code>
*
* @return The enableRelay.
*/
@java.lang.Override
public boolean getEnableRelay() {
return enableRelay_;
}
/**
*
*
* <pre>
* Enable Relay component
* </pre>
*
* <code>optional bool enable_relay = 3;</code>
*
* @param value The enableRelay to set.
* @return This builder for chaining.
*/
public Builder setEnableRelay(boolean value) {

enableRelay_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
* <pre>
* Enable Relay component
* </pre>
*
* <code>optional bool enable_relay = 3;</code>
*
* @return This builder for chaining.
*/
public Builder clearEnableRelay() {
bitField0_ = (bitField0_ & ~0x00000004);
enableRelay_ = false;
onChanged();
return this;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Expand Up @@ -60,4 +60,29 @@ public interface AdvancedDatapathObservabilityConfigOrBuilder
* @return The relayMode.
*/
com.google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode getRelayMode();

/**
*
*
* <pre>
* Enable Relay component
* </pre>
*
* <code>optional bool enable_relay = 3;</code>
*
* @return Whether the enableRelay field is set.
*/
boolean hasEnableRelay();
/**
*
*
* <pre>
* Enable Relay component
* </pre>
*
* <code>optional bool enable_relay = 3;</code>
*
* @return The enableRelay.
*/
boolean getEnableRelay();
}