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

feat: add encryption_spec to aiplatform v1beta1 #176

Merged
merged 7 commits into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: generate sample code in the Java microgenerator
Committer: @miraleung
PiperOrigin-RevId: 356341083

Source-Author: Google APIs <[email protected]>
Source-Date: Mon Feb 8 13:33:28 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 8d8c008e56f1af31d57f75561e0f1848ffb29eeb
Source-Link: googleapis/googleapis@8d8c008
  • Loading branch information
yoshi-automation committed Feb 23, 2021
commit e213d7e8a8cb0bc4f7d085c398ccb4649f32329a

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (MigratableResource element :
* migrationServiceClient.searchMigratableResources(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* <p>Note: close() needs to be called on the MigrationServiceClient object to clean up resources
* such as threads. In the example above, try-with-resources is used, which automatically calls
* close().
Expand Down Expand Up @@ -164,6 +174,18 @@ public final OperationsClient getOperationsClient() {
* Searches all of the resources in automl.googleapis.com, datalabeling.googleapis.com and
* ml.googleapis.com that can be migrated to AI Platform's given location.
*
* <p>Sample code:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (MigratableResource element :
* migrationServiceClient.searchMigratableResources(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param parent Required. The location that the migratable resources should be searched from.
* It's the AI Platform location that the resources can be migrated to, not the resources'
* original location. Format: `projects/{project}/locations/{location}`
Expand All @@ -183,6 +205,18 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(
* Searches all of the resources in automl.googleapis.com, datalabeling.googleapis.com and
* ml.googleapis.com that can be migrated to AI Platform's given location.
*
* <p>Sample code:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (MigratableResource element :
* migrationServiceClient.searchMigratableResources(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param parent Required. The location that the migratable resources should be searched from.
* It's the AI Platform location that the resources can be migrated to, not the resources'
* original location. Format: `projects/{project}/locations/{location}`
Expand All @@ -199,6 +233,24 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(St
* Searches all of the resources in automl.googleapis.com, datalabeling.googleapis.com and
* ml.googleapis.com that can be migrated to AI Platform's given location.
*
* <p>Sample code:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* SearchMigratableResourcesRequest request =
* SearchMigratableResourcesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .build();
* for (MigratableResource element :
* migrationServiceClient.searchMigratableResources(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand All @@ -213,6 +265,24 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(
* ml.googleapis.com that can be migrated to AI Platform's given location.
*
* <p>Sample code:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* SearchMigratableResourcesRequest request =
* SearchMigratableResourcesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .build();
* ApiFuture<MigratableResource> future =
* migrationServiceClient.searchMigratableResourcesPagedCallable().futureCall(request);
* // Do something.
* for (MigratableResource element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*/
public final UnaryCallable<
SearchMigratableResourcesRequest, SearchMigratableResourcesPagedResponse>
Expand All @@ -226,6 +296,24 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(
* ml.googleapis.com that can be migrated to AI Platform's given location.
*
* <p>Sample code:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* while (true) {
* SearchMigratableResourcesResponse response =
* migrationServiceClient.searchMigratableResourcesCallable().call(request);
* for (MigratableResource element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }</pre>
*/
public final UnaryCallable<SearchMigratableResourcesRequest, SearchMigratableResourcesResponse>
searchMigratableResourcesCallable() {
Expand All @@ -237,6 +325,17 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(
* Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and
* datalabeling.googleapis.com to AI Platform (Unified).
*
* <p>Sample code:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* List<MigrateResourceRequest> migrateResourceRequests = new ArrayList<>();
* BatchMigrateResourcesResponse response =
* migrationServiceClient.batchMigrateResourcesAsync(parent, migrateResourceRequests).get();
* }
* }</pre>
*
* @param parent Required. The location of the migrated resource will live in. Format:
* `projects/{project}/locations/{location}`
* @param migrateResourceRequests Required. The request messages specifying the resources to
Expand All @@ -261,6 +360,17 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(
* Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and
* datalabeling.googleapis.com to AI Platform (Unified).
*
* <p>Sample code:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* List<MigrateResourceRequest> migrateResourceRequests = new ArrayList<>();
* BatchMigrateResourcesResponse response =
* migrationServiceClient.batchMigrateResourcesAsync(parent, migrateResourceRequests).get();
* }
* }</pre>
*
* @param parent Required. The location of the migrated resource will live in. Format:
* `projects/{project}/locations/{location}`
* @param migrateResourceRequests Required. The request messages specifying the resources to
Expand All @@ -285,6 +395,20 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(
* Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and
* datalabeling.googleapis.com to AI Platform (Unified).
*
* <p>Sample code:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* BatchMigrateResourcesRequest request =
* BatchMigrateResourcesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .addAllMigrateResourceRequests(new ArrayList<MigrateResourceRequest>())
* .build();
* BatchMigrateResourcesResponse response =
* migrationServiceClient.batchMigrateResourcesAsync(request).get();
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand All @@ -300,6 +424,21 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(
* datalabeling.googleapis.com to AI Platform (Unified).
*
* <p>Sample code:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* BatchMigrateResourcesRequest request =
* BatchMigrateResourcesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .addAllMigrateResourceRequests(new ArrayList<MigrateResourceRequest>())
* .build();
* OperationFuture<BatchMigrateResourcesResponse, BatchMigrateResourcesOperationMetadata>
* future =
* migrationServiceClient.batchMigrateResourcesOperationCallable().futureCall(request);
* // Do something.
* BatchMigrateResourcesResponse response = future.get();
* }
* }</pre>
*/
public final OperationCallable<
BatchMigrateResourcesRequest,
Expand All @@ -315,6 +454,20 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(
* datalabeling.googleapis.com to AI Platform (Unified).
*
* <p>Sample code:
*
* <pre>{@code
* try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
* BatchMigrateResourcesRequest request =
* BatchMigrateResourcesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .addAllMigrateResourceRequests(new ArrayList<MigrateResourceRequest>())
* .build();
* ApiFuture<Operation> future =
* migrationServiceClient.batchMigrateResourcesCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<BatchMigrateResourcesRequest, Operation>
batchMigrateResourcesCallable() {
Expand Down
Loading