Skip to content

Commit bc33620

Browse files
chore: update googleapis commit at Tue May 14 20:43:41 UTC 2024 (#10843)
* chore: update googleapis commit at Tue May 14 20:43:41 UTC 2024 * chore: generate libraries at Tue May 14 20:47:05 UTC 2024
1 parent e1487ae commit bc33620

File tree

152 files changed

+29222
-866
lines changed

Some content is hidden

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

152 files changed

+29222
-866
lines changed

generation_config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
gapic_generator_version: 2.40.0
22
protoc_version: '25.3'
3-
googleapis_commitish: 25a1a57957d9e4bf431897d280b2569b26dc9165
3+
googleapis_commitish: 584e0dee558b4b19bdecf1f2bdd4ec151190e5a4
44
libraries_bom_version: 26.39.0
55
template_excludes:
66
- .github/*

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceClient.java

+1,414
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,290 @@
1+
/*
2+
* Copyright 2024 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.aiplatform.v1beta1;
18+
19+
import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListLocationsPagedResponse;
20+
import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListTuningJobsPagedResponse;
21+
22+
import com.google.api.core.ApiFunction;
23+
import com.google.api.core.BetaApi;
24+
import com.google.api.gax.core.GoogleCredentialsProvider;
25+
import com.google.api.gax.core.InstantiatingExecutorProvider;
26+
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
27+
import com.google.api.gax.rpc.ApiClientHeaderProvider;
28+
import com.google.api.gax.rpc.ClientContext;
29+
import com.google.api.gax.rpc.ClientSettings;
30+
import com.google.api.gax.rpc.PagedCallSettings;
31+
import com.google.api.gax.rpc.TransportChannelProvider;
32+
import com.google.api.gax.rpc.UnaryCallSettings;
33+
import com.google.cloud.aiplatform.v1beta1.stub.GenAiTuningServiceStubSettings;
34+
import com.google.cloud.location.GetLocationRequest;
35+
import com.google.cloud.location.ListLocationsRequest;
36+
import com.google.cloud.location.ListLocationsResponse;
37+
import com.google.cloud.location.Location;
38+
import com.google.iam.v1.GetIamPolicyRequest;
39+
import com.google.iam.v1.Policy;
40+
import com.google.iam.v1.SetIamPolicyRequest;
41+
import com.google.iam.v1.TestIamPermissionsRequest;
42+
import com.google.iam.v1.TestIamPermissionsResponse;
43+
import com.google.protobuf.Empty;
44+
import java.io.IOException;
45+
import java.util.List;
46+
import javax.annotation.Generated;
47+
48+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
49+
/**
50+
* Settings class to configure an instance of {@link GenAiTuningServiceClient}.
51+
*
52+
* <p>The default instance has everything set to sensible defaults:
53+
*
54+
* <ul>
55+
* <li>The default service address (aiplatform.googleapis.com) and default port (443) are used.
56+
* <li>Credentials are acquired automatically through Application Default Credentials.
57+
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
58+
* </ul>
59+
*
60+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
61+
* build() is called, the tree of builders is called to create the complete settings object.
62+
*
63+
* <p>For example, to set the total timeout of createTuningJob to 30 seconds:
64+
*
65+
* <pre>{@code
66+
* // This snippet has been automatically generated and should be regarded as a code template only.
67+
* // It will require modifications to work:
68+
* // - It may require correct/in-range values for request initialization.
69+
* // - It may require specifying regional endpoints when creating the service client as shown in
70+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
71+
* GenAiTuningServiceSettings.Builder genAiTuningServiceSettingsBuilder =
72+
* GenAiTuningServiceSettings.newBuilder();
73+
* genAiTuningServiceSettingsBuilder
74+
* .createTuningJobSettings()
75+
* .setRetrySettings(
76+
* genAiTuningServiceSettingsBuilder
77+
* .createTuningJobSettings()
78+
* .getRetrySettings()
79+
* .toBuilder()
80+
* .setTotalTimeout(Duration.ofSeconds(30))
81+
* .build());
82+
* GenAiTuningServiceSettings genAiTuningServiceSettings =
83+
* genAiTuningServiceSettingsBuilder.build();
84+
* }</pre>
85+
*/
86+
@BetaApi
87+
@Generated("by gapic-generator-java")
88+
public class GenAiTuningServiceSettings extends ClientSettings<GenAiTuningServiceSettings> {
89+
90+
/** Returns the object with the settings used for calls to createTuningJob. */
91+
public UnaryCallSettings<CreateTuningJobRequest, TuningJob> createTuningJobSettings() {
92+
return ((GenAiTuningServiceStubSettings) getStubSettings()).createTuningJobSettings();
93+
}
94+
95+
/** Returns the object with the settings used for calls to getTuningJob. */
96+
public UnaryCallSettings<GetTuningJobRequest, TuningJob> getTuningJobSettings() {
97+
return ((GenAiTuningServiceStubSettings) getStubSettings()).getTuningJobSettings();
98+
}
99+
100+
/** Returns the object with the settings used for calls to listTuningJobs. */
101+
public PagedCallSettings<
102+
ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse>
103+
listTuningJobsSettings() {
104+
return ((GenAiTuningServiceStubSettings) getStubSettings()).listTuningJobsSettings();
105+
}
106+
107+
/** Returns the object with the settings used for calls to cancelTuningJob. */
108+
public UnaryCallSettings<CancelTuningJobRequest, Empty> cancelTuningJobSettings() {
109+
return ((GenAiTuningServiceStubSettings) getStubSettings()).cancelTuningJobSettings();
110+
}
111+
112+
/** Returns the object with the settings used for calls to listLocations. */
113+
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
114+
listLocationsSettings() {
115+
return ((GenAiTuningServiceStubSettings) getStubSettings()).listLocationsSettings();
116+
}
117+
118+
/** Returns the object with the settings used for calls to getLocation. */
119+
public UnaryCallSettings<GetLocationRequest, Location> getLocationSettings() {
120+
return ((GenAiTuningServiceStubSettings) getStubSettings()).getLocationSettings();
121+
}
122+
123+
/** Returns the object with the settings used for calls to setIamPolicy. */
124+
public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() {
125+
return ((GenAiTuningServiceStubSettings) getStubSettings()).setIamPolicySettings();
126+
}
127+
128+
/** Returns the object with the settings used for calls to getIamPolicy. */
129+
public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
130+
return ((GenAiTuningServiceStubSettings) getStubSettings()).getIamPolicySettings();
131+
}
132+
133+
/** Returns the object with the settings used for calls to testIamPermissions. */
134+
public UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
135+
testIamPermissionsSettings() {
136+
return ((GenAiTuningServiceStubSettings) getStubSettings()).testIamPermissionsSettings();
137+
}
138+
139+
public static final GenAiTuningServiceSettings create(GenAiTuningServiceStubSettings stub)
140+
throws IOException {
141+
return new GenAiTuningServiceSettings.Builder(stub.toBuilder()).build();
142+
}
143+
144+
/** Returns a builder for the default ExecutorProvider for this service. */
145+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
146+
return GenAiTuningServiceStubSettings.defaultExecutorProviderBuilder();
147+
}
148+
149+
/** Returns the default service endpoint. */
150+
public static String getDefaultEndpoint() {
151+
return GenAiTuningServiceStubSettings.getDefaultEndpoint();
152+
}
153+
154+
/** Returns the default service scopes. */
155+
public static List<String> getDefaultServiceScopes() {
156+
return GenAiTuningServiceStubSettings.getDefaultServiceScopes();
157+
}
158+
159+
/** Returns a builder for the default credentials for this service. */
160+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
161+
return GenAiTuningServiceStubSettings.defaultCredentialsProviderBuilder();
162+
}
163+
164+
/** Returns a builder for the default ChannelProvider for this service. */
165+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
166+
return GenAiTuningServiceStubSettings.defaultGrpcTransportProviderBuilder();
167+
}
168+
169+
public static TransportChannelProvider defaultTransportChannelProvider() {
170+
return GenAiTuningServiceStubSettings.defaultTransportChannelProvider();
171+
}
172+
173+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
174+
return GenAiTuningServiceStubSettings.defaultApiClientHeaderProviderBuilder();
175+
}
176+
177+
/** Returns a new builder for this class. */
178+
public static Builder newBuilder() {
179+
return Builder.createDefault();
180+
}
181+
182+
/** Returns a new builder for this class. */
183+
public static Builder newBuilder(ClientContext clientContext) {
184+
return new Builder(clientContext);
185+
}
186+
187+
/** Returns a builder containing all the values of this settings class. */
188+
public Builder toBuilder() {
189+
return new Builder(this);
190+
}
191+
192+
protected GenAiTuningServiceSettings(Builder settingsBuilder) throws IOException {
193+
super(settingsBuilder);
194+
}
195+
196+
/** Builder for GenAiTuningServiceSettings. */
197+
public static class Builder extends ClientSettings.Builder<GenAiTuningServiceSettings, Builder> {
198+
199+
protected Builder() throws IOException {
200+
this(((ClientContext) null));
201+
}
202+
203+
protected Builder(ClientContext clientContext) {
204+
super(GenAiTuningServiceStubSettings.newBuilder(clientContext));
205+
}
206+
207+
protected Builder(GenAiTuningServiceSettings settings) {
208+
super(settings.getStubSettings().toBuilder());
209+
}
210+
211+
protected Builder(GenAiTuningServiceStubSettings.Builder stubSettings) {
212+
super(stubSettings);
213+
}
214+
215+
private static Builder createDefault() {
216+
return new Builder(GenAiTuningServiceStubSettings.newBuilder());
217+
}
218+
219+
public GenAiTuningServiceStubSettings.Builder getStubSettingsBuilder() {
220+
return ((GenAiTuningServiceStubSettings.Builder) getStubSettings());
221+
}
222+
223+
/**
224+
* Applies the given settings updater function to all of the unary API methods in this service.
225+
*
226+
* <p>Note: This method does not support applying settings to streaming methods.
227+
*/
228+
public Builder applyToAllUnaryMethods(
229+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
230+
super.applyToAllUnaryMethods(
231+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
232+
return this;
233+
}
234+
235+
/** Returns the builder for the settings used for calls to createTuningJob. */
236+
public UnaryCallSettings.Builder<CreateTuningJobRequest, TuningJob> createTuningJobSettings() {
237+
return getStubSettingsBuilder().createTuningJobSettings();
238+
}
239+
240+
/** Returns the builder for the settings used for calls to getTuningJob. */
241+
public UnaryCallSettings.Builder<GetTuningJobRequest, TuningJob> getTuningJobSettings() {
242+
return getStubSettingsBuilder().getTuningJobSettings();
243+
}
244+
245+
/** Returns the builder for the settings used for calls to listTuningJobs. */
246+
public PagedCallSettings.Builder<
247+
ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse>
248+
listTuningJobsSettings() {
249+
return getStubSettingsBuilder().listTuningJobsSettings();
250+
}
251+
252+
/** Returns the builder for the settings used for calls to cancelTuningJob. */
253+
public UnaryCallSettings.Builder<CancelTuningJobRequest, Empty> cancelTuningJobSettings() {
254+
return getStubSettingsBuilder().cancelTuningJobSettings();
255+
}
256+
257+
/** Returns the builder for the settings used for calls to listLocations. */
258+
public PagedCallSettings.Builder<
259+
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
260+
listLocationsSettings() {
261+
return getStubSettingsBuilder().listLocationsSettings();
262+
}
263+
264+
/** Returns the builder for the settings used for calls to getLocation. */
265+
public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettings() {
266+
return getStubSettingsBuilder().getLocationSettings();
267+
}
268+
269+
/** Returns the builder for the settings used for calls to setIamPolicy. */
270+
public UnaryCallSettings.Builder<SetIamPolicyRequest, Policy> setIamPolicySettings() {
271+
return getStubSettingsBuilder().setIamPolicySettings();
272+
}
273+
274+
/** Returns the builder for the settings used for calls to getIamPolicy. */
275+
public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettings() {
276+
return getStubSettingsBuilder().getIamPolicySettings();
277+
}
278+
279+
/** Returns the builder for the settings used for calls to testIamPermissions. */
280+
public UnaryCallSettings.Builder<TestIamPermissionsRequest, TestIamPermissionsResponse>
281+
testIamPermissionsSettings() {
282+
return getStubSettingsBuilder().testIamPermissionsSettings();
283+
}
284+
285+
@Override
286+
public GenAiTuningServiceSettings build() throws IOException {
287+
return new GenAiTuningServiceSettings(this);
288+
}
289+
}
290+
}

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json

