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

feat(v1): sync v1 GKE API #289

Merged
merged 2 commits into from Nov 13, 2020
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
2 changes: 1 addition & 1 deletion .github/workflows/formatting.yaml
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
java-version: 11
- run: "mvn com.coveo:fmt-maven-plugin:format"
- uses: googleapis/code-suggester@v1.8.0
- uses: googleapis/code-suggester@v1
with:
command: review
pull_number: ${{ github.event.pull_request.number }}
Expand Down
Expand Up @@ -38,6 +38,8 @@
import com.google.container.v1.DeleteClusterRequest;
import com.google.container.v1.DeleteNodePoolRequest;
import com.google.container.v1.GetClusterRequest;
import com.google.container.v1.GetJSONWebKeysRequest;
import com.google.container.v1.GetJSONWebKeysResponse;
import com.google.container.v1.GetNodePoolRequest;
import com.google.container.v1.GetOperationRequest;
import com.google.container.v1.GetServerConfigRequest;
Expand Down Expand Up @@ -418,7 +420,7 @@ public final UnaryCallable<GetClusterRequest, Cluster> getClusterCallable() {
* [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides.
* This field has been deprecated and replaced by the parent field.
* @param cluster Required. A [cluster
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters)
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation createCluster(String projectId, String zone, Cluster cluster) {
Expand Down Expand Up @@ -459,7 +461,7 @@ public final Operation createCluster(String projectId, String zone, Cluster clus
* @param parent The parent (project and location) where the cluster will be created. Specified in
* the format `projects/&#42;/locations/&#42;`.
* @param cluster Required. A [cluster
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters)
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation createCluster(String parent, Cluster cluster) {
Expand Down Expand Up @@ -763,10 +765,14 @@ public final Operation setNodePoolAutoscaling(SetNodePoolAutoscalingRequest requ
* This field has been deprecated and replaced by the name field.
* @param clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated
* and replaced by the name field.
* @param loggingService Required. The logging service the cluster should use to write metrics.
* @param loggingService Required. The logging service the cluster should use to write logs.
* Currently available options:
* <p>&#42; "logging.googleapis.com" - the Google Cloud Logging service &#42; "none" - no
* metrics will be exported from the cluster
* <p>&#42; `logging.googleapis.com/kubernetes` - The Cloud Logging service with a
* Kubernetes-native resource model &#42; `logging.googleapis.com` - The legacy Cloud Logging
* service (no longer available as of GKE 1.15). &#42; `none` - no logs will be exported from
* the cluster.
* <p>If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE
* 1.14+ or `logging.googleapis.com` for earlier versions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation setLoggingService(
Expand Down Expand Up @@ -797,10 +803,14 @@ public final Operation setLoggingService(
*
* @param name The name (project, location, cluster) of the cluster to set logging. Specified in
* the format `projects/&#42;/locations/&#42;/clusters/&#42;`.
* @param loggingService Required. The logging service the cluster should use to write metrics.
* @param loggingService Required. The logging service the cluster should use to write logs.
* Currently available options:
* <p>&#42; "logging.googleapis.com" - the Google Cloud Logging service &#42; "none" - no
* metrics will be exported from the cluster
* <p>&#42; `logging.googleapis.com/kubernetes` - The Cloud Logging service with a
* Kubernetes-native resource model &#42; `logging.googleapis.com` - The legacy Cloud Logging
* service (no longer available as of GKE 1.15). &#42; `none` - no logs will be exported from
* the cluster.
* <p>If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE
* 1.14+ or `logging.googleapis.com` for earlier versions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation setLoggingService(String name, String loggingService) {
Expand Down Expand Up @@ -883,9 +893,12 @@ public final UnaryCallable<SetLoggingServiceRequest, Operation> setLoggingServic
* and replaced by the name field.
* @param monitoringService Required. The monitoring service the cluster should use to write
* metrics. Currently available options:
* <p>&#42; "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring service with
* Kubernetes-native resource model &#42; "monitoring.googleapis.com" - the Google Cloud
* Monitoring service &#42; "none" - no metrics will be exported from the cluster
* <p>&#42; "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring service with a
* Kubernetes-native resource model &#42; `monitoring.googleapis.com` - The legacy Cloud
* Monitoring service (no longer available as of GKE 1.15). &#42; `none` - No metrics will be
* exported from the cluster.
* <p>If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE
* 1.14+ or `monitoring.googleapis.com` for earlier versions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation setMonitoringService(
Expand Down Expand Up @@ -918,9 +931,12 @@ public final Operation setMonitoringService(
* in the format `projects/&#42;/locations/&#42;/clusters/&#42;`.
* @param monitoringService Required. The monitoring service the cluster should use to write
* metrics. Currently available options:
* <p>&#42; "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring service with
* Kubernetes-native resource model &#42; "monitoring.googleapis.com" - the Google Cloud
* Monitoring service &#42; "none" - no metrics will be exported from the cluster
* <p>&#42; "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring service with a
* Kubernetes-native resource model &#42; `monitoring.googleapis.com` - The legacy Cloud
* Monitoring service (no longer available as of GKE 1.15). &#42; `none` - No metrics will be
* exported from the cluster.
* <p>If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE
* 1.14+ or `monitoring.googleapis.com` for earlier versions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation setMonitoringService(String name, String monitoringService) {
Expand Down Expand Up @@ -1091,7 +1107,9 @@ public final UnaryCallable<SetAddonsConfigRequest, Operation> setAddonsConfigCal

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the locations for a specific cluster.
* Sets the locations for a specific cluster. Deprecated. Use
* [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update)
* instead.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1135,7 +1153,9 @@ public final Operation setLocations(

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the locations for a specific cluster.
* Sets the locations for a specific cluster. Deprecated. Use
* [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update)
* instead.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1165,7 +1185,9 @@ public final Operation setLocations(String name, List<String> locations) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the locations for a specific cluster.
* Sets the locations for a specific cluster. Deprecated. Use
* [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update)
* instead.
*
* <p>Sample code:
*
Expand All @@ -1188,7 +1210,9 @@ public final Operation setLocations(SetLocationsRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the locations for a specific cluster.
* Sets the locations for a specific cluster. Deprecated. Use
* [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update)
* instead.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1603,6 +1627,28 @@ public final Operation getOperation(String projectId, String zone, String operat
return getOperation(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the specified operation.
*
* <p>Sample code:
*
* <pre><code>
* try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
* String name = "";
* Operation response = clusterManagerClient.getOperation(name);
* }
* </code></pre>
*
* @param name The name (project, location, operation id) of the operation to get. Specified in
* the format `projects/&#42;/locations/&#42;/operations/&#42;`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation getOperation(String name) {
GetOperationRequest request = GetOperationRequest.newBuilder().setName(name).build();
return getOperation(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the specified operation.
Expand Down Expand Up @@ -1827,6 +1873,48 @@ public final UnaryCallable<GetServerConfigRequest, ServerConfig> getServerConfig
return stub.getServerConfigCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the public component of the cluster signing keys in JSON Web Key format. This API is not
* yet intended for general use, and is not available for all clusters.
*
* <p>Sample code:
*
* <pre><code>
* try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
* GetJSONWebKeysRequest request = GetJSONWebKeysRequest.newBuilder().build();
* GetJSONWebKeysResponse response = clusterManagerClient.getJSONWebKeys(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final GetJSONWebKeysResponse getJSONWebKeys(GetJSONWebKeysRequest request) {
return getJSONWebKeysCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the public component of the cluster signing keys in JSON Web Key format. This API is not
* yet intended for general use, and is not available for all clusters.
*
* <p>Sample code:
*
* <pre><code>
* try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
* GetJSONWebKeysRequest request = GetJSONWebKeysRequest.newBuilder().build();
* ApiFuture&lt;GetJSONWebKeysResponse&gt; future = clusterManagerClient.getJSONWebKeysCallable().futureCall(request);
* // Do something
* GetJSONWebKeysResponse response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<GetJSONWebKeysRequest, GetJSONWebKeysResponse>
getJSONWebKeysCallable() {
return stub.getJSONWebKeysCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the node pools for a cluster.
Expand Down
Expand Up @@ -37,6 +37,8 @@
import com.google.container.v1.DeleteClusterRequest;
import com.google.container.v1.DeleteNodePoolRequest;
import com.google.container.v1.GetClusterRequest;
import com.google.container.v1.GetJSONWebKeysRequest;
import com.google.container.v1.GetJSONWebKeysResponse;
import com.google.container.v1.GetNodePoolRequest;
import com.google.container.v1.GetOperationRequest;
import com.google.container.v1.GetServerConfigRequest;
Expand Down Expand Up @@ -193,6 +195,11 @@ public UnaryCallSettings<GetServerConfigRequest, ServerConfig> getServerConfigSe
return ((ClusterManagerStubSettings) getStubSettings()).getServerConfigSettings();
}

/** Returns the object with the settings used for calls to getJSONWebKeys. */
public UnaryCallSettings<GetJSONWebKeysRequest, GetJSONWebKeysResponse> getJSONWebKeysSettings() {
return ((ClusterManagerStubSettings) getStubSettings()).getJSONWebKeysSettings();
}

/** Returns the object with the settings used for calls to listNodePools. */
public UnaryCallSettings<ListNodePoolsRequest, ListNodePoolsResponse> listNodePoolsSettings() {
return ((ClusterManagerStubSettings) getStubSettings()).listNodePoolsSettings();
Expand Down Expand Up @@ -457,6 +464,12 @@ public UnaryCallSettings.Builder<CancelOperationRequest, Empty> cancelOperationS
return getStubSettingsBuilder().getServerConfigSettings();
}

/** Returns the builder for the settings used for calls to getJSONWebKeys. */
public UnaryCallSettings.Builder<GetJSONWebKeysRequest, GetJSONWebKeysResponse>
getJSONWebKeysSettings() {
return getStubSettingsBuilder().getJSONWebKeysSettings();
}

/** Returns the builder for the settings used for calls to listNodePools. */
public UnaryCallSettings.Builder<ListNodePoolsRequest, ListNodePoolsResponse>
listNodePoolsSettings() {
Expand Down
Expand Up @@ -28,6 +28,8 @@
import com.google.container.v1.DeleteClusterRequest;
import com.google.container.v1.DeleteNodePoolRequest;
import com.google.container.v1.GetClusterRequest;
import com.google.container.v1.GetJSONWebKeysRequest;
import com.google.container.v1.GetJSONWebKeysResponse;
import com.google.container.v1.GetNodePoolRequest;
import com.google.container.v1.GetOperationRequest;
import com.google.container.v1.GetServerConfigRequest;
Expand Down Expand Up @@ -140,6 +142,10 @@ public UnaryCallable<GetServerConfigRequest, ServerConfig> getServerConfigCallab
throw new UnsupportedOperationException("Not implemented: getServerConfigCallable()");
}

public UnaryCallable<GetJSONWebKeysRequest, GetJSONWebKeysResponse> getJSONWebKeysCallable() {
throw new UnsupportedOperationException("Not implemented: getJSONWebKeysCallable()");
}

public UnaryCallable<ListNodePoolsRequest, ListNodePoolsResponse> listNodePoolsCallable() {
throw new UnsupportedOperationException("Not implemented: listNodePoolsCallable()");
}
Expand Down