Skip to content

Commit 599c686

Browse files
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
1 parent 06a9f95 commit 599c686

File tree

176 files changed

+141119
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+141119
-0
lines changed

owl-bot-staging/java-batch/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceClient.java

Lines changed: 1447 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,340 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.batch.v1;
18+
19+
import static com.google.cloud.batch.v1.BatchServiceClient.ListJobsPagedResponse;
20+
import static com.google.cloud.batch.v1.BatchServiceClient.ListLocationsPagedResponse;
21+
import static com.google.cloud.batch.v1.BatchServiceClient.ListTasksPagedResponse;
22+
23+
import com.google.api.core.ApiFunction;
24+
import com.google.api.core.BetaApi;
25+
import com.google.api.gax.core.GoogleCredentialsProvider;
26+
import com.google.api.gax.core.InstantiatingExecutorProvider;
27+
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
28+
import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
29+
import com.google.api.gax.rpc.ApiClientHeaderProvider;
30+
import com.google.api.gax.rpc.ClientContext;
31+
import com.google.api.gax.rpc.ClientSettings;
32+
import com.google.api.gax.rpc.OperationCallSettings;
33+
import com.google.api.gax.rpc.PagedCallSettings;
34+
import com.google.api.gax.rpc.StubSettings;
35+
import com.google.api.gax.rpc.TransportChannelProvider;
36+
import com.google.api.gax.rpc.UnaryCallSettings;
37+
import com.google.cloud.batch.v1.stub.BatchServiceStubSettings;
38+
import com.google.cloud.location.GetLocationRequest;
39+
import com.google.cloud.location.ListLocationsRequest;
40+
import com.google.cloud.location.ListLocationsResponse;
41+
import com.google.cloud.location.Location;
42+
import com.google.iam.v1.GetIamPolicyRequest;
43+
import com.google.iam.v1.Policy;
44+
import com.google.iam.v1.SetIamPolicyRequest;
45+
import com.google.iam.v1.TestIamPermissionsRequest;
46+
import com.google.iam.v1.TestIamPermissionsResponse;
47+
import com.google.longrunning.Operation;
48+
import com.google.protobuf.Empty;
49+
import java.io.IOException;
50+
import java.util.List;
51+
import javax.annotation.Generated;
52+
53+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
54+
/**
55+
* Settings class to configure an instance of {@link BatchServiceClient}.
56+
*
57+
* <p>The default instance has everything set to sensible defaults:
58+
*
59+
* <ul>
60+
* <li> The default service address (batch.googleapis.com) and default port (443) are used.
61+
* <li> Credentials are acquired automatically through Application Default Credentials.
62+
* <li> Retries are configured for idempotent methods but not for non-idempotent methods.
63+
* </ul>
64+
*
65+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
66+
* build() is called, the tree of builders is called to create the complete settings object.
67+
*
68+
* <p>For example, to set the total timeout of createJob to 30 seconds:
69+
*
70+
* <pre>{@code
71+
* // This snippet has been automatically generated for illustrative purposes only.
72+
* // It may require modifications to work in your environment.
73+
* BatchServiceSettings.Builder batchServiceSettingsBuilder = BatchServiceSettings.newBuilder();
74+
* batchServiceSettingsBuilder
75+
* .createJobSettings()
76+
* .setRetrySettings(
77+
* batchServiceSettingsBuilder
78+
* .createJobSettings()
79+
* .getRetrySettings()
80+
* .toBuilder()
81+
* .setTotalTimeout(Duration.ofSeconds(30))
82+
* .build());
83+
* BatchServiceSettings batchServiceSettings = batchServiceSettingsBuilder.build();
84+
* }</pre>
85+
*/
86+
@Generated("by gapic-generator-java")
87+
public class BatchServiceSettings extends ClientSettings<BatchServiceSettings> {
88+
89+
/** Returns the object with the settings used for calls to createJob. */
90+
public UnaryCallSettings<CreateJobRequest, Job> createJobSettings() {
91+
return ((BatchServiceStubSettings) getStubSettings()).createJobSettings();
92+
}
93+
94+
/** Returns the object with the settings used for calls to getJob. */
95+
public UnaryCallSettings<GetJobRequest, Job> getJobSettings() {
96+
return ((BatchServiceStubSettings) getStubSettings()).getJobSettings();
97+
}
98+
99+
/** Returns the object with the settings used for calls to deleteJob. */
100+
public UnaryCallSettings<DeleteJobRequest, Operation> deleteJobSettings() {
101+
return ((BatchServiceStubSettings) getStubSettings()).deleteJobSettings();
102+
}
103+
104+
/** Returns the object with the settings used for calls to deleteJob. */
105+
public OperationCallSettings<DeleteJobRequest, Empty, OperationMetadata>
106+
deleteJobOperationSettings() {
107+
return ((BatchServiceStubSettings) getStubSettings()).deleteJobOperationSettings();
108+
}
109+
110+
/** Returns the object with the settings used for calls to listJobs. */
111+
public PagedCallSettings<ListJobsRequest, ListJobsResponse, ListJobsPagedResponse>
112+
listJobsSettings() {
113+
return ((BatchServiceStubSettings) getStubSettings()).listJobsSettings();
114+
}
115+
116+
/** Returns the object with the settings used for calls to getTask. */
117+
public UnaryCallSettings<GetTaskRequest, Task> getTaskSettings() {
118+
return ((BatchServiceStubSettings) getStubSettings()).getTaskSettings();
119+
}
120+
121+
/** Returns the object with the settings used for calls to listTasks. */
122+
public PagedCallSettings<ListTasksRequest, ListTasksResponse, ListTasksPagedResponse>
123+
listTasksSettings() {
124+
return ((BatchServiceStubSettings) getStubSettings()).listTasksSettings();
125+
}
126+
127+
/** Returns the object with the settings used for calls to listLocations. */
128+
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
129+
listLocationsSettings() {
130+
return ((BatchServiceStubSettings) getStubSettings()).listLocationsSettings();
131+
}
132+
133+
/** Returns the object with the settings used for calls to getLocation. */
134+
public UnaryCallSettings<GetLocationRequest, Location> getLocationSettings() {
135+
return ((BatchServiceStubSettings) getStubSettings()).getLocationSettings();
136+
}
137+
138+
/** Returns the object with the settings used for calls to setIamPolicy. */
139+
public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() {
140+
return ((BatchServiceStubSettings) getStubSettings()).setIamPolicySettings();
141+
}
142+
143+
/** Returns the object with the settings used for calls to getIamPolicy. */
144+
public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
145+
return ((BatchServiceStubSettings) getStubSettings()).getIamPolicySettings();
146+
}
147+
148+
/** Returns the object with the settings used for calls to testIamPermissions. */
149+
public UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
150+
testIamPermissionsSettings() {
151+
return ((BatchServiceStubSettings) getStubSettings()).testIamPermissionsSettings();
152+
}
153+
154+
public static final BatchServiceSettings create(BatchServiceStubSettings stub)
155+
throws IOException {
156+
return new BatchServiceSettings.Builder(stub.toBuilder()).build();
157+
}
158+
159+
/** Returns a builder for the default ExecutorProvider for this service. */
160+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
161+
return BatchServiceStubSettings.defaultExecutorProviderBuilder();
162+
}
163+
164+
/** Returns the default service endpoint. */
165+
public static String getDefaultEndpoint() {
166+
return BatchServiceStubSettings.getDefaultEndpoint();
167+
}
168+
169+
/** Returns the default service scopes. */
170+
public static List<String> getDefaultServiceScopes() {
171+
return BatchServiceStubSettings.getDefaultServiceScopes();
172+
}
173+
174+
/** Returns a builder for the default credentials for this service. */
175+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
176+
return BatchServiceStubSettings.defaultCredentialsProviderBuilder();
177+
}
178+
179+
/** Returns a builder for the default gRPC ChannelProvider for this service. */
180+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
181+
return BatchServiceStubSettings.defaultGrpcTransportProviderBuilder();
182+
}
183+
184+
/** Returns a builder for the default REST ChannelProvider for this service. */
185+
@BetaApi
186+
public static InstantiatingHttpJsonChannelProvider.Builder
187+
defaultHttpJsonTransportProviderBuilder() {
188+
return BatchServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
189+
}
190+
191+
public static TransportChannelProvider defaultTransportChannelProvider() {
192+
return BatchServiceStubSettings.defaultTransportChannelProvider();
193+
}
194+
195+
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
196+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
197+
return BatchServiceStubSettings.defaultApiClientHeaderProviderBuilder();
198+
}
199+
200+
/** Returns a new gRPC builder for this class. */
201+
public static Builder newBuilder() {
202+
return Builder.createDefault();
203+
}
204+
205+
/** Returns a new REST builder for this class. */
206+
@BetaApi
207+
public static Builder newHttpJsonBuilder() {
208+
return Builder.createHttpJsonDefault();
209+
}
210+
211+
/** Returns a new builder for this class. */
212+
public static Builder newBuilder(ClientContext clientContext) {
213+
return new Builder(clientContext);
214+
}
215+
216+
/** Returns a builder containing all the values of this settings class. */
217+
public Builder toBuilder() {
218+
return new Builder(this);
219+
}
220+
221+
protected BatchServiceSettings(Builder settingsBuilder) throws IOException {
222+
super(settingsBuilder);
223+
}
224+
225+
/** Builder for BatchServiceSettings. */
226+
public static class Builder extends ClientSettings.Builder<BatchServiceSettings, Builder> {
227+
228+
protected Builder() throws IOException {
229+
this(((ClientContext) null));
230+
}
231+
232+
protected Builder(ClientContext clientContext) {
233+
super(BatchServiceStubSettings.newBuilder(clientContext));
234+
}
235+
236+
protected Builder(BatchServiceSettings settings) {
237+
super(settings.getStubSettings().toBuilder());
238+
}
239+
240+
protected Builder(BatchServiceStubSettings.Builder stubSettings) {
241+
super(stubSettings);
242+
}
243+
244+
private static Builder createDefault() {
245+
return new Builder(BatchServiceStubSettings.newBuilder());
246+
}
247+
248+
@BetaApi
249+
private static Builder createHttpJsonDefault() {
250+
return new Builder(BatchServiceStubSettings.newHttpJsonBuilder());
251+
}
252+
253+
public BatchServiceStubSettings.Builder getStubSettingsBuilder() {
254+
return ((BatchServiceStubSettings.Builder) getStubSettings());
255+
}
256+
257+
/**
258+
* Applies the given settings updater function to all of the unary API methods in this service.
259+
*
260+
* <p>Note: This method does not support applying settings to streaming methods.
261+
*/
262+
public Builder applyToAllUnaryMethods(
263+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
264+
super.applyToAllUnaryMethods(
265+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
266+
return this;
267+
}
268+
269+
/** Returns the builder for the settings used for calls to createJob. */
270+
public UnaryCallSettings.Builder<CreateJobRequest, Job> createJobSettings() {
271+
return getStubSettingsBuilder().createJobSettings();
272+
}
273+
274+
/** Returns the builder for the settings used for calls to getJob. */
275+
public UnaryCallSettings.Builder<GetJobRequest, Job> getJobSettings() {
276+
return getStubSettingsBuilder().getJobSettings();
277+
}
278+
279+
/** Returns the builder for the settings used for calls to deleteJob. */
280+
public UnaryCallSettings.Builder<DeleteJobRequest, Operation> deleteJobSettings() {
281+
return getStubSettingsBuilder().deleteJobSettings();
282+
}
283+
284+
/** Returns the builder for the settings used for calls to deleteJob. */
285+
public OperationCallSettings.Builder<DeleteJobRequest, Empty, OperationMetadata>
286+
deleteJobOperationSettings() {
287+
return getStubSettingsBuilder().deleteJobOperationSettings();
288+
}
289+
290+
/** Returns the builder for the settings used for calls to listJobs. */
291+
public PagedCallSettings.Builder<ListJobsRequest, ListJobsResponse, ListJobsPagedResponse>
292+
listJobsSettings() {
293+
return getStubSettingsBuilder().listJobsSettings();
294+
}
295+
296+
/** Returns the builder for the settings used for calls to getTask. */
297+
public UnaryCallSettings.Builder<GetTaskRequest, Task> getTaskSettings() {
298+
return getStubSettingsBuilder().getTaskSettings();
299+
}
300+
301+
/** Returns the builder for the settings used for calls to listTasks. */
302+
public PagedCallSettings.Builder<ListTasksRequest, ListTasksResponse, ListTasksPagedResponse>
303+
listTasksSettings() {
304+
return getStubSettingsBuilder().listTasksSettings();
305+
}
306+
307+
/** Returns the builder for the settings used for calls to listLocations. */
308+
public PagedCallSettings.Builder<
309+
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
310+
listLocationsSettings() {
311+
return getStubSettingsBuilder().listLocationsSettings();
312+
}
313+
314+
/** Returns the builder for the settings used for calls to getLocation. */
315+
public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettings() {
316+
return getStubSettingsBuilder().getLocationSettings();
317+
}
318+
319+
/** Returns the builder for the settings used for calls to setIamPolicy. */
320+
public UnaryCallSettings.Builder<SetIamPolicyRequest, Policy> setIamPolicySettings() {
321+
return getStubSettingsBuilder().setIamPolicySettings();
322+
}
323+
324+
/** Returns the builder for the settings used for calls to getIamPolicy. */
325+
public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettings() {
326+
return getStubSettingsBuilder().getIamPolicySettings();
327+
}
328+
329+
/** Returns the builder for the settings used for calls to testIamPermissions. */
330+
public UnaryCallSettings.Builder<TestIamPermissionsRequest, TestIamPermissionsResponse>
331+
testIamPermissionsSettings() {
332+
return getStubSettingsBuilder().testIamPermissionsSettings();
333+
}
334+
335+
@Override
336+
public BatchServiceSettings build() throws IOException {
337+
return new BatchServiceSettings(this);
338+
}
339+
}
340+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"schema": "1.0",
3+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
4+
"language": "java",
5+
"protoPackage": "google.cloud.batch.v1",
6+
"libraryPackage": "com.google.cloud.batch.v1",
7+
"services": {
8+
"BatchService": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "BatchServiceClient",
12+
"rpcs": {
13+
"CreateJob": {
14+
"methods": ["createJob", "createJob", "createJob", "createJobCallable"]
15+
},
16+
"DeleteJob": {
17+
"methods": ["deleteJobAsync", "deleteJobAsync", "deleteJobOperationCallable", "deleteJobCallable"]
18+
},
19+
"GetIamPolicy": {
20+
"methods": ["getIamPolicy", "getIamPolicyCallable"]
21+
},
22+
"GetJob": {
23+
"methods": ["getJob", "getJob", "getJob", "getJobCallable"]
24+
},
25+
"GetLocation": {
26+
"methods": ["getLocation", "getLocationCallable"]
27+
},
28+
"GetTask": {
29+
"methods": ["getTask", "getTask", "getTask", "getTaskCallable"]
30+
},
31+
"ListJobs": {
32+
"methods": ["listJobs", "listJobs", "listJobsPagedCallable", "listJobsCallable"]
33+
},
34+
"ListLocations": {
35+
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
36+
},
37+
"ListTasks": {
38+
"methods": ["listTasks", "listTasks", "listTasks", "listTasksPagedCallable", "listTasksCallable"]
39+
},
40+
"SetIamPolicy": {
41+
"methods": ["setIamPolicy", "setIamPolicyCallable"]
42+
},
43+
"TestIamPermissions": {
44+
"methods": ["testIamPermissions", "testIamPermissionsCallable"]
45+
}
46+
}
47+
}
48+
}
49+
}
50+
}
51+
}

0 commit comments

Comments
 (0)