diff --git a/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java b/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java index 6dc6a4e4..30aba4dc 100644 --- a/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java +++ b/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java @@ -88,6 +88,13 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+ *   String parent = "parent-995424086";
+ *   ListClustersResponse response = clusterManagerClient.listClusters(parent);
+ * }
+ * }
+ * *

Note: close() needs to be called on the ClusterManagerClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -191,6 +198,15 @@ public ClusterManagerStub getStub() { /** * Lists all clusters owned by a project in either the specified zone or all zones. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String parent = "parent-995424086";
+   *   ListClustersResponse response = clusterManagerClient.listClusters(parent);
+   * }
+   * }
+ * * @param parent The parent (project and location) where the clusters will be listed. Specified in * the format `projects/*/locations/*`. Location "-" matches all zones and all * regions. @@ -205,6 +221,16 @@ public final ListClustersResponse listClusters(String parent) { /** * Lists all clusters owned by a project in either the specified zone or all zones. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   ListClustersResponse response = clusterManagerClient.listClusters(projectId, zone);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the parent field. @@ -223,6 +249,20 @@ public final ListClustersResponse listClusters(String projectId, String zone) { /** * Lists all clusters owned by a project in either the specified zone or all zones. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ListClustersResponse response = clusterManagerClient.listClusters(request);
+   * }
+   * }
+ * * @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 */ @@ -235,6 +275,21 @@ public final ListClustersResponse listClusters(ListClustersRequest request) { * Lists all clusters owned by a project in either the specified zone or all zones. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.listClustersCallable().futureCall(request);
+   *   // Do something.
+   *   ListClustersResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable listClustersCallable() { return stub.listClustersCallable(); @@ -244,6 +299,15 @@ public final UnaryCallable listCluste /** * Gets the details of a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   Cluster response = clusterManagerClient.getCluster(name);
+   * }
+   * }
+ * * @param name The name (project, location, cluster) of the cluster to retrieve. Specified in the * format `projects/*/locations/*/clusters/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -257,6 +321,17 @@ public final Cluster getCluster(String name) { /** * Gets the details of a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   Cluster response = clusterManagerClient.getCluster(projectId, zone, clusterId);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -281,6 +356,21 @@ public final Cluster getCluster(String projectId, String zone, String clusterId) /** * Gets the details of a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   GetClusterRequest request =
+   *       GetClusterRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setName("name3373707")
+   *           .build();
+   *   Cluster response = clusterManagerClient.getCluster(request);
+   * }
+   * }
+ * * @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 */ @@ -293,6 +383,21 @@ public final Cluster getCluster(GetClusterRequest request) { * Gets the details of a specific cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   GetClusterRequest request =
+   *       GetClusterRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future = clusterManagerClient.getClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Cluster response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getClusterCallable() { return stub.getClusterCallable(); @@ -313,6 +418,16 @@ public final UnaryCallable getClusterCallable() { *

Finally, an entry is added to the project's global metadata indicating which CIDR range the * cluster is using. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   Operation response = clusterManagerClient.createCluster(parent, cluster);
+   * }
+   * }
+ * * @param parent The parent (project and location) where the cluster will be created. Specified in * the format `projects/*/locations/*`. * @param cluster Required. A [cluster @@ -340,6 +455,17 @@ public final Operation createCluster(String parent, Cluster cluster) { *

Finally, an entry is added to the project's global metadata indicating which CIDR range the * cluster is using. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   Operation response = clusterManagerClient.createCluster(projectId, zone, cluster);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the parent field. @@ -375,6 +501,21 @@ public final Operation createCluster(String projectId, String zone, Cluster clus *

Finally, an entry is added to the project's global metadata indicating which CIDR range the * cluster is using. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   Operation response = clusterManagerClient.createCluster(request);
+   * }
+   * }
+ * * @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 */ @@ -398,6 +539,22 @@ public final Operation createCluster(CreateClusterRequest request) { * cluster is using. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.createClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createClusterCallable() { return stub.createClusterCallable(); @@ -407,6 +564,16 @@ public final UnaryCallable createClusterCallabl /** * Updates the settings of a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   ClusterUpdate update = ClusterUpdate.newBuilder().build();
+   *   Operation response = clusterManagerClient.updateCluster(name, update);
+   * }
+   * }
+ * * @param name The name (project, location, cluster) of the cluster to update. Specified in the * format `projects/*/locations/*/clusters/*`. * @param update Required. A description of the update. @@ -422,6 +589,18 @@ public final Operation updateCluster(String name, ClusterUpdate update) { /** * Updates the settings of a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   ClusterUpdate update = ClusterUpdate.newBuilder().build();
+   *   Operation response = clusterManagerClient.updateCluster(projectId, zone, clusterId, update);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -449,6 +628,22 @@ public final Operation updateCluster( /** * Updates the settings of a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setUpdate(ClusterUpdate.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.updateCluster(request);
+   * }
+   * }
+ * * @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 */ @@ -461,6 +656,23 @@ public final Operation updateCluster(UpdateClusterRequest request) { * Updates the settings of a specific cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setUpdate(ClusterUpdate.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.updateClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateClusterCallable() { return stub.updateClusterCallable(); @@ -470,6 +682,27 @@ public final UnaryCallable updateClusterCallabl /** * Updates the version and/or image type for the specified node pool. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   UpdateNodePoolRequest request =
+   *       UpdateNodePoolRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setNodeVersion("nodeVersion1155309686")
+   *           .setImageType("imageType-878147787")
+   *           .setName("name3373707")
+   *           .addAllLocations(new ArrayList())
+   *           .setWorkloadMetadataConfig(WorkloadMetadataConfig.newBuilder().build())
+   *           .setUpgradeSettings(NodePool.UpgradeSettings.newBuilder().build())
+   *           .build();
+   *   Operation response = clusterManagerClient.updateNodePool(request);
+   * }
+   * }
+ * * @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 */ @@ -482,6 +715,28 @@ public final Operation updateNodePool(UpdateNodePoolRequest request) { * Updates the version and/or image type for the specified node pool. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   UpdateNodePoolRequest request =
+   *       UpdateNodePoolRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setNodeVersion("nodeVersion1155309686")
+   *           .setImageType("imageType-878147787")
+   *           .setName("name3373707")
+   *           .addAllLocations(new ArrayList())
+   *           .setWorkloadMetadataConfig(WorkloadMetadataConfig.newBuilder().build())
+   *           .setUpgradeSettings(NodePool.UpgradeSettings.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.updateNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateNodePoolCallable() { return stub.updateNodePoolCallable(); @@ -491,6 +746,23 @@ public final UnaryCallable updateNodePoolCalla /** * Sets the autoscaling settings for the specified node pool. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetNodePoolAutoscalingRequest request =
+   *       SetNodePoolAutoscalingRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setAutoscaling(NodePoolAutoscaling.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setNodePoolAutoscaling(request);
+   * }
+   * }
+ * * @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 */ @@ -503,6 +775,24 @@ public final Operation setNodePoolAutoscaling(SetNodePoolAutoscalingRequest requ * Sets the autoscaling settings for the specified node pool. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetNodePoolAutoscalingRequest request =
+   *       SetNodePoolAutoscalingRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setAutoscaling(NodePoolAutoscaling.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.setNodePoolAutoscalingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setNodePoolAutoscalingCallable() { @@ -513,6 +803,16 @@ public final Operation setNodePoolAutoscaling(SetNodePoolAutoscalingRequest requ /** * Sets the logging service for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   String loggingService = "loggingService1098570326";
+   *   Operation response = clusterManagerClient.setLoggingService(name, loggingService);
+   * }
+   * }
+ * * @param name The name (project, location, cluster) of the cluster to set logging. Specified in * the format `projects/*/locations/*/clusters/*`. * @param loggingService Required. The logging service the cluster should use to write logs. @@ -541,6 +841,19 @@ public final Operation setLoggingService(String name, String loggingService) { /** * Sets the logging service for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   String loggingService = "loggingService1098570326";
+   *   Operation response =
+   *       clusterManagerClient.setLoggingService(projectId, zone, clusterId, loggingService);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -578,6 +891,22 @@ public final Operation setLoggingService( /** * Sets the logging service for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetLoggingServiceRequest request =
+   *       SetLoggingServiceRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setLoggingService("loggingService1098570326")
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setLoggingService(request);
+   * }
+   * }
+ * * @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 */ @@ -590,6 +919,23 @@ public final Operation setLoggingService(SetLoggingServiceRequest request) { * Sets the logging service for a specific cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetLoggingServiceRequest request =
+   *       SetLoggingServiceRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setLoggingService("loggingService1098570326")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.setLoggingServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setLoggingServiceCallable() { return stub.setLoggingServiceCallable(); @@ -599,6 +945,16 @@ public final UnaryCallable setLoggingServic /** * Sets the monitoring service for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   String monitoringService = "monitoringService-1431578291";
+   *   Operation response = clusterManagerClient.setMonitoringService(name, monitoringService);
+   * }
+   * }
+ * * @param name The name (project, location, cluster) of the cluster to set monitoring. Specified * in the format `projects/*/locations/*/clusters/*`. * @param monitoringService Required. The monitoring service the cluster should use to write @@ -627,6 +983,19 @@ public final Operation setMonitoringService(String name, String monitoringServic /** * Sets the monitoring service for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   String monitoringService = "monitoringService-1431578291";
+   *   Operation response =
+   *       clusterManagerClient.setMonitoringService(projectId, zone, clusterId, monitoringService);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -664,6 +1033,22 @@ public final Operation setMonitoringService( /** * Sets the monitoring service for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetMonitoringServiceRequest request =
+   *       SetMonitoringServiceRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setMonitoringService("monitoringService-1431578291")
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setMonitoringService(request);
+   * }
+   * }
+ * * @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 */ @@ -676,6 +1061,23 @@ public final Operation setMonitoringService(SetMonitoringServiceRequest request) * Sets the monitoring service for a specific cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetMonitoringServiceRequest request =
+   *       SetMonitoringServiceRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setMonitoringService("monitoringService-1431578291")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.setMonitoringServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setMonitoringServiceCallable() { @@ -686,6 +1088,16 @@ public final Operation setMonitoringService(SetMonitoringServiceRequest request) /** * Sets the addons for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   AddonsConfig addonsConfig = AddonsConfig.newBuilder().build();
+   *   Operation response = clusterManagerClient.setAddonsConfig(name, addonsConfig);
+   * }
+   * }
+ * * @param name The name (project, location, cluster) of the cluster to set addons. Specified in * the format `projects/*/locations/*/clusters/*`. * @param addonsConfig Required. The desired configurations for the various addons available to @@ -702,6 +1114,19 @@ public final Operation setAddonsConfig(String name, AddonsConfig addonsConfig) { /** * Sets the addons for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   AddonsConfig addonsConfig = AddonsConfig.newBuilder().build();
+   *   Operation response =
+   *       clusterManagerClient.setAddonsConfig(projectId, zone, clusterId, addonsConfig);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -730,6 +1155,22 @@ public final Operation setAddonsConfig( /** * Sets the addons for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetAddonsConfigRequest request =
+   *       SetAddonsConfigRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setAddonsConfig(AddonsConfig.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setAddonsConfig(request);
+   * }
+   * }
+ * * @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 */ @@ -742,6 +1183,23 @@ public final Operation setAddonsConfig(SetAddonsConfigRequest request) { * Sets the addons for a specific cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetAddonsConfigRequest request =
+   *       SetAddonsConfigRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setAddonsConfig(AddonsConfig.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.setAddonsConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setAddonsConfigCallable() { return stub.setAddonsConfigCallable(); @@ -753,6 +1211,16 @@ public final UnaryCallable setAddonsConfigCal * [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) * instead. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   List locations = new ArrayList<>();
+   *   Operation response = clusterManagerClient.setLocations(name, locations);
+   * }
+   * }
+ * * @param name The name (project, location, cluster) of the cluster to set locations. Specified in * the format `projects/*/locations/*/clusters/*`. * @param locations Required. The desired list of Google Compute Engine @@ -775,6 +1243,18 @@ public final Operation setLocations(String name, List locations) { * [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) * instead. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   List locations = new ArrayList<>();
+   *   Operation response = clusterManagerClient.setLocations(projectId, zone, clusterId, locations);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -809,6 +1289,22 @@ public final Operation setLocations( * [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) * instead. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetLocationsRequest request =
+   *       SetLocationsRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .addAllLocations(new ArrayList())
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setLocations(request);
+   * }
+   * }
+ * * @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 */ @@ -823,6 +1319,22 @@ public final Operation setLocations(SetLocationsRequest request) { * instead. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetLocationsRequest request =
+   *       SetLocationsRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .addAllLocations(new ArrayList())
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future = clusterManagerClient.setLocationsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setLocationsCallable() { return stub.setLocationsCallable(); @@ -832,6 +1344,16 @@ public final UnaryCallable setLocationsCallable( /** * Updates the master for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   String masterVersion = "masterVersion1167095830";
+   *   Operation response = clusterManagerClient.updateMaster(name, masterVersion);
+   * }
+   * }
+ * * @param name The name (project, location, cluster) of the cluster to update. Specified in the * format `projects/*/locations/*/clusters/*`. * @param masterVersion Required. The Kubernetes version to change the master to. @@ -853,6 +1375,19 @@ public final Operation updateMaster(String name, String masterVersion) { /** * Updates the master for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   String masterVersion = "masterVersion1167095830";
+   *   Operation response =
+   *       clusterManagerClient.updateMaster(projectId, zone, clusterId, masterVersion);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -886,6 +1421,22 @@ public final Operation updateMaster( /** * Updates the master for a specific cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   UpdateMasterRequest request =
+   *       UpdateMasterRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setMasterVersion("masterVersion1167095830")
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.updateMaster(request);
+   * }
+   * }
+ * * @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 */ @@ -898,6 +1449,22 @@ public final Operation updateMaster(UpdateMasterRequest request) { * Updates the master for a specific cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   UpdateMasterRequest request =
+   *       UpdateMasterRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setMasterVersion("masterVersion1167095830")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future = clusterManagerClient.updateMasterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateMasterCallable() { return stub.updateMasterCallable(); @@ -908,6 +1475,22 @@ public final UnaryCallable updateMasterCallable( * Sets master auth materials. Currently supports changing the admin password or a specific * cluster, either via password generation or explicitly setting the password. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetMasterAuthRequest request =
+   *       SetMasterAuthRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setUpdate(MasterAuth.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setMasterAuth(request);
+   * }
+   * }
+ * * @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 */ @@ -921,6 +1504,23 @@ public final Operation setMasterAuth(SetMasterAuthRequest request) { * cluster, either via password generation or explicitly setting the password. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetMasterAuthRequest request =
+   *       SetMasterAuthRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setUpdate(MasterAuth.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.setMasterAuthCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setMasterAuthCallable() { return stub.setMasterAuthCallable(); @@ -936,6 +1536,15 @@ public final UnaryCallable setMasterAuthCallabl * balancer resources, are not deleted if they weren't present when the cluster was initially * created. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   Operation response = clusterManagerClient.deleteCluster(name);
+   * }
+   * }
+ * * @param name The name (project, location, cluster) of the cluster to delete. Specified in the * format `projects/*/locations/*/clusters/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -955,6 +1564,17 @@ public final Operation deleteCluster(String name) { * balancer resources, are not deleted if they weren't present when the cluster was initially * created. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   Operation response = clusterManagerClient.deleteCluster(projectId, zone, clusterId);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -985,6 +1605,21 @@ public final Operation deleteCluster(String projectId, String zone, String clust * balancer resources, are not deleted if they weren't present when the cluster was initially * created. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.deleteCluster(request);
+   * }
+   * }
+ * * @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 */ @@ -1003,6 +1638,22 @@ public final Operation deleteCluster(DeleteClusterRequest request) { * created. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.deleteClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteClusterCallable() { return stub.deleteClusterCallable(); @@ -1012,6 +1663,16 @@ public final UnaryCallable deleteClusterCallabl /** * Lists all operations in a project in a specific zone or all zones. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   ListOperationsResponse response = clusterManagerClient.listOperations(projectId, zone);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the parent field. @@ -1030,6 +1691,20 @@ public final ListOperationsResponse listOperations(String projectId, String zone /** * Lists all operations in a project in a specific zone or all zones. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   ListOperationsRequest request =
+   *       ListOperationsRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ListOperationsResponse response = clusterManagerClient.listOperations(request);
+   * }
+   * }
+ * * @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 */ @@ -1042,6 +1717,21 @@ public final ListOperationsResponse listOperations(ListOperationsRequest request * Lists all operations in a project in a specific zone or all zones. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   ListOperationsRequest request =
+   *       ListOperationsRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.listOperationsCallable().futureCall(request);
+   *   // Do something.
+   *   ListOperationsResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable listOperationsCallable() { @@ -1052,6 +1742,15 @@ public final ListOperationsResponse listOperations(ListOperationsRequest request /** * Gets the specified operation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   Operation response = clusterManagerClient.getOperation(name);
+   * }
+   * }
+ * * @param name The name (project, location, operation id) of the operation to get. Specified in * the format `projects/*/locations/*/operations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1065,6 +1764,17 @@ public final Operation getOperation(String name) { /** * Gets the specified operation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String operationId = "operationId129704162";
+   *   Operation response = clusterManagerClient.getOperation(projectId, zone, operationId);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -1089,6 +1799,21 @@ public final Operation getOperation(String projectId, String zone, String operat /** * Gets the specified operation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   GetOperationRequest request =
+   *       GetOperationRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setOperationId("operationId129704162")
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.getOperation(request);
+   * }
+   * }
+ * * @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 */ @@ -1101,6 +1826,21 @@ public final Operation getOperation(GetOperationRequest request) { * Gets the specified operation. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   GetOperationRequest request =
+   *       GetOperationRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setOperationId("operationId129704162")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future = clusterManagerClient.getOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getOperationCallable() { return stub.getOperationCallable(); @@ -1110,6 +1850,15 @@ public final UnaryCallable getOperationCallable( /** * Cancels the specified operation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   clusterManagerClient.cancelOperation(name);
+   * }
+   * }
+ * * @param name The name (project, location, operation id) of the operation to cancel. Specified in * the format `projects/*/locations/*/operations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1123,6 +1872,17 @@ public final void cancelOperation(String name) { /** * Cancels the specified operation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String operationId = "operationId129704162";
+   *   clusterManagerClient.cancelOperation(projectId, zone, operationId);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -1147,6 +1907,21 @@ public final void cancelOperation(String projectId, String zone, String operatio /** * Cancels the specified operation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   CancelOperationRequest request =
+   *       CancelOperationRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setOperationId("operationId129704162")
+   *           .setName("name3373707")
+   *           .build();
+   *   clusterManagerClient.cancelOperation(request);
+   * }
+   * }
+ * * @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 */ @@ -1159,6 +1934,21 @@ public final void cancelOperation(CancelOperationRequest request) { * Cancels the specified operation. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   CancelOperationRequest request =
+   *       CancelOperationRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setOperationId("operationId129704162")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future = clusterManagerClient.cancelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable cancelOperationCallable() { return stub.cancelOperationCallable(); @@ -1168,6 +1958,15 @@ public final UnaryCallable cancelOperationCallabl /** * Returns configuration info about the Google Kubernetes Engine service. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   ServerConfig response = clusterManagerClient.getServerConfig(name);
+   * }
+   * }
+ * * @param name The name (project and location) of the server config to get, specified in the * format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1181,6 +1980,16 @@ public final ServerConfig getServerConfig(String name) { /** * Returns configuration info about the Google Kubernetes Engine service. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   ServerConfig response = clusterManagerClient.getServerConfig(projectId, zone);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -1199,6 +2008,20 @@ public final ServerConfig getServerConfig(String projectId, String zone) { /** * Returns configuration info about the Google Kubernetes Engine service. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   GetServerConfigRequest request =
+   *       GetServerConfigRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setName("name3373707")
+   *           .build();
+   *   ServerConfig response = clusterManagerClient.getServerConfig(request);
+   * }
+   * }
+ * * @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 */ @@ -1211,6 +2034,21 @@ public final ServerConfig getServerConfig(GetServerConfigRequest request) { * Returns configuration info about the Google Kubernetes Engine service. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   GetServerConfigRequest request =
+   *       GetServerConfigRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.getServerConfigCallable().futureCall(request);
+   *   // Do something.
+   *   ServerConfig response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getServerConfigCallable() { return stub.getServerConfigCallable(); @@ -1221,6 +2059,16 @@ public final UnaryCallable getServerConfig * 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. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   GetJSONWebKeysRequest request =
+   *       GetJSONWebKeysRequest.newBuilder().setParent("parent-995424086").build();
+   *   GetJSONWebKeysResponse response = clusterManagerClient.getJSONWebKeys(request);
+   * }
+   * }
+ * * @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 */ @@ -1234,6 +2082,17 @@ public final GetJSONWebKeysResponse getJSONWebKeys(GetJSONWebKeysRequest request * yet intended for general use, and is not available for all clusters. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   GetJSONWebKeysRequest request =
+   *       GetJSONWebKeysRequest.newBuilder().setParent("parent-995424086").build();
+   *   ApiFuture future =
+   *       clusterManagerClient.getJSONWebKeysCallable().futureCall(request);
+   *   // Do something.
+   *   GetJSONWebKeysResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getJSONWebKeysCallable() { @@ -1244,6 +2103,15 @@ public final GetJSONWebKeysResponse getJSONWebKeys(GetJSONWebKeysRequest request /** * Lists the node pools for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String parent = "parent-995424086";
+   *   ListNodePoolsResponse response = clusterManagerClient.listNodePools(parent);
+   * }
+   * }
+ * * @param parent The parent (project, location, cluster id) where the node pools will be listed. * Specified in the format `projects/*/locations/*/clusters/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1257,6 +2125,18 @@ public final ListNodePoolsResponse listNodePools(String parent) { /** * Lists the node pools for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   ListNodePoolsResponse response =
+   *       clusterManagerClient.listNodePools(projectId, zone, clusterId);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://developers.google.com/console/help/new/#projectnumber). This field has been * deprecated and replaced by the parent field. @@ -1282,6 +2162,21 @@ public final ListNodePoolsResponse listNodePools( /** * Lists the node pools for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   ListNodePoolsRequest request =
+   *       ListNodePoolsRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ListNodePoolsResponse response = clusterManagerClient.listNodePools(request);
+   * }
+   * }
+ * * @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 */ @@ -1294,6 +2189,22 @@ public final ListNodePoolsResponse listNodePools(ListNodePoolsRequest request) { * Lists the node pools for a cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   ListNodePoolsRequest request =
+   *       ListNodePoolsRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.listNodePoolsCallable().futureCall(request);
+   *   // Do something.
+   *   ListNodePoolsResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable listNodePoolsCallable() { return stub.listNodePoolsCallable(); @@ -1303,6 +2214,15 @@ public final UnaryCallable listNode /** * Retrieves the requested node pool. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   NodePool response = clusterManagerClient.getNodePool(name);
+   * }
+   * }
+ * * @param name The name (project, location, cluster, node pool id) of the node pool to get. * Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1316,6 +2236,18 @@ public final NodePool getNodePool(String name) { /** * Retrieves the requested node pool. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   String nodePoolId = "nodePoolId1121557241";
+   *   NodePool response = clusterManagerClient.getNodePool(projectId, zone, clusterId, nodePoolId);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://developers.google.com/console/help/new/#projectnumber). This field has been * deprecated and replaced by the name field. @@ -1344,6 +2276,22 @@ public final NodePool getNodePool( /** * Retrieves the requested node pool. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   GetNodePoolRequest request =
+   *       GetNodePoolRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setName("name3373707")
+   *           .build();
+   *   NodePool response = clusterManagerClient.getNodePool(request);
+   * }
+   * }
+ * * @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 */ @@ -1356,6 +2304,22 @@ public final NodePool getNodePool(GetNodePoolRequest request) { * Retrieves the requested node pool. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   GetNodePoolRequest request =
+   *       GetNodePoolRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future = clusterManagerClient.getNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   NodePool response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getNodePoolCallable() { return stub.getNodePoolCallable(); @@ -1365,6 +2329,16 @@ public final UnaryCallable getNodePoolCallable() { /** * Creates a node pool for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String parent = "parent-995424086";
+   *   NodePool nodePool = NodePool.newBuilder().build();
+   *   Operation response = clusterManagerClient.createNodePool(parent, nodePool);
+   * }
+   * }
+ * * @param parent The parent (project, location, cluster id) where the node pool will be created. * Specified in the format `projects/*/locations/*/clusters/*`. * @param nodePool Required. The node pool to create. @@ -1380,6 +2354,19 @@ public final Operation createNodePool(String parent, NodePool nodePool) { /** * Creates a node pool for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   NodePool nodePool = NodePool.newBuilder().build();
+   *   Operation response =
+   *       clusterManagerClient.createNodePool(projectId, zone, clusterId, nodePool);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://developers.google.com/console/help/new/#projectnumber). This field has been * deprecated and replaced by the parent field. @@ -1407,6 +2394,22 @@ public final Operation createNodePool( /** * Creates a node pool for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   CreateNodePoolRequest request =
+   *       CreateNodePoolRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePool(NodePool.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   Operation response = clusterManagerClient.createNodePool(request);
+   * }
+   * }
+ * * @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 */ @@ -1419,6 +2422,23 @@ public final Operation createNodePool(CreateNodePoolRequest request) { * Creates a node pool for a cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   CreateNodePoolRequest request =
+   *       CreateNodePoolRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePool(NodePool.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.createNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createNodePoolCallable() { return stub.createNodePoolCallable(); @@ -1428,6 +2448,15 @@ public final UnaryCallable createNodePoolCalla /** * Deletes a node pool from a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   Operation response = clusterManagerClient.deleteNodePool(name);
+   * }
+   * }
+ * * @param name The name (project, location, cluster, node pool id) of the node pool to delete. * Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1441,6 +2470,19 @@ public final Operation deleteNodePool(String name) { /** * Deletes a node pool from a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   String nodePoolId = "nodePoolId1121557241";
+   *   Operation response =
+   *       clusterManagerClient.deleteNodePool(projectId, zone, clusterId, nodePoolId);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://developers.google.com/console/help/new/#projectnumber). This field has been * deprecated and replaced by the name field. @@ -1469,6 +2511,22 @@ public final Operation deleteNodePool( /** * Deletes a node pool from a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   DeleteNodePoolRequest request =
+   *       DeleteNodePoolRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.deleteNodePool(request);
+   * }
+   * }
+ * * @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 */ @@ -1481,6 +2539,23 @@ public final Operation deleteNodePool(DeleteNodePoolRequest request) { * Deletes a node pool from a cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   DeleteNodePoolRequest request =
+   *       DeleteNodePoolRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.deleteNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteNodePoolCallable() { return stub.deleteNodePoolCallable(); @@ -1491,6 +2566,15 @@ public final UnaryCallable deleteNodePoolCalla * Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last * upgrade successfully completed. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   Operation response = clusterManagerClient.rollbackNodePoolUpgrade(name);
+   * }
+   * }
+ * * @param name The name (project, location, cluster, node pool id) of the node poll to rollback * upgrade. Specified in the format * `projects/*/locations/*/clusters/*/nodePools/*`. @@ -1507,6 +2591,19 @@ public final Operation rollbackNodePoolUpgrade(String name) { * Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last * upgrade successfully completed. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   String nodePoolId = "nodePoolId1121557241";
+   *   Operation response =
+   *       clusterManagerClient.rollbackNodePoolUpgrade(projectId, zone, clusterId, nodePoolId);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -1536,6 +2633,22 @@ public final Operation rollbackNodePoolUpgrade( * Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last * upgrade successfully completed. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   RollbackNodePoolUpgradeRequest request =
+   *       RollbackNodePoolUpgradeRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.rollbackNodePoolUpgrade(request);
+   * }
+   * }
+ * * @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 */ @@ -1549,6 +2662,23 @@ public final Operation rollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest re * upgrade successfully completed. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   RollbackNodePoolUpgradeRequest request =
+   *       RollbackNodePoolUpgradeRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.rollbackNodePoolUpgradeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable rollbackNodePoolUpgradeCallable() { @@ -1559,6 +2689,23 @@ public final Operation rollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest re /** * Sets the NodeManagement options for a node pool. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetNodePoolManagementRequest request =
+   *       SetNodePoolManagementRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setManagement(NodeManagement.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setNodePoolManagement(request);
+   * }
+   * }
+ * * @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 */ @@ -1571,6 +2718,24 @@ public final Operation setNodePoolManagement(SetNodePoolManagementRequest reques * Sets the NodeManagement options for a node pool. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetNodePoolManagementRequest request =
+   *       SetNodePoolManagementRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setManagement(NodeManagement.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.setNodePoolManagementCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setNodePoolManagementCallable() { @@ -1581,6 +2746,23 @@ public final Operation setNodePoolManagement(SetNodePoolManagementRequest reques /** * Sets labels on a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetLabelsRequest request =
+   *       SetLabelsRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .putAllResourceLabels(new HashMap())
+   *           .setLabelFingerprint("labelFingerprint379449680")
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setLabels(request);
+   * }
+   * }
+ * * @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 */ @@ -1593,6 +2775,23 @@ public final Operation setLabels(SetLabelsRequest request) { * Sets labels on a cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetLabelsRequest request =
+   *       SetLabelsRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .putAllResourceLabels(new HashMap())
+   *           .setLabelFingerprint("labelFingerprint379449680")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future = clusterManagerClient.setLabelsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setLabelsCallable() { return stub.setLabelsCallable(); @@ -1602,6 +2801,16 @@ public final UnaryCallable setLabelsCallable() { /** * Enables or disables the ABAC authorization mechanism on a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   boolean enabled = true;
+   *   Operation response = clusterManagerClient.setLegacyAbac(name, enabled);
+   * }
+   * }
+ * * @param name The name (project, location, cluster id) of the cluster to set legacy abac. * Specified in the format `projects/*/locations/*/clusters/*`. * @param enabled Required. Whether ABAC authorization will be enabled in the cluster. @@ -1617,6 +2826,18 @@ public final Operation setLegacyAbac(String name, boolean enabled) { /** * Enables or disables the ABAC authorization mechanism on a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   boolean enabled = true;
+   *   Operation response = clusterManagerClient.setLegacyAbac(projectId, zone, clusterId, enabled);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). This field has been deprecated * and replaced by the name field. @@ -1644,6 +2865,22 @@ public final Operation setLegacyAbac( /** * Enables or disables the ABAC authorization mechanism on a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetLegacyAbacRequest request =
+   *       SetLegacyAbacRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setEnabled(true)
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setLegacyAbac(request);
+   * }
+   * }
+ * * @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 */ @@ -1656,6 +2893,23 @@ public final Operation setLegacyAbac(SetLegacyAbacRequest request) { * Enables or disables the ABAC authorization mechanism on a cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetLegacyAbacRequest request =
+   *       SetLegacyAbacRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setEnabled(true)
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.setLegacyAbacCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setLegacyAbacCallable() { return stub.setLegacyAbacCallable(); @@ -1665,6 +2919,15 @@ public final UnaryCallable setLegacyAbacCallabl /** * Starts master IP rotation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   Operation response = clusterManagerClient.startIPRotation(name);
+   * }
+   * }
+ * * @param name The name (project, location, cluster id) of the cluster to start IP rotation. * Specified in the format `projects/*/locations/*/clusters/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1678,6 +2941,17 @@ public final Operation startIPRotation(String name) { /** * Starts master IP rotation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   Operation response = clusterManagerClient.startIPRotation(projectId, zone, clusterId);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://developers.google.com/console/help/new/#projectnumber). This field has been * deprecated and replaced by the name field. @@ -1702,6 +2976,22 @@ public final Operation startIPRotation(String projectId, String zone, String clu /** * Starts master IP rotation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   StartIPRotationRequest request =
+   *       StartIPRotationRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setName("name3373707")
+   *           .setRotateCredentials(true)
+   *           .build();
+   *   Operation response = clusterManagerClient.startIPRotation(request);
+   * }
+   * }
+ * * @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 */ @@ -1714,6 +3004,23 @@ public final Operation startIPRotation(StartIPRotationRequest request) { * Starts master IP rotation. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   StartIPRotationRequest request =
+   *       StartIPRotationRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setName("name3373707")
+   *           .setRotateCredentials(true)
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.startIPRotationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable startIPRotationCallable() { return stub.startIPRotationCallable(); @@ -1723,6 +3030,15 @@ public final UnaryCallable startIPRotationCal /** * Completes master IP rotation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   Operation response = clusterManagerClient.completeIPRotation(name);
+   * }
+   * }
+ * * @param name The name (project, location, cluster id) of the cluster to complete IP rotation. * Specified in the format `projects/*/locations/*/clusters/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1737,6 +3053,17 @@ public final Operation completeIPRotation(String name) { /** * Completes master IP rotation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   Operation response = clusterManagerClient.completeIPRotation(projectId, zone, clusterId);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://developers.google.com/console/help/new/#projectnumber). This field has been * deprecated and replaced by the name field. @@ -1761,6 +3088,21 @@ public final Operation completeIPRotation(String projectId, String zone, String /** * Completes master IP rotation. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   CompleteIPRotationRequest request =
+   *       CompleteIPRotationRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.completeIPRotation(request);
+   * }
+   * }
+ * * @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 */ @@ -1773,6 +3115,22 @@ public final Operation completeIPRotation(CompleteIPRotationRequest request) { * Completes master IP rotation. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   CompleteIPRotationRequest request =
+   *       CompleteIPRotationRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.completeIPRotationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable completeIPRotationCallable() { return stub.completeIPRotationCallable(); @@ -1782,6 +3140,23 @@ public final UnaryCallable completeIPRotat /** * Sets the size for a specific node pool. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetNodePoolSizeRequest request =
+   *       SetNodePoolSizeRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setNodeCount(1539922066)
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setNodePoolSize(request);
+   * }
+   * }
+ * * @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 */ @@ -1794,6 +3169,24 @@ public final Operation setNodePoolSize(SetNodePoolSizeRequest request) { * Sets the size for a specific node pool. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetNodePoolSizeRequest request =
+   *       SetNodePoolSizeRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNodePoolId("nodePoolId1121557241")
+   *           .setNodeCount(1539922066)
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.setNodePoolSizeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setNodePoolSizeCallable() { return stub.setNodePoolSizeCallable(); @@ -1803,6 +3196,16 @@ public final UnaryCallable setNodePoolSizeCal /** * Enables or disables Network Policy for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build();
+   *   Operation response = clusterManagerClient.setNetworkPolicy(name, networkPolicy);
+   * }
+   * }
+ * * @param name The name (project, location, cluster id) of the cluster to set networking policy. * Specified in the format `projects/*/locations/*/clusters/*`. * @param networkPolicy Required. Configuration options for the NetworkPolicy feature. @@ -1818,6 +3221,19 @@ public final Operation setNetworkPolicy(String name, NetworkPolicy networkPolicy /** * Enables or disables Network Policy for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build();
+   *   Operation response =
+   *       clusterManagerClient.setNetworkPolicy(projectId, zone, clusterId, networkPolicy);
+   * }
+   * }
+ * * @param projectId Deprecated. The Google Developers Console [project ID or project * number](https://developers.google.com/console/help/new/#projectnumber). This field has been * deprecated and replaced by the name field. @@ -1845,6 +3261,22 @@ public final Operation setNetworkPolicy( /** * Enables or disables Network Policy for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetNetworkPolicyRequest request =
+   *       SetNetworkPolicyRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNetworkPolicy(NetworkPolicy.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setNetworkPolicy(request);
+   * }
+   * }
+ * * @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 */ @@ -1857,6 +3289,23 @@ public final Operation setNetworkPolicy(SetNetworkPolicyRequest request) { * Enables or disables Network Policy for a cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetNetworkPolicyRequest request =
+   *       SetNetworkPolicyRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setNetworkPolicy(NetworkPolicy.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.setNetworkPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setNetworkPolicyCallable() { return stub.setNetworkPolicyCallable(); @@ -1866,6 +3315,16 @@ public final UnaryCallable setNetworkPolicyC /** * Sets the maintenance policy for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String name = "name3373707";
+   *   MaintenancePolicy maintenancePolicy = MaintenancePolicy.newBuilder().build();
+   *   Operation response = clusterManagerClient.setMaintenancePolicy(name, maintenancePolicy);
+   * }
+   * }
+ * * @param name The name (project, location, cluster id) of the cluster to set maintenance policy. * Specified in the format `projects/*/locations/*/clusters/*`. * @param maintenancePolicy Required. The maintenance policy to be set for the cluster. An empty @@ -1885,6 +3344,19 @@ public final Operation setMaintenancePolicy(String name, MaintenancePolicy maint /** * Sets the maintenance policy for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String projectId = "projectId-894832108";
+   *   String zone = "zone3744684";
+   *   String clusterId = "clusterId561939637";
+   *   MaintenancePolicy maintenancePolicy = MaintenancePolicy.newBuilder().build();
+   *   Operation response =
+   *       clusterManagerClient.setMaintenancePolicy(projectId, zone, clusterId, maintenancePolicy);
+   * }
+   * }
+ * * @param projectId Required. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). * @param zone Required. The name of the Google Compute Engine @@ -1910,6 +3382,22 @@ public final Operation setMaintenancePolicy( /** * Sets the maintenance policy for a cluster. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetMaintenancePolicyRequest request =
+   *       SetMaintenancePolicyRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setMaintenancePolicy(MaintenancePolicy.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   Operation response = clusterManagerClient.setMaintenancePolicy(request);
+   * }
+   * }
+ * * @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 */ @@ -1922,6 +3410,23 @@ public final Operation setMaintenancePolicy(SetMaintenancePolicyRequest request) * Sets the maintenance policy for a cluster. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   SetMaintenancePolicyRequest request =
+   *       SetMaintenancePolicyRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .setZone("zone3744684")
+   *           .setClusterId("clusterId561939637")
+   *           .setMaintenancePolicy(MaintenancePolicy.newBuilder().build())
+   *           .setName("name3373707")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.setMaintenancePolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setMaintenancePolicyCallable() { @@ -1932,6 +3437,24 @@ public final Operation setMaintenancePolicy(SetMaintenancePolicyRequest request) /** * Lists subnetworks that are usable for creating clusters in a project. * + *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   ListUsableSubnetworksRequest request =
+   *       ListUsableSubnetworksRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (UsableSubnetwork element :
+   *       clusterManagerClient.listUsableSubnetworks(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @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 */ @@ -1945,6 +3468,24 @@ public final ListUsableSubnetworksPagedResponse listUsableSubnetworks( * Lists subnetworks that are usable for creating clusters in a project. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   ListUsableSubnetworksRequest request =
+   *       ListUsableSubnetworksRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       clusterManagerClient.listUsableSubnetworksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (UsableSubnetwork element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listUsableSubnetworksPagedCallable() { @@ -1956,6 +3497,24 @@ public final ListUsableSubnetworksPagedResponse listUsableSubnetworks( * Lists subnetworks that are usable for creating clusters in a project. * *

Sample code: + * + *

{@code
+   * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   while (true) {
+   *     ListUsableSubnetworksResponse response =
+   *         clusterManagerClient.listUsableSubnetworksCallable().call(request);
+   *     for (UsableSubnetwork element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listUsableSubnetworksCallable() { diff --git a/google-cloud-container/src/main/java/com/google/cloud/container/v1/package-info.java b/google-cloud-container/src/main/java/com/google/cloud/container/v1/package-info.java index f16f74b8..d14021d4 100644 --- a/google-cloud-container/src/main/java/com/google/cloud/container/v1/package-info.java +++ b/google-cloud-container/src/main/java/com/google/cloud/container/v1/package-info.java @@ -22,6 +22,13 @@ *

Service Description: Google Kubernetes Engine Cluster Manager v1 * *

Sample for ClusterManagerClient: + * + *

{@code
+ * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+ *   String parent = "parent-995424086";
+ *   ListClustersResponse response = clusterManagerClient.listClusters(parent);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.container.v1; diff --git a/synth.metadata b/synth.metadata index e9be0009..145ca045 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-container.git", - "sha": "d0a7b02fa9da889a4f0cd91e6c6536ba7b4aaec9" + "sha": "4cde3031dcb73fac51f5d27fdc82a451d653fb19" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3", - "internalRef": "350949863" + "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb", + "internalRef": "356341083" } }, {