From e42ac8ebb7f0d3865af9203acf3afc5aa94fd7cc Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 17:48:31 +0000 Subject: [PATCH 1/8] chore(main): release 3.0.1-SNAPSHOT (#984) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-aiplatform-bom/pom.xml | 12 ++++++------ google-cloud-aiplatform/pom.xml | 4 ++-- grpc-google-cloud-aiplatform-v1/pom.xml | 4 ++-- grpc-google-cloud-aiplatform-v1beta1/pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-aiplatform-v1/pom.xml | 4 ++-- proto-google-cloud-aiplatform-v1beta1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 10 +++++----- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/google-cloud-aiplatform-bom/pom.xml b/google-cloud-aiplatform-bom/pom.xml index 98a43b820..7dc9b8f11 100644 --- a/google-cloud-aiplatform-bom/pom.xml +++ b/google-cloud-aiplatform-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-aiplatform-bom - 3.0.0 + 3.0.1-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-aiplatform - 3.0.0 + 3.0.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-aiplatform-v1 - 3.0.0 + 3.0.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.16.0 + 0.16.1-SNAPSHOT com.google.api.grpc proto-google-cloud-aiplatform-v1 - 3.0.0 + 3.0.1-SNAPSHOT com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.16.0 + 0.16.1-SNAPSHOT diff --git a/google-cloud-aiplatform/pom.xml b/google-cloud-aiplatform/pom.xml index ae3acf043..9afa44fd7 100644 --- a/google-cloud-aiplatform/pom.xml +++ b/google-cloud-aiplatform/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-aiplatform - 3.0.0 + 3.0.1-SNAPSHOT jar Google Cloud Vertex AI https://github.com/googleapis/java-aiplatform @@ -11,7 +11,7 @@ com.google.cloud google-cloud-aiplatform-parent - 3.0.0 + 3.0.1-SNAPSHOT google-cloud-aiplatform diff --git a/grpc-google-cloud-aiplatform-v1/pom.xml b/grpc-google-cloud-aiplatform-v1/pom.xml index 9b2aa89f8..8ec66bcb8 100644 --- a/grpc-google-cloud-aiplatform-v1/pom.xml +++ b/grpc-google-cloud-aiplatform-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1 - 3.0.0 + 3.0.1-SNAPSHOT grpc-google-cloud-aiplatform-v1 GRPC library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.0.0 + 3.0.1-SNAPSHOT diff --git a/grpc-google-cloud-aiplatform-v1beta1/pom.xml b/grpc-google-cloud-aiplatform-v1beta1/pom.xml index 635caec51..2ab6557de 100644 --- a/grpc-google-cloud-aiplatform-v1beta1/pom.xml +++ b/grpc-google-cloud-aiplatform-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.16.0 + 0.16.1-SNAPSHOT grpc-google-cloud-aiplatform-v1beta1 GRPC library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.0.0 + 3.0.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 8aa21c2b8..03f134384 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-aiplatform-parent pom - 3.0.0 + 3.0.1-SNAPSHOT Google Cloud Vertex AI Parent https://github.com/googleapis/java- @@ -61,27 +61,27 @@ com.google.cloud google-cloud-aiplatform - 3.0.0 + 3.0.1-SNAPSHOT com.google.api.grpc proto-google-cloud-aiplatform-v1 - 3.0.0 + 3.0.1-SNAPSHOT com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.16.0 + 0.16.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-aiplatform-v1 - 3.0.0 + 3.0.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.16.0 + 0.16.1-SNAPSHOT com.google.cloud diff --git a/proto-google-cloud-aiplatform-v1/pom.xml b/proto-google-cloud-aiplatform-v1/pom.xml index 576225b96..fba7784b5 100644 --- a/proto-google-cloud-aiplatform-v1/pom.xml +++ b/proto-google-cloud-aiplatform-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-aiplatform-v1 - 3.0.0 + 3.0.1-SNAPSHOT proto-google-cloud-aiplatform-v1 Proto library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.0.0 + 3.0.1-SNAPSHOT diff --git a/proto-google-cloud-aiplatform-v1beta1/pom.xml b/proto-google-cloud-aiplatform-v1beta1/pom.xml index a33a1a6c1..fbfd2536d 100644 --- a/proto-google-cloud-aiplatform-v1beta1/pom.xml +++ b/proto-google-cloud-aiplatform-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.16.0 + 0.16.1-SNAPSHOT proto-google-cloud-aiplatform-v1beta1 Proto library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.0.0 + 3.0.1-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 3f4a1a14f..09d595c51 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-aiplatform - 3.0.0 + 3.0.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index 2f5b4c021..95480f749 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-aiplatform:3.0.0:3.0.0 -grpc-google-cloud-aiplatform-v1:3.0.0:3.0.0 -grpc-google-cloud-aiplatform-v1beta1:0.16.0:0.16.0 -proto-google-cloud-aiplatform-v1:3.0.0:3.0.0 -proto-google-cloud-aiplatform-v1beta1:0.16.0:0.16.0 +google-cloud-aiplatform:3.0.0:3.0.1-SNAPSHOT +grpc-google-cloud-aiplatform-v1:3.0.0:3.0.1-SNAPSHOT +grpc-google-cloud-aiplatform-v1beta1:0.16.0:0.16.1-SNAPSHOT +proto-google-cloud-aiplatform-v1:3.0.0:3.0.1-SNAPSHOT +proto-google-cloud-aiplatform-v1beta1:0.16.0:0.16.1-SNAPSHOT From b75963f7cf8435212c80b516601a0d433f3fc708 Mon Sep 17 00:00:00 2001 From: sai-chaithu <99007515+sai-chaithu@users.noreply.github.com> Date: Fri, 8 Jul 2022 23:57:48 +0530 Subject: [PATCH 2/8] feat(samples): added all entity type samples (#976) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(samples): added all entity type samples * feat(samples): update all entity type samples * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 8 + .../CreateEntityTypeMonitoringSample.java | 114 +++++++++++ .../aiplatform/CreateEntityTypeSample.java | 93 +++++++++ .../aiplatform/DeleteEntityTypeSample.java | 87 +++++++++ .../java/aiplatform/GetEntityTypeSample.java | 70 +++++++ .../ListEntityTypesAsyncSample.java | 80 ++++++++ .../aiplatform/ListEntityTypesSample.java | 68 +++++++ .../UpdateEntityTypeMonitoringSample.java | 87 +++++++++ .../aiplatform/UpdateEntityTypeSample.java | 80 ++++++++ .../aiplatform/EntityTypeSamplesTest.java | 181 ++++++++++++++++++ 10 files changed, 868 insertions(+) create mode 100644 samples/snippets/src/main/java/aiplatform/CreateEntityTypeMonitoringSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/CreateEntityTypeSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/DeleteEntityTypeSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/GetEntityTypeSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/ListEntityTypesAsyncSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/ListEntityTypesSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/UpdateEntityTypeMonitoringSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/UpdateEntityTypeSample.java create mode 100644 samples/snippets/src/test/java/aiplatform/EntityTypeSamplesTest.java diff --git a/README.md b/README.md index a3059d27e..f0d29d00b 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-aiplatform/tr | Create Dataset Text Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateDatasetTextSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDatasetTextSample.java) | | Create Dataset Video Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateDatasetVideoSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateDatasetVideoSample.java) | | Create Endpoint Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateEndpointSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateEndpointSample.java) | +| Create Entity Type Monitoring Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateEntityTypeMonitoringSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateEntityTypeMonitoringSample.java) | +| Create Entity Type Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateEntityTypeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateEntityTypeSample.java) | | Create Featurestore Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateFeaturestoreSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateFeaturestoreSample.java) | | Create Hyperparameter Tuning Job Python Package Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSample.java) | | Create Hyperparameter Tuning Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobSample.java) | @@ -138,6 +140,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-aiplatform/tr | Delete Data Labeling Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/DeleteDataLabelingJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteDataLabelingJobSample.java) | | Delete Dataset Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/DeleteDatasetSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteDatasetSample.java) | | Delete Endpoint Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/DeleteEndpointSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteEndpointSample.java) | +| Delete Entity Type Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/DeleteEntityTypeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteEntityTypeSample.java) | | Delete Export Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/DeleteExportModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteExportModelSample.java) | | Delete Featurestore Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/DeleteFeaturestoreSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteFeaturestoreSample.java) | | Delete Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/DeleteModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/DeleteModelSample.java) | @@ -148,6 +151,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-aiplatform/tr | Export Model Tabular Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ExportModelTabularClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ExportModelTabularClassificationSample.java) | | Export Model Video Action Recognition Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ExportModelVideoActionRecognitionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ExportModelVideoActionRecognitionSample.java) | | Get Batch Prediction Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetBatchPredictionJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetBatchPredictionJobSample.java) | +| Get Entity Type Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetEntityTypeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetEntityTypeSample.java) | | Get Hyperparameter Tuning Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetHyperparameterTuningJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetHyperparameterTuningJobSample.java) | | Get Model Evaluation Image Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java) | | Get Model Evaluation Image Object Detection Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java) | @@ -171,6 +175,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-aiplatform/tr | Import Data Video Action Recognition Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ImportDataVideoActionRecognitionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ImportDataVideoActionRecognitionSample.java) | | Import Data Video Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ImportDataVideoClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ImportDataVideoClassificationSample.java) | | Import Data Video Object Tracking Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ImportDataVideoObjectTrackingSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ImportDataVideoObjectTrackingSample.java) | +| List Entity Types Async Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ListEntityTypesAsyncSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ListEntityTypesAsyncSample.java) | +| List Entity Types Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ListEntityTypesSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ListEntityTypesSample.java) | | List Model Evaluation Slice Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ListModelEvaluationSliceSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ListModelEvaluationSliceSample.java) | | Predict Custom Trained Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/PredictCustomTrainedModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/PredictCustomTrainedModelSample.java) | | Predict Image Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java) | @@ -181,6 +187,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-aiplatform/tr | Predict Text Entity Extraction Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/PredictTextEntityExtractionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/PredictTextEntityExtractionSample.java) | | Predict Text Sentiment Analysis Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/PredictTextSentimentAnalysisSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/PredictTextSentimentAnalysisSample.java) | | Undeploy Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/UndeployModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/UndeployModelSample.java) | +| Update Entity Type Monitoring Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/UpdateEntityTypeMonitoringSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/UpdateEntityTypeMonitoringSample.java) | +| Update Entity Type Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/UpdateEntityTypeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/UpdateEntityTypeSample.java) | | Upload Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/UploadModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/UploadModelSample.java) | diff --git a/samples/snippets/src/main/java/aiplatform/CreateEntityTypeMonitoringSample.java b/samples/snippets/src/main/java/aiplatform/CreateEntityTypeMonitoringSample.java new file mode 100644 index 000000000..b234d0324 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateEntityTypeMonitoringSample.java @@ -0,0 +1,114 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * Create an entity type so that you can create its related features. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_create_entity_type_monitoring_sample] + +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.CreateEntityTypeOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateEntityTypeRequest; +import com.google.cloud.aiplatform.v1.EntityType; +import com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig; +import com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis; +import com.google.cloud.aiplatform.v1.FeaturestoreName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class CreateEntityTypeMonitoringSample { + + public static void main(String[] args) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + String entityTypeId = "YOUR_ENTITY_TYPE_ID"; + String description = "YOUR_ENTITY_TYPE_DESCRIPTION"; + int monitoringIntervalDays = 1; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + int timeout = 300; + createEntityTypeMonitoringSample( + project, + featurestoreId, + entityTypeId, + description, + monitoringIntervalDays, + location, + endpoint, + timeout); + } + + static void createEntityTypeMonitoringSample( + String project, + String featurestoreId, + String entityTypeId, + String description, + int monitoringIntervalDays, + String location, + String endpoint, + int timeout) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + FeaturestoreMonitoringConfig featurestoreMonitoringConfig = + FeaturestoreMonitoringConfig.newBuilder() + .setSnapshotAnalysis( + SnapshotAnalysis.newBuilder().setMonitoringIntervalDays(monitoringIntervalDays)) + .build(); + + EntityType entityType = + EntityType.newBuilder() + .setDescription(description) + .setMonitoringConfig(featurestoreMonitoringConfig) + .build(); + + CreateEntityTypeRequest createEntityTypeRequest = + CreateEntityTypeRequest.newBuilder() + .setParent(FeaturestoreName.of(project, location, featurestoreId).toString()) + .setEntityType(entityType) + .setEntityTypeId(entityTypeId) + .build(); + + OperationFuture entityTypeFuture = + featurestoreServiceClient.createEntityTypeAsync(createEntityTypeRequest); + System.out.format( + "Operation name: %s%n", entityTypeFuture.getInitialFuture().get().getName()); + System.out.println("Waiting for operation to finish..."); + EntityType entityTypeResponse = entityTypeFuture.get(timeout, TimeUnit.SECONDS); + System.out.println("Create Entity Type Monitoring Response"); + System.out.format("Name: %s%n", entityTypeResponse.getName()); + } + } +} +// [END aiplatform_create_entity_type_monitoring_sample] diff --git a/samples/snippets/src/main/java/aiplatform/CreateEntityTypeSample.java b/samples/snippets/src/main/java/aiplatform/CreateEntityTypeSample.java new file mode 100644 index 000000000..012ac1961 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateEntityTypeSample.java @@ -0,0 +1,93 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * Create an entity type so that you can create its related features. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_create_entity_type_sample] + +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.CreateEntityTypeOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateEntityTypeRequest; +import com.google.cloud.aiplatform.v1.EntityType; +import com.google.cloud.aiplatform.v1.FeaturestoreName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class CreateEntityTypeSample { + + public static void main(String[] args) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + String entityTypeId = "YOUR_ENTITY_TYPE_ID"; + String description = "YOUR_ENTITY_TYPE_DESCRIPTION"; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + int timeout = 300; + createEntityTypeSample( + project, featurestoreId, entityTypeId, description, location, endpoint, timeout); + } + + static void createEntityTypeSample( + String project, + String featurestoreId, + String entityTypeId, + String description, + String location, + String endpoint, + int timeout) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + EntityType entityType = EntityType.newBuilder().setDescription(description).build(); + + CreateEntityTypeRequest createEntityTypeRequest = + CreateEntityTypeRequest.newBuilder() + .setParent(FeaturestoreName.of(project, location, featurestoreId).toString()) + .setEntityType(entityType) + .setEntityTypeId(entityTypeId) + .build(); + + OperationFuture entityTypeFuture = + featurestoreServiceClient.createEntityTypeAsync(createEntityTypeRequest); + System.out.format( + "Operation name: %s%n", entityTypeFuture.getInitialFuture().get().getName()); + System.out.println("Waiting for operation to finish..."); + EntityType entityTypeResponse = entityTypeFuture.get(timeout, TimeUnit.SECONDS); + System.out.println("Create Entity Type Response"); + System.out.format("Name: %s%n", entityTypeResponse.getName()); + } + } +} +// [END aiplatform_create_entity_type_sample] diff --git a/samples/snippets/src/main/java/aiplatform/DeleteEntityTypeSample.java b/samples/snippets/src/main/java/aiplatform/DeleteEntityTypeSample.java new file mode 100644 index 000000000..00e7c5e36 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/DeleteEntityTypeSample.java @@ -0,0 +1,87 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * Delete an entity type from featurestore resource. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_delete_entity_type_sample] + +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.DeleteEntityTypeRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class DeleteEntityTypeSample { + + public static void main(String[] args) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + String entityTypeId = "YOUR_ENTITY_TYPE_ID"; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + int timeout = 300; + deleteEntityTypeSample(project, featurestoreId, entityTypeId, location, endpoint, timeout); + } + + static void deleteEntityTypeSample( + String project, + String featurestoreId, + String entityTypeId, + String location, + String endpoint, + int timeout) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + DeleteEntityTypeRequest deleteEntityTypeRequest = + DeleteEntityTypeRequest.newBuilder() + .setName( + EntityTypeName.of(project, location, featurestoreId, entityTypeId).toString()) + .setForce(true) + .build(); + + OperationFuture operationFuture = + featurestoreServiceClient.deleteEntityTypeAsync(deleteEntityTypeRequest); + System.out.format("Operation name: %s%n", operationFuture.getInitialFuture().get().getName()); + System.out.println("Waiting for operation to finish..."); + operationFuture.get(timeout, TimeUnit.SECONDS); + + System.out.format("Deleted Entity Type."); + } + } +} +// [END aiplatform_delete_entity_type_sample] diff --git a/samples/snippets/src/main/java/aiplatform/GetEntityTypeSample.java b/samples/snippets/src/main/java/aiplatform/GetEntityTypeSample.java new file mode 100644 index 000000000..f9e83f223 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/GetEntityTypeSample.java @@ -0,0 +1,70 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * Get entity type details. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_get_entity_type_sample] + +import com.google.cloud.aiplatform.v1.EntityType; +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1.GetEntityTypeRequest; +import java.io.IOException; + +public class GetEntityTypeSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + String entityTypeId = "YOUR_ENTITY_TYPE_ID"; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + getEntityTypeSample(project, featurestoreId, entityTypeId, location, endpoint); + } + + static void getEntityTypeSample( + String project, String featurestoreId, String entityTypeId, String location, String endpoint) + throws IOException { + + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + GetEntityTypeRequest getEntityTypeRequest = + GetEntityTypeRequest.newBuilder() + .setName( + EntityTypeName.of(project, location, featurestoreId, entityTypeId).toString()) + .build(); + + EntityType entityType = featurestoreServiceClient.getEntityType(getEntityTypeRequest); + System.out.println("Get Entity Type Response"); + System.out.println(entityType); + } + } +} +// [END aiplatform_get_entity_type_sample] diff --git a/samples/snippets/src/main/java/aiplatform/ListEntityTypesAsyncSample.java b/samples/snippets/src/main/java/aiplatform/ListEntityTypesAsyncSample.java new file mode 100644 index 000000000..b429a642c --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/ListEntityTypesAsyncSample.java @@ -0,0 +1,80 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * List available entity type details of an existing featurestore resource. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_list_entity_types_async_sample] + +import com.google.cloud.aiplatform.v1.EntityType; +import com.google.cloud.aiplatform.v1.FeaturestoreName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1.ListEntityTypesRequest; +import com.google.cloud.aiplatform.v1.ListEntityTypesResponse; +import com.google.common.base.Strings; +import java.io.IOException; + +public class ListEntityTypesAsyncSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + listEntityTypesAsyncSample(project, featurestoreId, location, endpoint); + } + + static void listEntityTypesAsyncSample( + String project, String featurestoreId, String location, String endpoint) throws IOException { + + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + ListEntityTypesRequest listEntityTypeRequest = + ListEntityTypesRequest.newBuilder() + .setParent(FeaturestoreName.of(project, location, featurestoreId).toString()) + .build(); + System.out.println("List Entity Types Async Response"); + while (true) { + ListEntityTypesResponse listEntityTypesResponse = + featurestoreServiceClient.listEntityTypesCallable().call(listEntityTypeRequest); + for (EntityType element : listEntityTypesResponse.getEntityTypesList()) { + System.out.println(element); + } + String nextPageToken = listEntityTypesResponse.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + listEntityTypeRequest = + listEntityTypeRequest.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_list_entity_types_async_sample] diff --git a/samples/snippets/src/main/java/aiplatform/ListEntityTypesSample.java b/samples/snippets/src/main/java/aiplatform/ListEntityTypesSample.java new file mode 100644 index 000000000..1160216c4 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/ListEntityTypesSample.java @@ -0,0 +1,68 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * List available entity type details of an existing featurestore resource. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_list_entity_types_sample] + +import com.google.cloud.aiplatform.v1.EntityType; +import com.google.cloud.aiplatform.v1.FeaturestoreName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1.ListEntityTypesRequest; +import java.io.IOException; + +public class ListEntityTypesSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + listEntityTypesSample(project, featurestoreId, location, endpoint); + } + + static void listEntityTypesSample( + String project, String featurestoreId, String location, String endpoint) throws IOException { + + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + ListEntityTypesRequest listEntityTypeRequest = + ListEntityTypesRequest.newBuilder() + .setParent(FeaturestoreName.of(project, location, featurestoreId).toString()) + .build(); + System.out.println("List Entity Types Response"); + for (EntityType element : + featurestoreServiceClient.listEntityTypes(listEntityTypeRequest).iterateAll()) { + System.out.println(element); + } + } + } +} +// [END aiplatform_list_entity_types_sample] diff --git a/samples/snippets/src/main/java/aiplatform/UpdateEntityTypeMonitoringSample.java b/samples/snippets/src/main/java/aiplatform/UpdateEntityTypeMonitoringSample.java new file mode 100644 index 000000000..3133b146f --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/UpdateEntityTypeMonitoringSample.java @@ -0,0 +1,87 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * Update entity type. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_update_entity_type_monitoring_sample] + +import com.google.cloud.aiplatform.v1.EntityType; +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig; +import com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1.UpdateEntityTypeRequest; +import java.io.IOException; + +public class UpdateEntityTypeMonitoringSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + String entityTypeId = "YOUR_ENTITY_TYPE_ID"; + int monitoringIntervalDays = 1; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + updateEntityTypeMonitoringSample( + project, featurestoreId, entityTypeId, monitoringIntervalDays, location, endpoint); + } + + static void updateEntityTypeMonitoringSample( + String project, + String featurestoreId, + String entityTypeId, + int monitoringIntervalDays, + String location, + String endpoint) + throws IOException { + + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + FeaturestoreMonitoringConfig featurestoreMonitoringConfig = + FeaturestoreMonitoringConfig.newBuilder() + .setSnapshotAnalysis( + SnapshotAnalysis.newBuilder().setMonitoringIntervalDays(monitoringIntervalDays)) + .build(); + EntityType entityType = + EntityType.newBuilder() + .setName( + EntityTypeName.of(project, location, featurestoreId, entityTypeId).toString()) + .setMonitoringConfig(featurestoreMonitoringConfig) + .build(); + + UpdateEntityTypeRequest updateEntityTypeRequest = + UpdateEntityTypeRequest.newBuilder().setEntityType(entityType).build(); + EntityType entityTypeResponse = + featurestoreServiceClient.updateEntityType(updateEntityTypeRequest); + System.out.println("Update Entity Type Monitoring Response"); + System.out.println(entityTypeResponse); + } + } +} +// [END aiplatform_update_entity_type_monitoring_sample] diff --git a/samples/snippets/src/main/java/aiplatform/UpdateEntityTypeSample.java b/samples/snippets/src/main/java/aiplatform/UpdateEntityTypeSample.java new file mode 100644 index 000000000..bd7af2650 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/UpdateEntityTypeSample.java @@ -0,0 +1,80 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * Update entity type. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_update_entity_type_sample] + +import com.google.cloud.aiplatform.v1.EntityType; +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1.UpdateEntityTypeRequest; +import java.io.IOException; + +public class UpdateEntityTypeSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + String entityTypeId = "YOUR_ENTITY_TYPE_ID"; + String description = "Update Description"; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + updateEntityTypeSample(project, featurestoreId, entityTypeId, description, location, endpoint); + } + + static void updateEntityTypeSample( + String project, + String featurestoreId, + String entityTypeId, + String description, + String location, + String endpoint) + throws IOException { + + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + EntityType entityType = + EntityType.newBuilder() + .setName( + EntityTypeName.of(project, location, featurestoreId, entityTypeId).toString()) + .setDescription(description) + .build(); + + UpdateEntityTypeRequest updateEntityTypeRequest = + UpdateEntityTypeRequest.newBuilder().setEntityType(entityType).build(); + EntityType entityTypeResponse = + featurestoreServiceClient.updateEntityType(updateEntityTypeRequest); + System.out.println("Update Entity Type Response"); + System.out.println(entityTypeResponse); + } + } +} +// [END aiplatform_update_entity_type_sample] diff --git a/samples/snippets/src/test/java/aiplatform/EntityTypeSamplesTest.java b/samples/snippets/src/test/java/aiplatform/EntityTypeSamplesTest.java new file mode 100644 index 000000000..41227c71c --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/EntityTypeSamplesTest.java @@ -0,0 +1,181 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class EntityTypeSamplesTest { + + private static final String PROJECT_ID = System.getenv("UCAIP_PROJECT_ID"); + private static final int MIN_NODE_COUNT = 1; + private static final int MAX_NODE_COUNT = 5; + private static final String DESCRIPTION = "Test Description"; + private static final int MONITORING_INTERVAL_DAYS = 1; + private static final boolean USE_FORCE = true; + private static final String LOCATION = "us-central1"; + private static final String ENDPOINT = "us-central1-aiplatform.googleapis.com:443"; + private static final int TIMEOUT = 900; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String featurestoreId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + + // Delete the featurestore + DeleteFeaturestoreSample.deleteFeaturestoreSample( + PROJECT_ID, featurestoreId, USE_FORCE, LOCATION, ENDPOINT, 60); + + // Assert + String deleteFeaturestoreResponse = bout.toString(); + assertThat(deleteFeaturestoreResponse).contains("Deleted Featurestore"); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testEntityTypeSamples() + throws IOException, InterruptedException, ExecutionException, TimeoutException { + // Create the featurestore + String tempUuid = UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26); + String id = String.format("temp_create_featurestore_test_%s", tempUuid); + CreateFeaturestoreSample.createFeaturestoreSample( + PROJECT_ID, id, MIN_NODE_COUNT, MAX_NODE_COUNT, LOCATION, ENDPOINT, TIMEOUT); + + // Assert + String createFeaturestoreResponse = bout.toString(); + assertThat(createFeaturestoreResponse).contains("Create Featurestore Response"); + featurestoreId = + createFeaturestoreResponse.split("Name: ")[1].split("featurestores/")[1].split("\n")[0] + .trim(); + + // Create the entity type + String entityTypeTempUuid = UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 16); + String entityTypeId = String.format("temp_create_entity_type_test_%s", entityTypeTempUuid); + CreateEntityTypeSample.createEntityTypeSample( + PROJECT_ID, featurestoreId, entityTypeId, DESCRIPTION, LOCATION, ENDPOINT, TIMEOUT); + + // Assert + String createEntityTypeResponse = bout.toString(); + assertThat(createEntityTypeResponse).contains("Create Entity Type Response"); + + // Get the entity type + GetEntityTypeSample.getEntityTypeSample( + PROJECT_ID, featurestoreId, entityTypeId, LOCATION, ENDPOINT); + + // Assert + String getEntityTypeResponse = bout.toString(); + assertThat(getEntityTypeResponse).contains("Get Entity Type Response"); + + // Create the entity type + String entityTypeMonitoringTempUuid = + UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 16); + String entityTypeMonitoringId = + String.format("temp_create_entity_type_test_%s", entityTypeMonitoringTempUuid); + CreateEntityTypeMonitoringSample.createEntityTypeMonitoringSample( + PROJECT_ID, + featurestoreId, + entityTypeMonitoringId, + DESCRIPTION, + MONITORING_INTERVAL_DAYS, + LOCATION, + ENDPOINT, + TIMEOUT); + + // Assert + String createEntityTypeMonitoringResponse = bout.toString(); + assertThat(createEntityTypeMonitoringResponse) + .contains("Create Entity Type Monitoring Response"); + + // List entity types + ListEntityTypesSample.listEntityTypesSample(PROJECT_ID, featurestoreId, LOCATION, ENDPOINT); + + // Assert + String listEntityTypeResponse = bout.toString(); + assertThat(listEntityTypeResponse).contains("List Entity Types Response"); + + // Update the entity type + UpdateEntityTypeSample.updateEntityTypeSample( + PROJECT_ID, featurestoreId, entityTypeId, DESCRIPTION, LOCATION, ENDPOINT); + + // Assert + String updateEntityTypeResponse = bout.toString(); + assertThat(updateEntityTypeResponse).contains("Update Entity Type Response"); + + // Update the entity type + UpdateEntityTypeMonitoringSample.updateEntityTypeMonitoringSample( + PROJECT_ID, featurestoreId, entityTypeId, MONITORING_INTERVAL_DAYS, LOCATION, ENDPOINT); + + // Assert + String updateEntityTypeMonitoringResponse = bout.toString(); + assertThat(updateEntityTypeMonitoringResponse) + .contains("Update Entity Type Monitoring Response"); + + // List entity types + ListEntityTypesAsyncSample.listEntityTypesAsyncSample( + PROJECT_ID, featurestoreId, LOCATION, ENDPOINT); + + // Assert + String listEntityTypeAsyncResponse = bout.toString(); + assertThat(listEntityTypeAsyncResponse).contains("List Entity Types Async Response"); + + // Delete the entity type + DeleteEntityTypeSample.deleteEntityTypeSample( + PROJECT_ID, featurestoreId, entityTypeId, LOCATION, ENDPOINT, TIMEOUT); + + // Assert + String deleteEntityTypeResponse = bout.toString(); + assertThat(deleteEntityTypeResponse).contains("Deleted Entity Type"); + } +} From f31cfbbfaf23f657783a4e77086b410b5c3717b0 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Fri, 8 Jul 2022 14:28:27 -0400 Subject: [PATCH 3/8] chore: add native image checks as required (#978) --- .github/sync-repo-settings.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index dd5626f32..0501f63f2 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -16,6 +16,8 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - cla/google - OwlBot Post Processor + - 'Kokoro - Test: Java GraalVM Native Image' + - 'Kokoro - Test: Java 17 GraalVM Native Image' - pattern: java7 isAdminEnforced: true requiredApprovingReviewCount: 1 From 274d6ab215be8a8cbe19df448306172a60126e94 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 8 Jul 2022 20:44:40 +0200 Subject: [PATCH 4/8] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.1 (#985) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 4 ++-- google-cloud-aiplatform-bom/pom.xml | 2 +- pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f0d29d00b..13b5d489c 100644 --- a/README.md +++ b/README.md @@ -45,13 +45,13 @@ implementation 'com.google.cloud:google-cloud-aiplatform' If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-aiplatform:2.9.8' +implementation 'com.google.cloud:google-cloud-aiplatform:3.0.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "2.9.8" +libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "3.0.0" ``` ## Authentication diff --git a/google-cloud-aiplatform-bom/pom.xml b/google-cloud-aiplatform-bom/pom.xml index 7dc9b8f11..5a01223f4 100644 --- a/google-cloud-aiplatform-bom/pom.xml +++ b/google-cloud-aiplatform-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.5.0 + 1.5.1 Google Cloud Vertex AI BOM diff --git a/pom.xml b/pom.xml index 03f134384..a48f229c6 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.5.0 + 1.5.1 From bcbc2b0b119d9622605269926b7c306c973cda8b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 8 Jul 2022 14:45:54 -0400 Subject: [PATCH 5/8] chore: fix minor typos in README and pom templates (#1479) (#987) Source-Link: https://github.com/googleapis/synthtool/commit/18d4e9bb50d0dfb3291de18c51b96a2c835e2446 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:f8374176dc59291f05dd3fec927a9da2cda687a9ef4de32e77f699a2be12ab45 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- README.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a454a61e8..1b645c012 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 -# created: 2022-06-29T23:17:33.110417661Z + digest: sha256:f8374176dc59291f05dd3fec927a9da2cda687a9ef4de32e77f699a2be12ab45 +# created: 2022-07-07T14:26:11.880812641Z diff --git a/README.md b/README.md index 13b5d489c..c1649f08b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Java idiomatic client for [Vertex AI][product-docs]. ## Quickstart -If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: ```xml @@ -35,20 +35,20 @@ If you are using Maven without BOM, add this to your dependencies: ``` -If you are using Gradle 5.x or later, add this to your dependencies +If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy implementation platform('com.google.cloud:libraries-bom:25.4.0') implementation 'com.google.cloud:google-cloud-aiplatform' ``` -If you are using Gradle without BOM, add this to your dependencies +If you are using Gradle without BOM, add this to your dependencies: ```Groovy implementation 'com.google.cloud:google-cloud-aiplatform:3.0.0' ``` -If you are using SBT, add this to your dependencies +If you are using SBT, add this to your dependencies: ```Scala libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "3.0.0" From 872efb44a685153f366533c48a79b112bfe6543e Mon Sep 17 00:00:00 2001 From: sai-chaithu <99007515+sai-chaithu@users.noreply.github.com> Date: Tue, 12 Jul 2022 03:22:55 +0530 Subject: [PATCH 6/8] feat(samples): add remaining featurestore api samples (#974) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added Featurestore Samples * feat(samples): add remaining featurestore api samples (googleapis#945) * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat(samples): update all featurestore samples * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Alice <65933803+alicejli@users.noreply.github.com> --- README.md | 8 +- .../CreateFeaturestoreFixedNodesSample.java | 95 ++++++++++++ .../aiplatform/GetFeaturestoreSample.java | 67 +++++++++ .../ListFeaturestoresAsyncSample.java | 78 ++++++++++ .../aiplatform/ListFeaturestoresSample.java | 67 +++++++++ .../UpdateFeaturestoreFixedNodesSample.java | 93 ++++++++++++ .../aiplatform/UpdateFeaturestoreSample.java | 98 ++++++++++++ .../aiplatform/FeaturestoreSamplesTest.java | 140 ++++++++++++++++++ 8 files changed, 645 insertions(+), 1 deletion(-) create mode 100644 samples/snippets/src/main/java/aiplatform/CreateFeaturestoreFixedNodesSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/GetFeaturestoreSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/ListFeaturestoresAsyncSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/ListFeaturestoresSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreFixedNodesSample.java create mode 100644 samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreSample.java create mode 100644 samples/snippets/src/test/java/aiplatform/FeaturestoreSamplesTest.java diff --git a/README.md b/README.md index c1649f08b..8820b7d4a 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:25.4.0') +implementation platform('com.google.cloud:libraries-bom:26.0.0') implementation 'com.google.cloud:google-cloud-aiplatform' ``` @@ -120,6 +120,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-aiplatform/tr | Create Endpoint Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateEndpointSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateEndpointSample.java) | | Create Entity Type Monitoring Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateEntityTypeMonitoringSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateEntityTypeMonitoringSample.java) | | Create Entity Type Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateEntityTypeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateEntityTypeSample.java) | +| Create Featurestore Fixed Nodes Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateFeaturestoreFixedNodesSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateFeaturestoreFixedNodesSample.java) | | Create Featurestore Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateFeaturestoreSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateFeaturestoreSample.java) | | Create Hyperparameter Tuning Job Python Package Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobPythonPackageSample.java) | | Create Hyperparameter Tuning Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/CreateHyperparameterTuningJobSample.java) | @@ -152,6 +153,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-aiplatform/tr | Export Model Video Action Recognition Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ExportModelVideoActionRecognitionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ExportModelVideoActionRecognitionSample.java) | | Get Batch Prediction Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetBatchPredictionJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetBatchPredictionJobSample.java) | | Get Entity Type Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetEntityTypeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetEntityTypeSample.java) | +| Get Featurestore Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetFeaturestoreSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetFeaturestoreSample.java) | | Get Hyperparameter Tuning Job Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetHyperparameterTuningJobSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetHyperparameterTuningJobSample.java) | | Get Model Evaluation Image Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java) | | Get Model Evaluation Image Object Detection Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java) | @@ -177,6 +179,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-aiplatform/tr | Import Data Video Object Tracking Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ImportDataVideoObjectTrackingSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ImportDataVideoObjectTrackingSample.java) | | List Entity Types Async Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ListEntityTypesAsyncSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ListEntityTypesAsyncSample.java) | | List Entity Types Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ListEntityTypesSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ListEntityTypesSample.java) | +| List Featurestores Async Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ListFeaturestoresAsyncSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ListFeaturestoresAsyncSample.java) | +| List Featurestores Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ListFeaturestoresSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ListFeaturestoresSample.java) | | List Model Evaluation Slice Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/ListModelEvaluationSliceSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/ListModelEvaluationSliceSample.java) | | Predict Custom Trained Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/PredictCustomTrainedModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/PredictCustomTrainedModelSample.java) | | Predict Image Classification Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java) | @@ -189,6 +193,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-aiplatform/tr | Undeploy Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/UndeployModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/UndeployModelSample.java) | | Update Entity Type Monitoring Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/UpdateEntityTypeMonitoringSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/UpdateEntityTypeMonitoringSample.java) | | Update Entity Type Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/UpdateEntityTypeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/UpdateEntityTypeSample.java) | +| Update Featurestore Fixed Nodes Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreFixedNodesSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreFixedNodesSample.java) | +| Update Featurestore Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreSample.java) | | Upload Model Sample | [source code](https://github.com/googleapis/java-aiplatform/blob/main/samples/snippets/src/main/java/aiplatform/UploadModelSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-aiplatform&page=editor&open_in_editor=samples/snippets/src/main/java/aiplatform/UploadModelSample.java) | diff --git a/samples/snippets/src/main/java/aiplatform/CreateFeaturestoreFixedNodesSample.java b/samples/snippets/src/main/java/aiplatform/CreateFeaturestoreFixedNodesSample.java new file mode 100644 index 000000000..69add3ff1 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/CreateFeaturestoreFixedNodesSample.java @@ -0,0 +1,95 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * Create a featurestore resource to contain entity types and features. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_create_featurestore_fixed_nodes_sample] + +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.CreateFeaturestoreOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateFeaturestoreRequest; +import com.google.cloud.aiplatform.v1beta1.Featurestore; +import com.google.cloud.aiplatform.v1beta1.Featurestore.OnlineServingConfig; +import com.google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1beta1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class CreateFeaturestoreFixedNodesSample { + + public static void main(String[] args) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + int fixedNodeCount = 1; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + int timeout = 900; + createFeaturestoreFixedNodesSample( + project, featurestoreId, fixedNodeCount, location, endpoint, timeout); + } + + static void createFeaturestoreFixedNodesSample( + String project, + String featurestoreId, + int fixedNodeCount, + String location, + String endpoint, + int timeout) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + OnlineServingConfig.Builder builderValue = + OnlineServingConfig.newBuilder().setFixedNodeCount(fixedNodeCount); + Featurestore featurestore = + Featurestore.newBuilder().setOnlineServingConfig(builderValue).build(); + + CreateFeaturestoreRequest createFeaturestoreRequest = + CreateFeaturestoreRequest.newBuilder() + .setParent(LocationName.of(project, location).toString()) + .setFeaturestore(featurestore) + .setFeaturestoreId(featurestoreId) + .build(); + + OperationFuture featurestoreFuture = + featurestoreServiceClient.createFeaturestoreAsync(createFeaturestoreRequest); + System.out.format( + "Operation name: %s%n", featurestoreFuture.getInitialFuture().get().getName()); + System.out.println("Waiting for operation to finish..."); + Featurestore featurestoreResponse = featurestoreFuture.get(timeout, TimeUnit.SECONDS); + System.out.println("Create Featurestore Response"); + System.out.format("Name: %s%n", featurestoreResponse.getName()); + } + } +} +// [END aiplatform_create_featurestore_fixed_nodes_sample] diff --git a/samples/snippets/src/main/java/aiplatform/GetFeaturestoreSample.java b/samples/snippets/src/main/java/aiplatform/GetFeaturestoreSample.java new file mode 100644 index 000000000..1d8c4c77c --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/GetFeaturestoreSample.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * Gets details of a single featurestore. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_get_featurestore_sample] + +import com.google.cloud.aiplatform.v1beta1.Featurestore; +import com.google.cloud.aiplatform.v1beta1.FeaturestoreName; +import com.google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1beta1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1beta1.GetFeaturestoreRequest; +import java.io.IOException; + +public class GetFeaturestoreSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + getFeaturestoreSample(project, featurestoreId, location, endpoint); + } + + static void getFeaturestoreSample( + String project, String featurestoreId, String location, String endpoint) throws IOException { + + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + GetFeaturestoreRequest getFeaturestoreRequest = + GetFeaturestoreRequest.newBuilder() + .setName(FeaturestoreName.of(project, location, featurestoreId).toString()) + .build(); + + Featurestore featurestore = featurestoreServiceClient.getFeaturestore(getFeaturestoreRequest); + System.out.println("Get Featurestore Response"); + System.out.println(featurestore); + } + } +} +// [END aiplatform_get_featurestore_sample] diff --git a/samples/snippets/src/main/java/aiplatform/ListFeaturestoresAsyncSample.java b/samples/snippets/src/main/java/aiplatform/ListFeaturestoresAsyncSample.java new file mode 100644 index 000000000..16ce54f40 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/ListFeaturestoresAsyncSample.java @@ -0,0 +1,78 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * List available featurestore details. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_list_featurestores_async_sample] + +import com.google.cloud.aiplatform.v1.Featurestore; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1.ListFeaturestoresRequest; +import com.google.cloud.aiplatform.v1.ListFeaturestoresResponse; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.common.base.Strings; +import java.io.IOException; + +public class ListFeaturestoresAsyncSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + listFeaturestoresAsyncSample(project, location, endpoint); + } + + static void listFeaturestoresAsyncSample(String project, String location, String endpoint) + throws IOException { + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + ListFeaturestoresRequest listFeaturestoresRequest = + ListFeaturestoresRequest.newBuilder() + .setParent(LocationName.of(project, location).toString()) + .build(); + System.out.println("List Featurestores Async Response"); + while (true) { + ListFeaturestoresResponse listFeaturestoresResponse = + featurestoreServiceClient.listFeaturestoresCallable().call(listFeaturestoresRequest); + for (Featurestore element : listFeaturestoresResponse.getFeaturestoresList()) { + System.out.println(element); + } + String nextPageToken = listFeaturestoresResponse.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + listFeaturestoresRequest = + listFeaturestoresRequest.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_list_featurestores_async_sample] diff --git a/samples/snippets/src/main/java/aiplatform/ListFeaturestoresSample.java b/samples/snippets/src/main/java/aiplatform/ListFeaturestoresSample.java new file mode 100644 index 000000000..db4e5d7aa --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/ListFeaturestoresSample.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * List available featurestore details. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_list_featurestores_sample] + +import com.google.cloud.aiplatform.v1.Featurestore; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1.ListFeaturestoresRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import java.io.IOException; + +public class ListFeaturestoresSample { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + listFeaturestoresSample(project, location, endpoint); + } + + static void listFeaturestoresSample(String project, String location, String endpoint) + throws IOException { + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + ListFeaturestoresRequest listFeaturestoresRequest = + ListFeaturestoresRequest.newBuilder() + .setParent(LocationName.of(project, location).toString()) + .build(); + + System.out.println("List Featurestores Response"); + for (Featurestore element : + featurestoreServiceClient.listFeaturestores(listFeaturestoresRequest).iterateAll()) { + System.out.println(element); + } + } + } +} +// [END aiplatform_list_featurestores_sample] diff --git a/samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreFixedNodesSample.java b/samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreFixedNodesSample.java new file mode 100644 index 000000000..71ef51edc --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreFixedNodesSample.java @@ -0,0 +1,93 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * Update featurestore. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_update_featurestore_fixed_nodes_sample] + +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.Featurestore; +import com.google.cloud.aiplatform.v1.Featurestore.OnlineServingConfig; +import com.google.cloud.aiplatform.v1.FeaturestoreName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1.UpdateFeaturestoreOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeaturestoreRequest; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class UpdateFeaturestoreFixedNodesSample { + + public static void main(String[] args) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + int fixedNodeCount = 1; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + int timeout = 300; + updateFeaturestoreFixedNodesSample( + project, featurestoreId, fixedNodeCount, location, endpoint, timeout); + } + + static void updateFeaturestoreFixedNodesSample( + String project, + String featurestoreId, + int fixedNodeCount, + String location, + String endpoint, + int timeout) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + OnlineServingConfig.Builder builderValue = + OnlineServingConfig.newBuilder().setFixedNodeCount(fixedNodeCount); + Featurestore featurestore = + Featurestore.newBuilder() + .setName(FeaturestoreName.of(project, location, featurestoreId).toString()) + .setOnlineServingConfig(builderValue) + .build(); + + UpdateFeaturestoreRequest request = + UpdateFeaturestoreRequest.newBuilder().setFeaturestore(featurestore).build(); + + OperationFuture updateFeaturestoreFuture = + featurestoreServiceClient.updateFeaturestoreAsync(request); + System.out.format( + "Operation name: %s%n", updateFeaturestoreFuture.getInitialFuture().get().getName()); + System.out.println("Waiting for operation to finish..."); + Featurestore featurestoreResponse = updateFeaturestoreFuture.get(timeout, TimeUnit.SECONDS); + System.out.println("Update Featurestore Fixed Nodes Response"); + System.out.format("Name: %s%n", featurestoreResponse.getName()); + } + } +} +// [END aiplatform_update_featurestore_fixed_nodes_sample] diff --git a/samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreSample.java b/samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreSample.java new file mode 100644 index 000000000..7ccb0b0a1 --- /dev/null +++ b/samples/snippets/src/main/java/aiplatform/UpdateFeaturestoreSample.java @@ -0,0 +1,98 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * Updates the parameters of a single featurestore. See + * https://cloud.google.com/vertex-ai/docs/featurestore/setup before running + * the code snippet + */ + +package aiplatform; + +// [START aiplatform_update_featurestore_sample] + +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.Featurestore; +import com.google.cloud.aiplatform.v1beta1.Featurestore.OnlineServingConfig; +import com.google.cloud.aiplatform.v1beta1.Featurestore.OnlineServingConfig.Scaling; +import com.google.cloud.aiplatform.v1beta1.FeaturestoreName; +import com.google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient; +import com.google.cloud.aiplatform.v1beta1.FeaturestoreServiceSettings; +import com.google.cloud.aiplatform.v1beta1.UpdateFeaturestoreOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.UpdateFeaturestoreRequest; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class UpdateFeaturestoreSample { + + public static void main(String[] args) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + // TODO(developer): Replace these variables before running the sample. + String project = "YOUR_PROJECT_ID"; + String featurestoreId = "YOUR_FEATURESTORE_ID"; + int minNodeCount = 2; + int maxNodeCount = 4; + String location = "us-central1"; + String endpoint = "us-central1-aiplatform.googleapis.com:443"; + int timeout = 300; + updateFeaturestoreSample( + project, featurestoreId, minNodeCount, maxNodeCount, location, endpoint, timeout); + } + + static void updateFeaturestoreSample( + String project, + String featurestoreId, + int minNodeCount, + int maxNodeCount, + String location, + String endpoint, + int timeout) + throws IOException, InterruptedException, ExecutionException, TimeoutException { + FeaturestoreServiceSettings featurestoreServiceSettings = + FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build(); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FeaturestoreServiceClient featurestoreServiceClient = + FeaturestoreServiceClient.create(featurestoreServiceSettings)) { + + OnlineServingConfig.Builder builderValue = + OnlineServingConfig.newBuilder() + .setScaling( + Scaling.newBuilder().setMinNodeCount(minNodeCount).setMaxNodeCount(maxNodeCount)); + Featurestore featurestore = + Featurestore.newBuilder() + .setName(FeaturestoreName.of(project, location, featurestoreId).toString()) + .setOnlineServingConfig(builderValue) + .build(); + + UpdateFeaturestoreRequest request = + UpdateFeaturestoreRequest.newBuilder().setFeaturestore(featurestore).build(); + + OperationFuture updateFeaturestoreFuture = + featurestoreServiceClient.updateFeaturestoreAsync(request); + System.out.format( + "Operation name: %s%n", updateFeaturestoreFuture.getInitialFuture().get().getName()); + System.out.println("Waiting for operation to finish..."); + Featurestore featurestoreResponse = updateFeaturestoreFuture.get(timeout, TimeUnit.SECONDS); + System.out.println("Update Featurestore Response"); + System.out.format("Name: %s%n", featurestoreResponse.getName()); + } + } +} +// [END aiplatform_update_featurestore_sample] diff --git a/samples/snippets/src/test/java/aiplatform/FeaturestoreSamplesTest.java b/samples/snippets/src/test/java/aiplatform/FeaturestoreSamplesTest.java new file mode 100644 index 000000000..b0a207b22 --- /dev/null +++ b/samples/snippets/src/test/java/aiplatform/FeaturestoreSamplesTest.java @@ -0,0 +1,140 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package aiplatform; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class FeaturestoreSamplesTest { + + private static final String PROJECT_ID = System.getenv("UCAIP_PROJECT_ID"); + private static final int MIN_NODE_COUNT = 1; + private static final int MAX_NODE_COUNT = 5; + private static final int FIXED_NODE_COUNT = 5; + private static final boolean USE_FORCE = true; + private static final String LOCATION = "us-central1"; + private static final String ENDPOINT = "us-central1-aiplatform.googleapis.com:443"; + private static final int TIMEOUT = 900; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + private String featurestoreId; + + private static void requireEnvVar(String varName) { + String errorMessage = + String.format("Environment variable '%s' is required to perform these tests.", varName); + assertNotNull(errorMessage, System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("UCAIP_PROJECT_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() + throws InterruptedException, ExecutionException, IOException, TimeoutException { + + // Delete the featurestore + DeleteFeaturestoreSample.deleteFeaturestoreSample( + PROJECT_ID, featurestoreId, USE_FORCE, LOCATION, ENDPOINT, 60); + + // Assert + String deleteFeaturestoreResponse = bout.toString(); + assertThat(deleteFeaturestoreResponse).contains("Deleted Featurestore"); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testCreateFeaturestoreSample() + throws IOException, InterruptedException, ExecutionException, TimeoutException { + // Create the featurestore + String tempUuid = UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26); + String id = String.format("temp_create_featurestore_test_%s", tempUuid); + CreateFeaturestoreFixedNodesSample.createFeaturestoreFixedNodesSample( + PROJECT_ID, id, FIXED_NODE_COUNT, LOCATION, ENDPOINT, 900); + + // Assert + String createFeaturestoreResponse = bout.toString(); + assertThat(createFeaturestoreResponse).contains("Create Featurestore Response"); + featurestoreId = + createFeaturestoreResponse.split("Name: ")[1].split("featurestores/")[1].split("\n")[0] + .trim(); + + // Get the featurestore + GetFeaturestoreSample.getFeaturestoreSample(PROJECT_ID, featurestoreId, LOCATION, ENDPOINT); + + // Assert + String getFeaturestoreResponse = bout.toString(); + assertThat(getFeaturestoreResponse).contains("Get Featurestore Response"); + + // Update the featurestore with autoscaling + UpdateFeaturestoreSample.updateFeaturestoreSample( + PROJECT_ID, featurestoreId, MIN_NODE_COUNT, MAX_NODE_COUNT, LOCATION, ENDPOINT, TIMEOUT); + + // Assert + String updateFeaturestoreResponse = bout.toString(); + assertThat(updateFeaturestoreResponse).contains("Update Featurestore Response"); + + // List featurestores + ListFeaturestoresSample.listFeaturestoresSample(PROJECT_ID, LOCATION, ENDPOINT); + + // Assert + String listFeaturestoresResponse = bout.toString(); + assertThat(listFeaturestoresResponse).contains("List Featurestores Response"); + + // Update the featurestore with fixed nodes + UpdateFeaturestoreFixedNodesSample.updateFeaturestoreFixedNodesSample( + PROJECT_ID, featurestoreId, FIXED_NODE_COUNT, LOCATION, ENDPOINT, TIMEOUT); + + // Assert + String updateFeaturestoreFixedNodesResponse = bout.toString(); + assertThat(updateFeaturestoreFixedNodesResponse) + .contains("Update Featurestore Fixed Nodes Response"); + + // List featurestores + ListFeaturestoresAsyncSample.listFeaturestoresAsyncSample(PROJECT_ID, LOCATION, ENDPOINT); + + // Assert + String listFeaturestoresAsyncResponse = bout.toString(); + assertThat(listFeaturestoresAsyncResponse).contains("List Featurestores Async Response"); + } +} From 858e68b96f0a4a391a44a69944186d2b06dc4ab3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Jul 2022 19:30:16 +0000 Subject: [PATCH 7/8] fix: enable longpaths support for windows test (#1485) (#991) Source-Link: https://github.com/googleapis/synthtool/commit/73365620c41d96e97ff474b2c4d39b890ad51967 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 --- .github/.OwlBot.lock.yaml | 4 ++-- .github/workflows/ci.yaml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 1b645c012..de9173d95 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:f8374176dc59291f05dd3fec927a9da2cda687a9ef4de32e77f699a2be12ab45 -# created: 2022-07-07T14:26:11.880812641Z + digest: sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 +# created: 2022-07-13T13:53:17.676447481Z diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 83ef7f9c2..e3bb26e37 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,6 +39,8 @@ jobs: windows: runs-on: windows-latest steps: + - name: Support longpaths + run: git config --system core.longpaths true - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: From 0c21a55af30db2d0615dcadf77289f291fe2ab71 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Jul 2022 13:54:15 +0000 Subject: [PATCH 8/8] chore(main): release 3.1.0 (#988) :robot: I have created a release *beep* *boop* --- ## [3.1.0](https://github.com/googleapis/java-aiplatform/compare/v3.0.0...v3.1.0) (2022-07-13) ### Features * **samples:** add remaining featurestore api samples ([#974](https://github.com/googleapis/java-aiplatform/issues/974)) ([872efb4](https://github.com/googleapis/java-aiplatform/commit/872efb44a685153f366533c48a79b112bfe6543e)) * **samples:** added all entity type samples ([#976](https://github.com/googleapis/java-aiplatform/issues/976)) ([b75963f](https://github.com/googleapis/java-aiplatform/commit/b75963f7cf8435212c80b516601a0d433f3fc708)) ### Bug Fixes * enable longpaths support for windows test ([#1485](https://github.com/googleapis/java-aiplatform/issues/1485)) ([#991](https://github.com/googleapis/java-aiplatform/issues/991)) ([858e68b](https://github.com/googleapis/java-aiplatform/commit/858e68b96f0a4a391a44a69944186d2b06dc4ab3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 13 +++++++++++++ google-cloud-aiplatform-bom/pom.xml | 12 ++++++------ google-cloud-aiplatform/pom.xml | 4 ++-- grpc-google-cloud-aiplatform-v1/pom.xml | 4 ++-- grpc-google-cloud-aiplatform-v1beta1/pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-aiplatform-v1/pom.xml | 4 ++-- proto-google-cloud-aiplatform-v1beta1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 10 +++++----- 10 files changed, 41 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba5a1b7f7..deb62443f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [3.1.0](https://github.com/googleapis/java-aiplatform/compare/v3.0.0...v3.1.0) (2022-07-13) + + +### Features + +* **samples:** add remaining featurestore api samples ([#974](https://github.com/googleapis/java-aiplatform/issues/974)) ([872efb4](https://github.com/googleapis/java-aiplatform/commit/872efb44a685153f366533c48a79b112bfe6543e)) +* **samples:** added all entity type samples ([#976](https://github.com/googleapis/java-aiplatform/issues/976)) ([b75963f](https://github.com/googleapis/java-aiplatform/commit/b75963f7cf8435212c80b516601a0d433f3fc708)) + + +### Bug Fixes + +* enable longpaths support for windows test ([#1485](https://github.com/googleapis/java-aiplatform/issues/1485)) ([#991](https://github.com/googleapis/java-aiplatform/issues/991)) ([858e68b](https://github.com/googleapis/java-aiplatform/commit/858e68b96f0a4a391a44a69944186d2b06dc4ab3)) + ## [3.0.0](https://github.com/googleapis/java-aiplatform/compare/v2.9.8...v3.0.0) (2022-07-01) diff --git a/google-cloud-aiplatform-bom/pom.xml b/google-cloud-aiplatform-bom/pom.xml index 5a01223f4..9a0e2d885 100644 --- a/google-cloud-aiplatform-bom/pom.xml +++ b/google-cloud-aiplatform-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-aiplatform-bom - 3.0.1-SNAPSHOT + 3.1.0 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-aiplatform - 3.0.1-SNAPSHOT + 3.1.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1 - 3.0.1-SNAPSHOT + 3.1.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.16.1-SNAPSHOT + 0.17.0 com.google.api.grpc proto-google-cloud-aiplatform-v1 - 3.0.1-SNAPSHOT + 3.1.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.16.1-SNAPSHOT + 0.17.0 diff --git a/google-cloud-aiplatform/pom.xml b/google-cloud-aiplatform/pom.xml index 9afa44fd7..5d7eb8cce 100644 --- a/google-cloud-aiplatform/pom.xml +++ b/google-cloud-aiplatform/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-aiplatform - 3.0.1-SNAPSHOT + 3.1.0 jar Google Cloud Vertex AI https://github.com/googleapis/java-aiplatform @@ -11,7 +11,7 @@ com.google.cloud google-cloud-aiplatform-parent - 3.0.1-SNAPSHOT + 3.1.0 google-cloud-aiplatform diff --git a/grpc-google-cloud-aiplatform-v1/pom.xml b/grpc-google-cloud-aiplatform-v1/pom.xml index 8ec66bcb8..dddc47376 100644 --- a/grpc-google-cloud-aiplatform-v1/pom.xml +++ b/grpc-google-cloud-aiplatform-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1 - 3.0.1-SNAPSHOT + 3.1.0 grpc-google-cloud-aiplatform-v1 GRPC library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.0.1-SNAPSHOT + 3.1.0 diff --git a/grpc-google-cloud-aiplatform-v1beta1/pom.xml b/grpc-google-cloud-aiplatform-v1beta1/pom.xml index 2ab6557de..07d3e5a20 100644 --- a/grpc-google-cloud-aiplatform-v1beta1/pom.xml +++ b/grpc-google-cloud-aiplatform-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.16.1-SNAPSHOT + 0.17.0 grpc-google-cloud-aiplatform-v1beta1 GRPC library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.0.1-SNAPSHOT + 3.1.0 diff --git a/pom.xml b/pom.xml index a48f229c6..73a8a17ac 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-aiplatform-parent pom - 3.0.1-SNAPSHOT + 3.1.0 Google Cloud Vertex AI Parent https://github.com/googleapis/java- @@ -61,27 +61,27 @@ com.google.cloud google-cloud-aiplatform - 3.0.1-SNAPSHOT + 3.1.0 com.google.api.grpc proto-google-cloud-aiplatform-v1 - 3.0.1-SNAPSHOT + 3.1.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.16.1-SNAPSHOT + 0.17.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1 - 3.0.1-SNAPSHOT + 3.1.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.16.1-SNAPSHOT + 0.17.0 com.google.cloud diff --git a/proto-google-cloud-aiplatform-v1/pom.xml b/proto-google-cloud-aiplatform-v1/pom.xml index fba7784b5..9ae6414c9 100644 --- a/proto-google-cloud-aiplatform-v1/pom.xml +++ b/proto-google-cloud-aiplatform-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-aiplatform-v1 - 3.0.1-SNAPSHOT + 3.1.0 proto-google-cloud-aiplatform-v1 Proto library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.0.1-SNAPSHOT + 3.1.0 diff --git a/proto-google-cloud-aiplatform-v1beta1/pom.xml b/proto-google-cloud-aiplatform-v1beta1/pom.xml index fbfd2536d..8517dff08 100644 --- a/proto-google-cloud-aiplatform-v1beta1/pom.xml +++ b/proto-google-cloud-aiplatform-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.16.1-SNAPSHOT + 0.17.0 proto-google-cloud-aiplatform-v1beta1 Proto library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.0.1-SNAPSHOT + 3.1.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 09d595c51..c48504b9f 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-aiplatform - 3.0.1-SNAPSHOT + 3.1.0 diff --git a/versions.txt b/versions.txt index 95480f749..e34f02ce5 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-aiplatform:3.0.0:3.0.1-SNAPSHOT -grpc-google-cloud-aiplatform-v1:3.0.0:3.0.1-SNAPSHOT -grpc-google-cloud-aiplatform-v1beta1:0.16.0:0.16.1-SNAPSHOT -proto-google-cloud-aiplatform-v1:3.0.0:3.0.1-SNAPSHOT -proto-google-cloud-aiplatform-v1beta1:0.16.0:0.16.1-SNAPSHOT +google-cloud-aiplatform:3.1.0:3.1.0 +grpc-google-cloud-aiplatform-v1:3.1.0:3.1.0 +grpc-google-cloud-aiplatform-v1beta1:0.17.0:0.17.0 +proto-google-cloud-aiplatform-v1:3.1.0:3.1.0 +proto-google-cloud-aiplatform-v1beta1:0.17.0:0.17.0