-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: mark service_account_email as deprecated
docs: removing comment from a deprecated field PiperOrigin-RevId: 471626558 Source-Link: googleapis/googleapis@fff3f73 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a032c66713c0a297202a6a597658ff697c536420 Copy-Tag: eyJwIjoiamF2YS1iYXRjaC8uT3dsQm90LnlhbWwiLCJoIjoiYTAzMmM2NjcxM2MwYTI5NzIwMmE2YTU5NzY1OGZmNjk3YzUzNjQyMCJ9
- Loading branch information
1 parent
06a9f95
commit 599c686
Showing
176 changed files
with
141,119 additions
and
0 deletions.
There are no files selected for viewing
1,447 changes: 1,447 additions & 0 deletions
1,447
...tch/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceClient.java
Large diffs are not rendered by default.
Oops, something went wrong.
340 changes: 340 additions & 0 deletions
340
...h/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,340 @@ | ||
/* | ||
* Copyright 2022 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.batch.v1; | ||
|
||
import static com.google.cloud.batch.v1.BatchServiceClient.ListJobsPagedResponse; | ||
import static com.google.cloud.batch.v1.BatchServiceClient.ListLocationsPagedResponse; | ||
import static com.google.cloud.batch.v1.BatchServiceClient.ListTasksPagedResponse; | ||
|
||
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.httpjson.InstantiatingHttpJsonChannelProvider; | ||
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.StubSettings; | ||
import com.google.api.gax.rpc.TransportChannelProvider; | ||
import com.google.api.gax.rpc.UnaryCallSettings; | ||
import com.google.cloud.batch.v1.stub.BatchServiceStubSettings; | ||
import com.google.cloud.location.GetLocationRequest; | ||
import com.google.cloud.location.ListLocationsRequest; | ||
import com.google.cloud.location.ListLocationsResponse; | ||
import com.google.cloud.location.Location; | ||
import com.google.iam.v1.GetIamPolicyRequest; | ||
import com.google.iam.v1.Policy; | ||
import com.google.iam.v1.SetIamPolicyRequest; | ||
import com.google.iam.v1.TestIamPermissionsRequest; | ||
import com.google.iam.v1.TestIamPermissionsResponse; | ||
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 BatchServiceClient}. | ||
* | ||
* <p>The default instance has everything set to sensible defaults: | ||
* | ||
* <ul> | ||
* <li> The default service address (batch.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 createJob to 30 seconds: | ||
* | ||
* <pre>{@code | ||
* // This snippet has been automatically generated for illustrative purposes only. | ||
* // It may require modifications to work in your environment. | ||
* BatchServiceSettings.Builder batchServiceSettingsBuilder = BatchServiceSettings.newBuilder(); | ||
* batchServiceSettingsBuilder | ||
* .createJobSettings() | ||
* .setRetrySettings( | ||
* batchServiceSettingsBuilder | ||
* .createJobSettings() | ||
* .getRetrySettings() | ||
* .toBuilder() | ||
* .setTotalTimeout(Duration.ofSeconds(30)) | ||
* .build()); | ||
* BatchServiceSettings batchServiceSettings = batchServiceSettingsBuilder.build(); | ||
* }</pre> | ||
*/ | ||
@Generated("by gapic-generator-java") | ||
public class BatchServiceSettings extends ClientSettings<BatchServiceSettings> { | ||
|
||
/** Returns the object with the settings used for calls to createJob. */ | ||
public UnaryCallSettings<CreateJobRequest, Job> createJobSettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).createJobSettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to getJob. */ | ||
public UnaryCallSettings<GetJobRequest, Job> getJobSettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).getJobSettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to deleteJob. */ | ||
public UnaryCallSettings<DeleteJobRequest, Operation> deleteJobSettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).deleteJobSettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to deleteJob. */ | ||
public OperationCallSettings<DeleteJobRequest, Empty, OperationMetadata> | ||
deleteJobOperationSettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).deleteJobOperationSettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to listJobs. */ | ||
public PagedCallSettings<ListJobsRequest, ListJobsResponse, ListJobsPagedResponse> | ||
listJobsSettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).listJobsSettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to getTask. */ | ||
public UnaryCallSettings<GetTaskRequest, Task> getTaskSettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).getTaskSettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to listTasks. */ | ||
public PagedCallSettings<ListTasksRequest, ListTasksResponse, ListTasksPagedResponse> | ||
listTasksSettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).listTasksSettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to listLocations. */ | ||
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> | ||
listLocationsSettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).listLocationsSettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to getLocation. */ | ||
public UnaryCallSettings<GetLocationRequest, Location> getLocationSettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).getLocationSettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to setIamPolicy. */ | ||
public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).setIamPolicySettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to getIamPolicy. */ | ||
public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).getIamPolicySettings(); | ||
} | ||
|
||
/** Returns the object with the settings used for calls to testIamPermissions. */ | ||
public UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse> | ||
testIamPermissionsSettings() { | ||
return ((BatchServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); | ||
} | ||
|
||
public static final BatchServiceSettings create(BatchServiceStubSettings stub) | ||
throws IOException { | ||
return new BatchServiceSettings.Builder(stub.toBuilder()).build(); | ||
} | ||
|
||
/** Returns a builder for the default ExecutorProvider for this service. */ | ||
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { | ||
return BatchServiceStubSettings.defaultExecutorProviderBuilder(); | ||
} | ||
|
||
/** Returns the default service endpoint. */ | ||
public static String getDefaultEndpoint() { | ||
return BatchServiceStubSettings.getDefaultEndpoint(); | ||
} | ||
|
||
/** Returns the default service scopes. */ | ||
public static List<String> getDefaultServiceScopes() { | ||
return BatchServiceStubSettings.getDefaultServiceScopes(); | ||
} | ||
|
||
/** Returns a builder for the default credentials for this service. */ | ||
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { | ||
return BatchServiceStubSettings.defaultCredentialsProviderBuilder(); | ||
} | ||
|
||
/** Returns a builder for the default gRPC ChannelProvider for this service. */ | ||
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { | ||
return BatchServiceStubSettings.defaultGrpcTransportProviderBuilder(); | ||
} | ||
|
||
/** Returns a builder for the default REST ChannelProvider for this service. */ | ||
@BetaApi | ||
public static InstantiatingHttpJsonChannelProvider.Builder | ||
defaultHttpJsonTransportProviderBuilder() { | ||
return BatchServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); | ||
} | ||
|
||
public static TransportChannelProvider defaultTransportChannelProvider() { | ||
return BatchServiceStubSettings.defaultTransportChannelProvider(); | ||
} | ||
|
||
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.") | ||
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { | ||
return BatchServiceStubSettings.defaultApiClientHeaderProviderBuilder(); | ||
} | ||
|
||
/** Returns a new gRPC builder for this class. */ | ||
public static Builder newBuilder() { | ||
return Builder.createDefault(); | ||
} | ||
|
||
/** Returns a new REST builder for this class. */ | ||
@BetaApi | ||
public static Builder newHttpJsonBuilder() { | ||
return Builder.createHttpJsonDefault(); | ||
} | ||
|
||
/** 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 BatchServiceSettings(Builder settingsBuilder) throws IOException { | ||
super(settingsBuilder); | ||
} | ||
|
||
/** Builder for BatchServiceSettings. */ | ||
public static class Builder extends ClientSettings.Builder<BatchServiceSettings, Builder> { | ||
|
||
protected Builder() throws IOException { | ||
this(((ClientContext) null)); | ||
} | ||
|
||
protected Builder(ClientContext clientContext) { | ||
super(BatchServiceStubSettings.newBuilder(clientContext)); | ||
} | ||
|
||
protected Builder(BatchServiceSettings settings) { | ||
super(settings.getStubSettings().toBuilder()); | ||
} | ||
|
||
protected Builder(BatchServiceStubSettings.Builder stubSettings) { | ||
super(stubSettings); | ||
} | ||
|
||
private static Builder createDefault() { | ||
return new Builder(BatchServiceStubSettings.newBuilder()); | ||
} | ||
|
||
@BetaApi | ||
private static Builder createHttpJsonDefault() { | ||
return new Builder(BatchServiceStubSettings.newHttpJsonBuilder()); | ||
} | ||
|
||
public BatchServiceStubSettings.Builder getStubSettingsBuilder() { | ||
return ((BatchServiceStubSettings.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 createJob. */ | ||
public UnaryCallSettings.Builder<CreateJobRequest, Job> createJobSettings() { | ||
return getStubSettingsBuilder().createJobSettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to getJob. */ | ||
public UnaryCallSettings.Builder<GetJobRequest, Job> getJobSettings() { | ||
return getStubSettingsBuilder().getJobSettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to deleteJob. */ | ||
public UnaryCallSettings.Builder<DeleteJobRequest, Operation> deleteJobSettings() { | ||
return getStubSettingsBuilder().deleteJobSettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to deleteJob. */ | ||
public OperationCallSettings.Builder<DeleteJobRequest, Empty, OperationMetadata> | ||
deleteJobOperationSettings() { | ||
return getStubSettingsBuilder().deleteJobOperationSettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to listJobs. */ | ||
public PagedCallSettings.Builder<ListJobsRequest, ListJobsResponse, ListJobsPagedResponse> | ||
listJobsSettings() { | ||
return getStubSettingsBuilder().listJobsSettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to getTask. */ | ||
public UnaryCallSettings.Builder<GetTaskRequest, Task> getTaskSettings() { | ||
return getStubSettingsBuilder().getTaskSettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to listTasks. */ | ||
public PagedCallSettings.Builder<ListTasksRequest, ListTasksResponse, ListTasksPagedResponse> | ||
listTasksSettings() { | ||
return getStubSettingsBuilder().listTasksSettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to listLocations. */ | ||
public PagedCallSettings.Builder< | ||
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> | ||
listLocationsSettings() { | ||
return getStubSettingsBuilder().listLocationsSettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to getLocation. */ | ||
public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettings() { | ||
return getStubSettingsBuilder().getLocationSettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to setIamPolicy. */ | ||
public UnaryCallSettings.Builder<SetIamPolicyRequest, Policy> setIamPolicySettings() { | ||
return getStubSettingsBuilder().setIamPolicySettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to getIamPolicy. */ | ||
public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettings() { | ||
return getStubSettingsBuilder().getIamPolicySettings(); | ||
} | ||
|
||
/** Returns the builder for the settings used for calls to testIamPermissions. */ | ||
public UnaryCallSettings.Builder<TestIamPermissionsRequest, TestIamPermissionsResponse> | ||
testIamPermissionsSettings() { | ||
return getStubSettingsBuilder().testIamPermissionsSettings(); | ||
} | ||
|
||
@Override | ||
public BatchServiceSettings build() throws IOException { | ||
return new BatchServiceSettings(this); | ||
} | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...a-batch/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/gapic_metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"schema": "1.0", | ||
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods", | ||
"language": "java", | ||
"protoPackage": "google.cloud.batch.v1", | ||
"libraryPackage": "com.google.cloud.batch.v1", | ||
"services": { | ||
"BatchService": { | ||
"clients": { | ||
"grpc": { | ||
"libraryClient": "BatchServiceClient", | ||
"rpcs": { | ||
"CreateJob": { | ||
"methods": ["createJob", "createJob", "createJob", "createJobCallable"] | ||
}, | ||
"DeleteJob": { | ||
"methods": ["deleteJobAsync", "deleteJobAsync", "deleteJobOperationCallable", "deleteJobCallable"] | ||
}, | ||
"GetIamPolicy": { | ||
"methods": ["getIamPolicy", "getIamPolicyCallable"] | ||
}, | ||
"GetJob": { | ||
"methods": ["getJob", "getJob", "getJob", "getJobCallable"] | ||
}, | ||
"GetLocation": { | ||
"methods": ["getLocation", "getLocationCallable"] | ||
}, | ||
"GetTask": { | ||
"methods": ["getTask", "getTask", "getTask", "getTaskCallable"] | ||
}, | ||
"ListJobs": { | ||
"methods": ["listJobs", "listJobs", "listJobsPagedCallable", "listJobsCallable"] | ||
}, | ||
"ListLocations": { | ||
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] | ||
}, | ||
"ListTasks": { | ||
"methods": ["listTasks", "listTasks", "listTasks", "listTasksPagedCallable", "listTasksCallable"] | ||
}, | ||
"SetIamPolicy": { | ||
"methods": ["setIamPolicy", "setIamPolicyCallable"] | ||
}, | ||
"TestIamPermissions": { | ||
"methods": ["testIamPermissions", "testIamPermissionsCallable"] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.