Skip to content
This repository was archived by the owner on Sep 9, 2023. It is now read-only.

Commit 64b027c

Browse files
feat!: aiplatform v1beta1 regeneration (#43)
BREAKING CHANGE: sampled_shapley_attribution moved into a oneof in explanation.proto. field min renamed to min_value in ExplanationMetadata.InputMetadata.FeatureValueDomain in explanation_metadata.proto. field max renamed to max_value in ExplanationMetadata.InputMetadata.FeatureValueDomain in explanation_metadata.proto. PiperOrigin-RevId: 340440278 Source-Author: Google APIs <[email protected]> Source-Date: Tue Nov 3 07:33:01 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: c570f55ea7b64aeced41818609e7b24f0d242bdb Source-Link: googleapis/googleapis@c570f55
1 parent d550f43 commit 64b027c

File tree

107 files changed

+57460
-3000
lines changed

Some content is hidden

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

107 files changed

+57460
-3000
lines changed

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

+610
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
/*
2+
* Copyright 2020 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+
package com.google.cloud.aiplatform.v1beta1;
17+
18+
import static com.google.cloud.aiplatform.v1beta1.MigrationServiceClient.SearchMigratableResourcesPagedResponse;
19+
20+
import com.google.api.core.ApiFunction;
21+
import com.google.api.core.BetaApi;
22+
import com.google.api.gax.core.GoogleCredentialsProvider;
23+
import com.google.api.gax.core.InstantiatingExecutorProvider;
24+
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
25+
import com.google.api.gax.rpc.ApiClientHeaderProvider;
26+
import com.google.api.gax.rpc.ClientContext;
27+
import com.google.api.gax.rpc.ClientSettings;
28+
import com.google.api.gax.rpc.OperationCallSettings;
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.v1beta1.stub.MigrationServiceStubSettings;
33+
import com.google.longrunning.Operation;
34+
import java.io.IOException;
35+
import java.util.List;
36+
import javax.annotation.Generated;
37+
38+
// AUTO-GENERATED DOCUMENTATION AND CLASS
39+
/**
40+
* Settings class to configure an instance of {@link MigrationServiceClient}.
41+
*
42+
* <p>The default instance has everything set to sensible defaults:
43+
*
44+
* <ul>
45+
* <li>The default service address (aiplatform.googleapis.com) and default port (443) are used.
46+
* <li>Credentials are acquired automatically through Application Default Credentials.
47+
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
48+
* </ul>
49+
*
50+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
51+
* build() is called, the tree of builders is called to create the complete settings object.
52+
*
53+
* <p>For example, to set the total timeout of searchMigratableResources to 30 seconds:
54+
*
55+
* <pre>
56+
* <code>
57+
* MigrationServiceSettings.Builder migrationServiceSettingsBuilder =
58+
* MigrationServiceSettings.newBuilder();
59+
* migrationServiceSettingsBuilder
60+
* .searchMigratableResourcesSettings()
61+
* .setRetrySettings(
62+
* migrationServiceSettingsBuilder.searchMigratableResourcesSettings().getRetrySettings().toBuilder()
63+
* .setTotalTimeout(Duration.ofSeconds(30))
64+
* .build());
65+
* MigrationServiceSettings migrationServiceSettings = migrationServiceSettingsBuilder.build();
66+
* </code>
67+
* </pre>
68+
*/
69+
@Generated("by gapic-generator")
70+
@BetaApi
71+
public class MigrationServiceSettings extends ClientSettings<MigrationServiceSettings> {
72+
/** Returns the object with the settings used for calls to searchMigratableResources. */
73+
public PagedCallSettings<
74+
SearchMigratableResourcesRequest,
75+
SearchMigratableResourcesResponse,
76+
SearchMigratableResourcesPagedResponse>
77+
searchMigratableResourcesSettings() {
78+
return ((MigrationServiceStubSettings) getStubSettings()).searchMigratableResourcesSettings();
79+
}
80+
81+
/** Returns the object with the settings used for calls to batchMigrateResources. */
82+
public UnaryCallSettings<BatchMigrateResourcesRequest, Operation>
83+
batchMigrateResourcesSettings() {
84+
return ((MigrationServiceStubSettings) getStubSettings()).batchMigrateResourcesSettings();
85+
}
86+
87+
/** Returns the object with the settings used for calls to batchMigrateResources. */
88+
@BetaApi(
89+
"The surface for long-running operations is not stable yet and may change in the future.")
90+
public OperationCallSettings<
91+
BatchMigrateResourcesRequest,
92+
BatchMigrateResourcesResponse,
93+
BatchMigrateResourcesOperationMetadata>
94+
batchMigrateResourcesOperationSettings() {
95+
return ((MigrationServiceStubSettings) getStubSettings())
96+
.batchMigrateResourcesOperationSettings();
97+
}
98+
99+
public static final MigrationServiceSettings create(MigrationServiceStubSettings stub)
100+
throws IOException {
101+
return new MigrationServiceSettings.Builder(stub.toBuilder()).build();
102+
}
103+
104+
/** Returns a builder for the default ExecutorProvider for this service. */
105+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
106+
return MigrationServiceStubSettings.defaultExecutorProviderBuilder();
107+
}
108+
109+
/** Returns the default service endpoint. */
110+
public static String getDefaultEndpoint() {
111+
return MigrationServiceStubSettings.getDefaultEndpoint();
112+
}
113+
114+
/** Returns the default service scopes. */
115+
public static List<String> getDefaultServiceScopes() {
116+
return MigrationServiceStubSettings.getDefaultServiceScopes();
117+
}
118+
119+
/** Returns a builder for the default credentials for this service. */
120+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
121+
return MigrationServiceStubSettings.defaultCredentialsProviderBuilder();
122+
}
123+
124+
/** Returns a builder for the default ChannelProvider for this service. */
125+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
126+
return MigrationServiceStubSettings.defaultGrpcTransportProviderBuilder();
127+
}
128+
129+
public static TransportChannelProvider defaultTransportChannelProvider() {
130+
return MigrationServiceStubSettings.defaultTransportChannelProvider();
131+
}
132+
133+
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
134+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
135+
return MigrationServiceStubSettings.defaultApiClientHeaderProviderBuilder();
136+
}
137+
138+
/** Returns a new builder for this class. */
139+
public static Builder newBuilder() {
140+
return Builder.createDefault();
141+
}
142+
143+
/** Returns a new builder for this class. */
144+
public static Builder newBuilder(ClientContext clientContext) {
145+
return new Builder(clientContext);
146+
}
147+
148+
/** Returns a builder containing all the values of this settings class. */
149+
public Builder toBuilder() {
150+
return new Builder(this);
151+
}
152+
153+
protected MigrationServiceSettings(Builder settingsBuilder) throws IOException {
154+
super(settingsBuilder);
155+
}
156+
157+
/** Builder for MigrationServiceSettings. */
158+
public static class Builder extends ClientSettings.Builder<MigrationServiceSettings, Builder> {
159+
protected Builder() throws IOException {
160+
this((ClientContext) null);
161+
}
162+
163+
protected Builder(ClientContext clientContext) {
164+
super(MigrationServiceStubSettings.newBuilder(clientContext));
165+
}
166+
167+
private static Builder createDefault() {
168+
return new Builder(MigrationServiceStubSettings.newBuilder());
169+
}
170+
171+
protected Builder(MigrationServiceSettings settings) {
172+
super(settings.getStubSettings().toBuilder());
173+
}
174+
175+
protected Builder(MigrationServiceStubSettings.Builder stubSettings) {
176+
super(stubSettings);
177+
}
178+
179+
public MigrationServiceStubSettings.Builder getStubSettingsBuilder() {
180+
return ((MigrationServiceStubSettings.Builder) getStubSettings());
181+
}
182+
183+
// NEXT_MAJOR_VER: remove 'throws Exception'
184+
/**
185+
* Applies the given settings updater function to all of the unary API methods in this service.
186+
*
187+
* <p>Note: This method does not support applying settings to streaming methods.
188+
*/
189+
public Builder applyToAllUnaryMethods(
190+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
191+
super.applyToAllUnaryMethods(
192+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
193+
return this;
194+
}
195+
196+
/** Returns the builder for the settings used for calls to searchMigratableResources. */
197+
public PagedCallSettings.Builder<
198+
SearchMigratableResourcesRequest,
199+
SearchMigratableResourcesResponse,
200+
SearchMigratableResourcesPagedResponse>
201+
searchMigratableResourcesSettings() {
202+
return getStubSettingsBuilder().searchMigratableResourcesSettings();
203+
}
204+
205+
/** Returns the builder for the settings used for calls to batchMigrateResources. */
206+
public UnaryCallSettings.Builder<BatchMigrateResourcesRequest, Operation>
207+
batchMigrateResourcesSettings() {
208+
return getStubSettingsBuilder().batchMigrateResourcesSettings();
209+
}
210+
211+
/** Returns the builder for the settings used for calls to batchMigrateResources. */
212+
@BetaApi(
213+
"The surface for long-running operations is not stable yet and may change in the future.")
214+
public OperationCallSettings.Builder<
215+
BatchMigrateResourcesRequest,
216+
BatchMigrateResourcesResponse,
217+
BatchMigrateResourcesOperationMetadata>
218+
batchMigrateResourcesOperationSettings() {
219+
return getStubSettingsBuilder().batchMigrateResourcesOperationSettings();
220+
}
221+
222+
@Override
223+
public MigrationServiceSettings build() throws IOException {
224+
return new MigrationServiceSettings(this);
225+
}
226+
}
227+
}

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

