Navigation Menu

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

Commit

Permalink
feat: update the Dataproc V1 API client library (#497)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/910f143f-7dd7-4a06-8fca-74558edd8e86/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

PiperOrigin-RevId: 367518225
Source-Link: googleapis/googleapis@439f098
  • Loading branch information
yoshi-automation committed Apr 9, 2021
1 parent 7064178 commit 3c78a97
Show file tree
Hide file tree
Showing 81 changed files with 15,700 additions and 1,034 deletions.
Expand Up @@ -448,6 +448,172 @@ public final UnaryCallable<UpdateClusterRequest, Operation> updateClusterCallabl
return stub.updateClusterCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Stops a cluster in a project.
*
* <p>Sample code:
*
* <pre>{@code
* try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
* StopClusterRequest request =
* StopClusterRequest.newBuilder()
* .setProjectId("projectId-894832108")
* .setRegion("region-934795532")
* .setClusterName("clusterName-1141738587")
* .setClusterUuid("clusterUuid-1141510955")
* .setRequestId("requestId693933066")
* .build();
* Cluster response = clusterControllerClient.stopClusterAsync(request).get();
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<Cluster, ClusterOperationMetadata> stopClusterAsync(
StopClusterRequest request) {
return stopClusterOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Stops a cluster in a project.
*
* <p>Sample code:
*
* <pre>{@code
* try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
* StopClusterRequest request =
* StopClusterRequest.newBuilder()
* .setProjectId("projectId-894832108")
* .setRegion("region-934795532")
* .setClusterName("clusterName-1141738587")
* .setClusterUuid("clusterUuid-1141510955")
* .setRequestId("requestId693933066")
* .build();
* OperationFuture<Cluster, ClusterOperationMetadata> future =
* clusterControllerClient.stopClusterOperationCallable().futureCall(request);
* // Do something.
* Cluster response = future.get();
* }
* }</pre>
*/
public final OperationCallable<StopClusterRequest, Cluster, ClusterOperationMetadata>
stopClusterOperationCallable() {
return stub.stopClusterOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Stops a cluster in a project.
*
* <p>Sample code:
*
* <pre>{@code
* try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
* StopClusterRequest request =
* StopClusterRequest.newBuilder()
* .setProjectId("projectId-894832108")
* .setRegion("region-934795532")
* .setClusterName("clusterName-1141738587")
* .setClusterUuid("clusterUuid-1141510955")
* .setRequestId("requestId693933066")
* .build();
* ApiFuture<Operation> future =
* clusterControllerClient.stopClusterCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<StopClusterRequest, Operation> stopClusterCallable() {
return stub.stopClusterCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Starts a cluster in a project.
*
* <p>Sample code:
*
* <pre>{@code
* try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
* StartClusterRequest request =
* StartClusterRequest.newBuilder()
* .setProjectId("projectId-894832108")
* .setRegion("region-934795532")
* .setClusterName("clusterName-1141738587")
* .setClusterUuid("clusterUuid-1141510955")
* .setRequestId("requestId693933066")
* .build();
* Cluster response = clusterControllerClient.startClusterAsync(request).get();
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<Cluster, ClusterOperationMetadata> startClusterAsync(
StartClusterRequest request) {
return startClusterOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Starts a cluster in a project.
*
* <p>Sample code:
*
* <pre>{@code
* try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
* StartClusterRequest request =
* StartClusterRequest.newBuilder()
* .setProjectId("projectId-894832108")
* .setRegion("region-934795532")
* .setClusterName("clusterName-1141738587")
* .setClusterUuid("clusterUuid-1141510955")
* .setRequestId("requestId693933066")
* .build();
* OperationFuture<Cluster, ClusterOperationMetadata> future =
* clusterControllerClient.startClusterOperationCallable().futureCall(request);
* // Do something.
* Cluster response = future.get();
* }
* }</pre>
*/
public final OperationCallable<StartClusterRequest, Cluster, ClusterOperationMetadata>
startClusterOperationCallable() {
return stub.startClusterOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Starts a cluster in a project.
*
* <p>Sample code:
*
* <pre>{@code
* try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
* StartClusterRequest request =
* StartClusterRequest.newBuilder()
* .setProjectId("projectId-894832108")
* .setRegion("region-934795532")
* .setClusterName("clusterName-1141738587")
* .setClusterUuid("clusterUuid-1141510955")
* .setRequestId("requestId693933066")
* .build();
* ApiFuture<Operation> future =
* clusterControllerClient.startClusterCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<StartClusterRequest, Operation> startClusterCallable() {
return stub.startClusterCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a cluster in a project. The returned
Expand Down
Expand Up @@ -94,6 +94,28 @@ public UnaryCallSettings<UpdateClusterRequest, Operation> updateClusterSettings(
return ((ClusterControllerStubSettings) getStubSettings()).updateClusterOperationSettings();
}

/** Returns the object with the settings used for calls to stopCluster. */
public UnaryCallSettings<StopClusterRequest, Operation> stopClusterSettings() {
return ((ClusterControllerStubSettings) getStubSettings()).stopClusterSettings();
}

/** Returns the object with the settings used for calls to stopCluster. */
public OperationCallSettings<StopClusterRequest, Cluster, ClusterOperationMetadata>
stopClusterOperationSettings() {
return ((ClusterControllerStubSettings) getStubSettings()).stopClusterOperationSettings();
}

/** Returns the object with the settings used for calls to startCluster. */
public UnaryCallSettings<StartClusterRequest, Operation> startClusterSettings() {
return ((ClusterControllerStubSettings) getStubSettings()).startClusterSettings();
}

/** Returns the object with the settings used for calls to startCluster. */
public OperationCallSettings<StartClusterRequest, Cluster, ClusterOperationMetadata>
startClusterOperationSettings() {
return ((ClusterControllerStubSettings) getStubSettings()).startClusterOperationSettings();
}

/** Returns the object with the settings used for calls to deleteCluster. */
public UnaryCallSettings<DeleteClusterRequest, Operation> deleteClusterSettings() {
return ((ClusterControllerStubSettings) getStubSettings()).deleteClusterSettings();
Expand Down Expand Up @@ -248,6 +270,28 @@ public UnaryCallSettings.Builder<UpdateClusterRequest, Operation> updateClusterS
return getStubSettingsBuilder().updateClusterOperationSettings();
}

/** Returns the builder for the settings used for calls to stopCluster. */
public UnaryCallSettings.Builder<StopClusterRequest, Operation> stopClusterSettings() {
return getStubSettingsBuilder().stopClusterSettings();
}

/** Returns the builder for the settings used for calls to stopCluster. */
public OperationCallSettings.Builder<StopClusterRequest, Cluster, ClusterOperationMetadata>
stopClusterOperationSettings() {
return getStubSettingsBuilder().stopClusterOperationSettings();
}

/** Returns the builder for the settings used for calls to startCluster. */
public UnaryCallSettings.Builder<StartClusterRequest, Operation> startClusterSettings() {
return getStubSettingsBuilder().startClusterSettings();
}

/** Returns the builder for the settings used for calls to startCluster. */
public OperationCallSettings.Builder<StartClusterRequest, Cluster, ClusterOperationMetadata>
startClusterOperationSettings() {
return getStubSettingsBuilder().startClusterOperationSettings();
}

/** Returns the builder for the settings used for calls to deleteCluster. */
public UnaryCallSettings.Builder<DeleteClusterRequest, Operation> deleteClusterSettings() {
return getStubSettingsBuilder().deleteClusterSettings();
Expand Down
Expand Up @@ -647,7 +647,7 @@ public final OperationFuture<Empty, WorkflowMetadata> instantiateWorkflowTemplat
* </ul>
*
* @param parameters Optional. Map from parameter names to values that should be used for those
* parameters. Values may not exceed 100 characters.
* parameters. Values may not exceed 1000 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<Empty, WorkflowMetadata> instantiateWorkflowTemplateAsync(
Expand Down Expand Up @@ -708,7 +708,7 @@ public final OperationFuture<Empty, WorkflowMetadata> instantiateWorkflowTemplat
* </ul>
*
* @param parameters Optional. Map from parameter names to values that should be used for those
* parameters. Values may not exceed 100 characters.
* parameters. Values may not exceed 1000 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<Empty, WorkflowMetadata> instantiateWorkflowTemplateAsync(
Expand Down
Expand Up @@ -49,6 +49,12 @@
"ListClusters": {
"methods": ["listClusters", "listClusters", "listClusters", "listClustersPagedCallable", "listClustersCallable"]
},
"StartCluster": {
"methods": ["startClusterAsync", "startClusterOperationCallable", "startClusterCallable"]
},
"StopCluster": {
"methods": ["stopClusterAsync", "stopClusterOperationCallable", "stopClusterCallable"]
},
"UpdateCluster": {
"methods": ["updateClusterAsync", "updateClusterAsync", "updateClusterOperationCallable", "updateClusterCallable"]
}
Expand Down
Expand Up @@ -30,6 +30,8 @@
import com.google.cloud.dataproc.v1.GetClusterRequest;
import com.google.cloud.dataproc.v1.ListClustersRequest;
import com.google.cloud.dataproc.v1.ListClustersResponse;
import com.google.cloud.dataproc.v1.StartClusterRequest;
import com.google.cloud.dataproc.v1.StopClusterRequest;
import com.google.cloud.dataproc.v1.UpdateClusterRequest;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
Expand Down Expand Up @@ -67,6 +69,24 @@ public UnaryCallable<UpdateClusterRequest, Operation> updateClusterCallable() {
throw new UnsupportedOperationException("Not implemented: updateClusterCallable()");
}

public OperationCallable<StopClusterRequest, Cluster, ClusterOperationMetadata>
stopClusterOperationCallable() {
throw new UnsupportedOperationException("Not implemented: stopClusterOperationCallable()");
}

public UnaryCallable<StopClusterRequest, Operation> stopClusterCallable() {
throw new UnsupportedOperationException("Not implemented: stopClusterCallable()");
}

public OperationCallable<StartClusterRequest, Cluster, ClusterOperationMetadata>
startClusterOperationCallable() {
throw new UnsupportedOperationException("Not implemented: startClusterOperationCallable()");
}

public UnaryCallable<StartClusterRequest, Operation> startClusterCallable() {
throw new UnsupportedOperationException("Not implemented: startClusterCallable()");
}

public OperationCallable<DeleteClusterRequest, Empty, ClusterOperationMetadata>
deleteClusterOperationCallable() {
throw new UnsupportedOperationException("Not implemented: deleteClusterOperationCallable()");
Expand Down

0 comments on commit 3c78a97

Please sign in to comment.