Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [aiplatform] add UpdateExplanationDataset to aiplatform #9549

Merged
merged 8 commits into from
Jun 22, 2023
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions java-aiplatform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.16.0</version>
<version>26.17.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-aiplatform.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.19.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.20.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -909,6 +909,166 @@ public final UnaryCallable<UpdateModelRequest, Model> updateModelCallable() {
return stub.updateModelCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Incrementally update the dataset used for an examples model.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
* ModelName model = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
* UpdateExplanationDatasetResponse response =
* modelServiceClient.updateExplanationDatasetAsync(model).get();
* }
* }</pre>
*
* @param model Required. The resource name of the Model to update. Format:
* `projects/{project}/locations/{location}/models/{model}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<
UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>
updateExplanationDatasetAsync(ModelName model) {
UpdateExplanationDatasetRequest request =
UpdateExplanationDatasetRequest.newBuilder()
.setModel(model == null ? null : model.toString())
.build();
return updateExplanationDatasetAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Incrementally update the dataset used for an examples model.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
* String model = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString();
* UpdateExplanationDatasetResponse response =
* modelServiceClient.updateExplanationDatasetAsync(model).get();
* }
* }</pre>
*
* @param model Required. The resource name of the Model to update. Format:
* `projects/{project}/locations/{location}/models/{model}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<
UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>
updateExplanationDatasetAsync(String model) {
UpdateExplanationDatasetRequest request =
UpdateExplanationDatasetRequest.newBuilder().setModel(model).build();
return updateExplanationDatasetAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Incrementally update the dataset used for an examples model.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
* UpdateExplanationDatasetRequest request =
* UpdateExplanationDatasetRequest.newBuilder()
* .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
* .setExamples(Examples.newBuilder().build())
* .build();
* UpdateExplanationDatasetResponse response =
* modelServiceClient.updateExplanationDatasetAsync(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
*/
public final OperationFuture<
UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>
updateExplanationDatasetAsync(UpdateExplanationDatasetRequest request) {
return updateExplanationDatasetOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Incrementally update the dataset used for an examples model.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
* UpdateExplanationDatasetRequest request =
* UpdateExplanationDatasetRequest.newBuilder()
* .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
* .setExamples(Examples.newBuilder().build())
* .build();
* OperationFuture<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>
* future =
* modelServiceClient.updateExplanationDatasetOperationCallable().futureCall(request);
* // Do something.
* UpdateExplanationDatasetResponse response = future.get();
* }
* }</pre>
*/
public final OperationCallable<
UpdateExplanationDatasetRequest,
UpdateExplanationDatasetResponse,
UpdateExplanationDatasetOperationMetadata>
updateExplanationDatasetOperationCallable() {
return stub.updateExplanationDatasetOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Incrementally update the dataset used for an examples model.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
* UpdateExplanationDatasetRequest request =
* UpdateExplanationDatasetRequest.newBuilder()
* .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
* .setExamples(Examples.newBuilder().build())
* .build();
* ApiFuture<Operation> future =
* modelServiceClient.updateExplanationDatasetCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<UpdateExplanationDatasetRequest, Operation>
updateExplanationDatasetCallable() {
return stub.updateExplanationDatasetCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a Model.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -124,6 +124,22 @@ public UnaryCallSettings<UpdateModelRequest, Model> updateModelSettings() {
return ((ModelServiceStubSettings) getStubSettings()).updateModelSettings();
}

/** Returns the object with the settings used for calls to updateExplanationDataset. */
public UnaryCallSettings<UpdateExplanationDatasetRequest, Operation>
updateExplanationDatasetSettings() {
return ((ModelServiceStubSettings) getStubSettings()).updateExplanationDatasetSettings();
}

/** Returns the object with the settings used for calls to updateExplanationDataset. */
public OperationCallSettings<
UpdateExplanationDatasetRequest,
UpdateExplanationDatasetResponse,
UpdateExplanationDatasetOperationMetadata>
updateExplanationDatasetOperationSettings() {
return ((ModelServiceStubSettings) getStubSettings())
.updateExplanationDatasetOperationSettings();
}

/** Returns the object with the settings used for calls to deleteModel. */
public UnaryCallSettings<DeleteModelRequest, Operation> deleteModelSettings() {
return ((ModelServiceStubSettings) getStubSettings()).deleteModelSettings();
Expand Down Expand Up @@ -384,6 +400,21 @@ public UnaryCallSettings.Builder<UpdateModelRequest, Model> updateModelSettings(
return getStubSettingsBuilder().updateModelSettings();
}

/** Returns the builder for the settings used for calls to updateExplanationDataset. */
public UnaryCallSettings.Builder<UpdateExplanationDatasetRequest, Operation>
updateExplanationDatasetSettings() {
return getStubSettingsBuilder().updateExplanationDatasetSettings();
}

/** Returns the builder for the settings used for calls to updateExplanationDataset. */
public OperationCallSettings.Builder<
UpdateExplanationDatasetRequest,
UpdateExplanationDatasetResponse,
UpdateExplanationDatasetOperationMetadata>
updateExplanationDatasetOperationSettings() {
return getStubSettingsBuilder().updateExplanationDatasetOperationSettings();
}

/** Returns the builder for the settings used for calls to deleteModel. */
public UnaryCallSettings.Builder<DeleteModelRequest, Operation> deleteModelSettings() {
return getStubSettingsBuilder().deleteModelSettings();
Expand Down