+36
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,42 @@
539539
}
540540
}
541541
},
542+
"GenAiTuningService": {
543+
"clients": {
544+
"grpc": {
545+
"libraryClient": "GenAiTuningServiceClient",
546+
"rpcs": {
547+
"CancelTuningJob": {
548+
"methods": ["cancelTuningJob", "cancelTuningJob", "cancelTuningJob", "cancelTuningJobCallable"]
549+
},
550+
"CreateTuningJob": {
551+
"methods": ["createTuningJob", "createTuningJob", "createTuningJob", "createTuningJobCallable"]
552+
},
553+
"GetIamPolicy": {
554+
"methods": ["getIamPolicy", "getIamPolicyCallable"]
555+
},
556+
"GetLocation": {
557+
"methods": ["getLocation", "getLocationCallable"]
558+
},
559+
"GetTuningJob": {
560+
"methods": ["getTuningJob", "getTuningJob", "getTuningJob", "getTuningJobCallable"]
561+
},
562+
"ListLocations": {
563+
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
564+
},
565+
"ListTuningJobs": {
566+
"methods": ["listTuningJobs", "listTuningJobs", "listTuningJobs", "listTuningJobsPagedCallable", "listTuningJobsCallable"]
567+
},
568+
"SetIamPolicy": {
569+
"methods": ["setIamPolicy", "setIamPolicyCallable"]
570+
},
571+
"TestIamPermissions": {
572+
"methods": ["testIamPermissions", "testIamPermissionsCallable"]
573+
}
574+
}
575+
}
576+
}
577+
},
542578
"IndexEndpointService": {
543579
"clients": {
544580
"grpc": {

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java

+19
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,25 @@
240240
* }
241241
* }</pre>
242242
*
243+
* <p>======================= GenAiTuningServiceClient =======================
244+
*
245+
* <p>Service Description: A service for creating and managing GenAI Tuning Jobs.
246+
*
247+
* <p>Sample for GenAiTuningServiceClient:
248+
*
249+
* <pre>{@code
250+
* // This snippet has been automatically generated and should be regarded as a code template only.
251+
* // It will require modifications to work:
252+
* // - It may require correct/in-range values for request initialization.
253+
* // - It may require specifying regional endpoints when creating the service client as shown in
254+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
255+
* try (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
256+
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
257+
* TuningJob tuningJob = TuningJob.newBuilder().build();
258+
* TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob);
259+
* }
260+
* }</pre>
261+
*
243262
* <p>======================= IndexEndpointServiceClient =======================
244263
*
245264
* <p>Service Description: A service for managing Vertex AI's IndexEndpoints.

0 commit comments

Comments
 (0)