+16-8
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,11 @@ public final UnaryCallable<PredictRequest, PredictResponse> predictCallable() {
287287
/**
288288
* Perform an online explanation.
289289
*
290-
* <p>If [ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have
290+
* <p>If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is
291+
* specified, the corresponding DeployModel must have
291292
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
292-
* If [ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have
293+
* If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not
294+
* specified, all DeployedModels must have
293295
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
294296
* Only deployed AutoML tabular Models have explanation_spec.
295297
*
@@ -341,9 +343,11 @@ public final ExplainResponse explain(
341343
/**
342344
* Perform an online explanation.
343345
*
344-
* <p>If [ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have
346+
* <p>If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is
347+
* specified, the corresponding DeployModel must have
345348
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
346-
* If [ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have
349+
* If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not
350+
* specified, all DeployedModels must have
347351
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
348352
* Only deployed AutoML tabular Models have explanation_spec.
349353
*
@@ -395,9 +399,11 @@ public final ExplainResponse explain(
395399
/**
396400
* Perform an online explanation.
397401
*
398-
* <p>If [ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have
402+
* <p>If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is
403+
* specified, the corresponding DeployModel must have
399404
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
400-
* If [ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have
405+
* If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not
406+
* specified, all DeployedModels must have
401407
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
402408
* Only deployed AutoML tabular Models have explanation_spec.
403409
*
@@ -426,9 +432,11 @@ public final ExplainResponse explain(ExplainRequest request) {
426432
/**
427433
* Perform an online explanation.
428434
*
429-
* <p>If [ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have
435+
* <p>If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is
436+
* specified, the corresponding DeployModel must have
430437
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
431-
* If [ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have
438+
* If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not
439+
* specified, all DeployedModels must have
432440
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
433441
* Only deployed AutoML tabular Models have explanation_spec.
434442
*

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

+16
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@
6565
* </code>
6666
* </pre>
6767
*
68+
* ====================== MigrationServiceClient ======================
69+
*
70+
* <p>Service Description: A service that migrates resources from automl.googleapis.com,
71+
* datalabeling.googleapis.com and ml.googleapis.com to AI Platform.
72+
*
73+
* <p>Sample for MigrationServiceClient:
74+
*
75+
* <pre>
76+
* <code>
77+
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
78+
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
79+
* SearchMigratableResourcesPagedResponse response = migrationServiceClient.searchMigratableResources(parent);
80+
* }
81+
* </code>
82+
* </pre>
83+
*
6884
* ================== ModelServiceClient ==================
6985
*
7086
* <p>Service Description: A service for managing AI Platform's machine learning Models.

0 commit comments

Comments
 (0)