Skip to content

Commit 5352821

Browse files
feat: [aiplatform] add ComputeTokens API (#10053)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 582473450 Source-Link: https://togithub.com/googleapis/googleapis/commit/a9e4e72e32b550a5451030feae99d1602ee40e0d Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/56ea7e1c067eed56256ba6310f44d6b94c67748a Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI1NmVhN2UxYzA2N2VlZDU2MjU2YmE2MzEwZjQ0ZDZiOTRjNjc3NDhhIn0= BEGIN_NESTED_COMMIT feat: [aiplatform] add deployment_timeout to UploadModel ModelContainerSpec feat: add shared_memory_size_mb to UploadModel ModelContainerSpec feat: add startup_probe, health_probe to UploadModel ModelContainerSpec PiperOrigin-RevId: 582390619 Source-Link: https://togithub.com/googleapis/googleapis/commit/49c44ef1f0959f7d5c44a88357b18a9a057c580b Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/7a1c0d15b82e062678a516d18551c67c1b0176aa Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI3YTFjMGQxNWI4MmUwNjI2NzhhNTE2ZDE4NTUxYzY3YzFiMDE3NmFhIn0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: [aiplatform] add deployment_timeout to UploadModel ModelContainerSpec feat: add shared_memory_size_mb to UploadModel ModelContainerSpec feat: add startup_probe, health_probe to UploadModel ModelContainerSpec PiperOrigin-RevId: 582381401 Source-Link: https://togithub.com/googleapis/googleapis/commit/92d962d3814b061a905437e05ea1e249f7a30c4d Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/c19c7a7fa3eac85508a2fe0afe177d76f510fcaf Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiJjMTljN2E3ZmEzZWFjODU1MDhhMmZlMGFmZTE3N2Q3NmY1MTBmY2FmIn0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: [aiplatform] add ComputeTokens and CountTokens API PiperOrigin-RevId: 582364082 Source-Link: https://togithub.com/googleapis/googleapis/commit/fdea53f759cb7a8e6167af8740ca9cfc850bfae9 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/295f8eab2a87743dccc65b88e73d71f480323023 Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiIyOTVmOGVhYjJhODc3NDNkY2NjNjViODhlNzNkNzFmNDgwMzIzMDIzIn0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: [aiplatform] add protected_artifact_location_id to CustomJob feat: add value_type, version_column_name to Feature feat: add FeatureGroup, FeatureOnlineStore, FeatureOnlineStoreAdminService, FeatureOnlineStoreService, FeatureRegistryService, FeatureView, FeatureViewSync feat: add NumericRestriction to Index feat: add tpu_topology to MachineSpec chore: change DeleteOperationMetadata to DeleteModelVersionOperationMetadata in ModelService feat: add CountTokensRequest to PredictionService feat: add StudyTimeConstraint to Study PiperOrigin-RevId: 581306827 Source-Link: https://togithub.com/googleapis/googleapis/commit/01af66acc8111ec1e4d6831e31952dabe530c694 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/842299dec7a7f5d7622b2a918aaa1888812d80dc Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI4NDIyOTlkZWM3YTdmNWQ3NjIyYjJhOTE4YWFhMTg4ODgxMmQ4MGRjIn0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: [aiplatform] add protected_artifact_location_id to CustomJob chore: add comment fixes to Feature and FeaturestoreService feat!: add FeatureViewDataFormat, FeatureViewDataKey to FeatureOnlineStoreService feat: add NumericRestriction to Index feat: add tpu_topology to MachineResources feat: add BatchDeletePipelineJobs, BatchDeletePipelineJobsRequest and BatchDeletePipelineJobsResponse to PipelineService feat: add StudyTimeConstraint to Study PiperOrigin-RevId: 581306075 Source-Link: https://togithub.com/googleapis/googleapis/commit/7603960c7cf66ab44c4c3c75156f25dbceffc3f1 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/9d03dc661bc2b672029b6cc640a4d7f3561466e7 Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI5ZDAzZGM2NjFiYzJiNjcyMDI5YjZjYzY0MGE0ZDdmMzU2MTQ2NmU3In0= END_NESTED_COMMIT
1 parent 1961c40 commit 5352821

File tree

511 files changed

+139884
-3475
lines changed

Some content is hidden

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

511 files changed

+139884
-3475
lines changed

java-aiplatform/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>26.26.0</version>
23+
<version>26.27.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>
@@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
195195
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
196196
[stability-image]: https://img.shields.io/badge/stability-stable-green
197197
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-aiplatform.svg
198-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.30.0
198+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.31.0
199199
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
200200
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
201201
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceClient.java

Lines changed: 3039 additions & 0 deletions
Large diffs are not rendered by default.

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceSettings.java

Lines changed: 526 additions & 0 deletions
Large diffs are not rendered by default.

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceClient.java

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

0 commit comments

Comments
 (0)