Skip to content
Permalink
Browse files
feat: Add support for dataproc BatchController service (#719)
* feat: Add support for dataproc BatchController service

PiperOrigin-RevId: 404333740

Source-Link: googleapis/googleapis@5088bd7

Source-Link: https://github.com/googleapis/googleapis-gen/commit/44b870783c1943771bcdec748ae4d5208c3d7f0e
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDRiODcwNzgzYzE5NDM3NzFiY2RlYzc0OGFlNGQ1MjA4YzNkN2YwZSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Oct 21, 2021
1 parent 51cd3d2 commit 4556a3fc0de8e432c0abd12b5ee0d6b013448b36
Showing with 25,082 additions and 0 deletions.
  1. +732 −0 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/BatchControllerClient.java
  2. +232 −0 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/BatchControllerSettings.java
  3. +21 −0 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/gapic_metadata.json
  4. +13 −0 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java
  5. +76 −0 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/BatchControllerStub.java
  6. +448 −0 ...e-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/BatchControllerStubSettings.java
  7. +113 −0 ...-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcBatchControllerCallableFactory.java
  8. +277 −0 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcBatchControllerStub.java
  9. +468 −0 google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/BatchControllerClientTest.java
  10. +59 −0 google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockBatchController.java
  11. +143 −0 google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockBatchControllerImpl.java
  12. +693 −0 grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchControllerGrpc.java
  13. +6,770 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Batch.java
  14. +223 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchName.java
  15. +694 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchOrBuilder.java
  16. +357 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchesProto.java
  17. +1,364 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateBatchRequest.java
  18. +164 −0 ...gle-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateBatchRequestOrBuilder.java
  19. +649 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteBatchRequest.java
  20. +54 −0 ...gle-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteBatchRequestOrBuilder.java
  21. +648 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetBatchRequest.java
  22. +54 −0 ...google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetBatchRequestOrBuilder.java
  23. +933 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesRequest.java
  24. +96 −0 ...gle-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesRequestOrBuilder.java
  25. +1,133 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesResponse.java
  26. +103 −0 ...le-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesResponseOrBuilder.java
  27. +2,122 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkBatch.java
  28. +335 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkBatchOrBuilder.java
  29. +2,198 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkBatch.java
  30. +332 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkBatchOrBuilder.java
  31. +1,541 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRBatch.java
  32. +225 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRBatchOrBuilder.java
  33. +1,275 −0 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlBatch.java
  34. +165 −0 ...o-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlBatchOrBuilder.java
  35. +372 −0 proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/batches.proto

Large diffs are not rendered by default.

@@ -0,0 +1,232 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.dataproc.v1;

import static com.google.cloud.dataproc.v1.BatchControllerClient.ListBatchesPagedResponse;

import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.OperationCallSettings;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.dataproc.v1.stub.BatchControllerStubSettings;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Settings class to configure an instance of {@link BatchControllerClient}.
*
* <p>The default instance has everything set to sensible defaults:
*
* <ul>
* <li>The default service address (dataproc.googleapis.com) and default port (443) are used.
* <li>Credentials are acquired automatically through Application Default Credentials.
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
* </ul>
*
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
* <p>For example, to set the total timeout of getBatch to 30 seconds:
*
* <pre>{@code
* BatchControllerSettings.Builder batchControllerSettingsBuilder =
* BatchControllerSettings.newBuilder();
* batchControllerSettingsBuilder
* .getBatchSettings()
* .setRetrySettings(
* batchControllerSettingsBuilder
* .getBatchSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* BatchControllerSettings batchControllerSettings = batchControllerSettingsBuilder.build();
* }</pre>
*/
@Generated("by gapic-generator-java")
public class BatchControllerSettings extends ClientSettings<BatchControllerSettings> {

/** Returns the object with the settings used for calls to createBatch. */
public UnaryCallSettings<CreateBatchRequest, Operation> createBatchSettings() {
return ((BatchControllerStubSettings) getStubSettings()).createBatchSettings();
}

/** Returns the object with the settings used for calls to createBatch. */
public OperationCallSettings<CreateBatchRequest, Batch, BatchOperationMetadata>
createBatchOperationSettings() {
return ((BatchControllerStubSettings) getStubSettings()).createBatchOperationSettings();
}

/** Returns the object with the settings used for calls to getBatch. */
public UnaryCallSettings<GetBatchRequest, Batch> getBatchSettings() {
return ((BatchControllerStubSettings) getStubSettings()).getBatchSettings();
}

/** Returns the object with the settings used for calls to listBatches. */
public PagedCallSettings<ListBatchesRequest, ListBatchesResponse, ListBatchesPagedResponse>
listBatchesSettings() {
return ((BatchControllerStubSettings) getStubSettings()).listBatchesSettings();
}

/** Returns the object with the settings used for calls to deleteBatch. */
public UnaryCallSettings<DeleteBatchRequest, Empty> deleteBatchSettings() {
return ((BatchControllerStubSettings) getStubSettings()).deleteBatchSettings();
}

public static final BatchControllerSettings create(BatchControllerStubSettings stub)
throws IOException {
return new BatchControllerSettings.Builder(stub.toBuilder()).build();
}

/** Returns a builder for the default ExecutorProvider for this service. */
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
return BatchControllerStubSettings.defaultExecutorProviderBuilder();
}

/** Returns the default service endpoint. */
public static String getDefaultEndpoint() {
return BatchControllerStubSettings.getDefaultEndpoint();
}

/** Returns the default service scopes. */
public static List<String> getDefaultServiceScopes() {
return BatchControllerStubSettings.getDefaultServiceScopes();
}

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return BatchControllerStubSettings.defaultCredentialsProviderBuilder();
}

/** Returns a builder for the default ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return BatchControllerStubSettings.defaultGrpcTransportProviderBuilder();
}

public static TransportChannelProvider defaultTransportChannelProvider() {
return BatchControllerStubSettings.defaultTransportChannelProvider();
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return BatchControllerStubSettings.defaultApiClientHeaderProviderBuilder();
}

/** Returns a new builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}

/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
}

/** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}

protected BatchControllerSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
}

/** Builder for BatchControllerSettings. */
public static class Builder extends ClientSettings.Builder<BatchControllerSettings, Builder> {

protected Builder() throws IOException {
this(((ClientContext) null));
}

protected Builder(ClientContext clientContext) {
super(BatchControllerStubSettings.newBuilder(clientContext));
}

protected Builder(BatchControllerSettings settings) {
super(settings.getStubSettings().toBuilder());
}

protected Builder(BatchControllerStubSettings.Builder stubSettings) {
super(stubSettings);
}

private static Builder createDefault() {
return new Builder(BatchControllerStubSettings.newBuilder());
}

public BatchControllerStubSettings.Builder getStubSettingsBuilder() {
return ((BatchControllerStubSettings.Builder) getStubSettings());
}

/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
}

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

/** Returns the builder for the settings used for calls to createBatch. */
public OperationCallSettings.Builder<CreateBatchRequest, Batch, BatchOperationMetadata>
createBatchOperationSettings() {
return getStubSettingsBuilder().createBatchOperationSettings();
}

/** Returns the builder for the settings used for calls to getBatch. */
public UnaryCallSettings.Builder<GetBatchRequest, Batch> getBatchSettings() {
return getStubSettingsBuilder().getBatchSettings();
}

/** Returns the builder for the settings used for calls to listBatches. */
public PagedCallSettings.Builder<
ListBatchesRequest, ListBatchesResponse, ListBatchesPagedResponse>
listBatchesSettings() {
return getStubSettingsBuilder().listBatchesSettings();
}

/** Returns the builder for the settings used for calls to deleteBatch. */
public UnaryCallSettings.Builder<DeleteBatchRequest, Empty> deleteBatchSettings() {
return getStubSettingsBuilder().deleteBatchSettings();
}

@Override
public BatchControllerSettings build() throws IOException {
return new BatchControllerSettings(this);
}
}
}
@@ -29,6 +29,27 @@
}
}
},
"BatchController": {
"clients": {
"grpc": {
"libraryClient": "BatchControllerClient",
"rpcs": {
"CreateBatch": {
"methods": ["createBatchAsync", "createBatchAsync", "createBatchAsync", "createBatchOperationCallable", "createBatchCallable"]
},
"DeleteBatch": {
"methods": ["deleteBatch", "deleteBatch", "deleteBatch", "deleteBatchCallable"]
},
"GetBatch": {
"methods": ["getBatch", "getBatch", "getBatch", "getBatchCallable"]
},
"ListBatches": {
"methods": ["listBatches", "listBatches", "listBatches", "listBatchesPagedCallable", "listBatchesCallable"]
}
}
}
}
},
"ClusterController": {
"clients": {
"grpc": {
@@ -33,6 +33,19 @@
* }
* }</pre>
*
* <p>======================= BatchControllerClient =======================
*
* <p>Service Description: The BatchController provides methods to manage batch workloads.
*
* <p>Sample for BatchControllerClient:
*
* <pre>{@code
* try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
* BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]");
* Batch response = batchControllerClient.getBatch(name);
* }
* }</pre>
*
* <p>======================= ClusterControllerClient =======================
*
* <p>Service Description: The ClusterControllerService provides methods to manage clusters of
@@ -0,0 +1,76 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.dataproc.v1.stub;

import static com.google.cloud.dataproc.v1.BatchControllerClient.ListBatchesPagedResponse;

import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.dataproc.v1.Batch;
import com.google.cloud.dataproc.v1.BatchOperationMetadata;
import com.google.cloud.dataproc.v1.CreateBatchRequest;
import com.google.cloud.dataproc.v1.DeleteBatchRequest;
import com.google.cloud.dataproc.v1.GetBatchRequest;
import com.google.cloud.dataproc.v1.ListBatchesRequest;
import com.google.cloud.dataproc.v1.ListBatchesResponse;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import com.google.protobuf.Empty;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Base stub class for the BatchController service API.
*
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
public abstract class BatchControllerStub implements BackgroundResource {

public OperationsStub getOperationsStub() {
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
}

public OperationCallable<CreateBatchRequest, Batch, BatchOperationMetadata>
createBatchOperationCallable() {
throw new UnsupportedOperationException("Not implemented: createBatchOperationCallable()");
}

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

public UnaryCallable<GetBatchRequest, Batch> getBatchCallable() {
throw new UnsupportedOperationException("Not implemented: getBatchCallable()");
}

public UnaryCallable<ListBatchesRequest, ListBatchesPagedResponse> listBatchesPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listBatchesPagedCallable()");
}

public UnaryCallable<ListBatchesRequest, ListBatchesResponse> listBatchesCallable() {
throw new UnsupportedOperationException("Not implemented: listBatchesCallable()");
}

public UnaryCallable<DeleteBatchRequest, Empty> deleteBatchCallable() {
throw new UnsupportedOperationException("Not implemented: deleteBatchCallable()");
}

@Override
public abstract void close();
}

0 comments on commit 4556a3f

Please sign in to comment.