diff --git a/.kokoro/continuous/node12/samples-test.cfg b/.kokoro/continuous/node12/samples-test.cfg index 370f1f68..0a040f9a 100644 --- a/.kokoro/continuous/node12/samples-test.cfg +++ b/.kokoro/continuous/node12/samples-test.cfg @@ -5,8 +5,3 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-ai-platform/.kokoro/samples-test.sh" } - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "nodejs-ai-platform-env" -} diff --git a/.kokoro/pre-samples-test.sh b/.kokoro/pre-samples-test.sh deleted file mode 100644 index 3447b0b4..00000000 --- a/.kokoro/pre-samples-test.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Copyright 2020 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 -# -# https://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. - -source $KOKORO_GFILE_DIR/secret_manager/nodejs-ai-platform-env -echo 'loaded additional environment' diff --git a/.kokoro/presubmit/node12/samples-test.cfg b/.kokoro/presubmit/node12/samples-test.cfg index d9a85a32..0a040f9a 100644 --- a/.kokoro/presubmit/node12/samples-test.cfg +++ b/.kokoro/presubmit/node12/samples-test.cfg @@ -5,8 +5,3 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-ai-platform/.kokoro/samples-test.sh" } - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "nodejs-ai-platform-env, ucaip_samples_secrets" -} diff --git a/README.md b/README.md index 5bf17867..074c3752 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - * [Using the client library](#using-the-client-library) -* [Samples](#samples) + + * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -57,136 +57,6 @@ npm install @google-cloud/aiplatform ``` -### Using the client library - -```javascript -const {DatasetServiceClient} = require('@google-cloud/aiplatform'); -const client = new DatasetServiceClient(); - -// Do something with DatasetServiceClient. -console.info(client); - - -``` - - - -## Samples - -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-ai-platform/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. - -| Sample | Source Code | Try it | -| --------------------------- | --------------------------------- | ------ | -| Batch-create-features-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/batch-create-features-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/batch-create-features-sample.js,samples/README.md) | -| Batch-read-feature-values-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/batch-read-feature-values-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/batch-read-feature-values-sample.js,samples/README.md) | -| Cancel-batch-prediction-job | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/cancel-batch-prediction-job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/cancel-batch-prediction-job.js,samples/README.md) | -| Cancel-custom-job | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/cancel-custom-job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/cancel-custom-job.js,samples/README.md) | -| Create-batch-prediction-job-text-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-text-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-text-classification.js,samples/README.md) | -| Create-batch-prediction-job-text-entity-extraction | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-text-entity-extraction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-text-entity-extraction.js,samples/README.md) | -| Create-batch-prediction-job-text-sentiment-analysis | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-text-sentiment-analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-text-sentiment-analysis.js,samples/README.md) | -| Create-batch-prediction-job-video-action-recognition | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-video-action-recognition.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-video-action-recognition.js,samples/README.md) | -| Create-batch-prediction-job-video-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-video-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-video-classification.js,samples/README.md) | -| Create-batch-prediction-job-video-object-tracking | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-video-object-tracking.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-video-object-tracking.js,samples/README.md) | -| Create-custom-job | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-custom-job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-custom-job.js,samples/README.md) | -| Create-dataset-image | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset-image.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset-image.js,samples/README.md) | -| Create-dataset-tabular-bigquery | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset-tabular-bigquery.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset-tabular-bigquery.js,samples/README.md) | -| Create-dataset-tabular-gcs | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset-tabular-gcs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset-tabular-gcs.js,samples/README.md) | -| Create-dataset-text | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset-text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset-text.js,samples/README.md) | -| Create-dataset-video | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset-video.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset-video.js,samples/README.md) | -| Create-dataset | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset.js,samples/README.md) | -| Create-endpoint | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-endpoint.js,samples/README.md) | -| Create-entity-type-monitoring-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-entity-type-monitoring-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-entity-type-monitoring-sample.js,samples/README.md) | -| Create-entity-type-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-entity-type-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-entity-type-sample.js,samples/README.md) | -| Create-feature-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-feature-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-feature-sample.js,samples/README.md) | -| Create-featurestore-fixed-nodes-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-featurestore-fixed-nodes-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-featurestore-fixed-nodes-sample.js,samples/README.md) | -| Create-featurestore-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-featurestore-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-featurestore-sample.js,samples/README.md) | -| Create-hyperparameter-tuning-job | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-hyperparameter-tuning-job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-hyperparameter-tuning-job.js,samples/README.md) | -| Create-training-pipeline-image-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-image-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-image-classification.js,samples/README.md) | -| Create-training-pipeline-image-object-detection | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-image-object-detection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-image-object-detection.js,samples/README.md) | -| Create-training-pipeline-tabular-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-tabular-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-tabular-classification.js,samples/README.md) | -| Create-training-pipeline-tabular-regression | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-tabular-regression.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-tabular-regression.js,samples/README.md) | -| Create-training-pipeline-text-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-text-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-classification.js,samples/README.md) | -| Create-training-pipeline-text-entity-extraction | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-text-entity-extraction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-entity-extraction.js,samples/README.md) | -| Create-training-pipeline-text-sentiment-analysis | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-text-sentiment-analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-sentiment-analysis.js,samples/README.md) | -| Create-training-pipeline-video-action-recognition | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-video-action-recognition.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-video-action-recognition.js,samples/README.md) | -| Create-training-pipeline-video-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-video-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-video-classification.js,samples/README.md) | -| Create-training-pipeline-video-object-tracking | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-video-object-tracking.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-video-object-tracking.js,samples/README.md) | -| Delete-batch-prediction-job | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-batch-prediction-job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-batch-prediction-job.js,samples/README.md) | -| Delete-custom-job | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-custom-job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-custom-job.js,samples/README.md) | -| Delete-dataset | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-dataset.js,samples/README.md) | -| Delete-endpoint | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-endpoint.js,samples/README.md) | -| Delete-entity-type-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-entity-type-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-entity-type-sample.js,samples/README.md) | -| Delete-export-model | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-export-model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-export-model.js,samples/README.md) | -| Delete-feature-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-feature-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-feature-sample.js,samples/README.md) | -| Delete-featurestore-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-featurestore-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-featurestore-sample.js,samples/README.md) | -| Delete-model | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-model.js,samples/README.md) | -| Deploy-model-custom-trained-model | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/deploy-model-custom-trained-model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/deploy-model-custom-trained-model.js,samples/README.md) | -| Deploy-model | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/deploy-model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/deploy-model.js,samples/README.md) | -| Export-feature-values-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/export-feature-values-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/export-feature-values-sample.js,samples/README.md) | -| Export-feature-values-snapshot-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/export-feature-values-snapshot-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/export-feature-values-snapshot-sample.js,samples/README.md) | -| Export-model-tabular-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/export-model-tabular-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/export-model-tabular-classification.js,samples/README.md) | -| Export-model | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/export-model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/export-model.js,samples/README.md) | -| Get-batch-prediction-job | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-batch-prediction-job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-batch-prediction-job.js,samples/README.md) | -| Get-custom-job | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-custom-job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-custom-job.js,samples/README.md) | -| Get-entity-type-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-entity-type-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-entity-type-sample.js,samples/README.md) | -| Get-feature-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-feature-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-feature-sample.js,samples/README.md) | -| Get-featurestore-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-featurestore-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-featurestore-sample.js,samples/README.md) | -| Get-hyperparameter-tuning-job | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-hyperparameter-tuning-job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-hyperparameter-tuning-job.js,samples/README.md) | -| Get-model-evaluation-image-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-image-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-image-classification.js,samples/README.md) | -| Get-model-evaluation-image-object-detection | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-image-object-detection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-image-object-detection.js,samples/README.md) | -| Get-model-evaluation-slice | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-slice.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-slice.js,samples/README.md) | -| Get-model-evaluation-tabular-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-tabular-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-tabular-classification.js,samples/README.md) | -| Get-model-evaluation-tabular-regression | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-tabular-regression.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-tabular-regression.js,samples/README.md) | -| Get-model-evaluation-text-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-text-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-text-classification.js,samples/README.md) | -| Get-model-evaluation-text-entity-extraction | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-text-entity-extraction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-text-entity-extraction.js,samples/README.md) | -| Get-model-evaluation-text-sentiment-analysis | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-text-sentiment-analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-text-sentiment-analysis.js,samples/README.md) | -| Get-model-evaluation-video-action-recognition | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-video-action-recognition.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-video-action-recognition.js,samples/README.md) | -| Get-model-evaluation-video-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-video-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-video-classification.js,samples/README.md) | -| Get-model-evaluation-video-object-tracking | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-video-object-tracking.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-video-object-tracking.js,samples/README.md) | -| Get-model-evaluation | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation.js,samples/README.md) | -| Get-model | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model.js,samples/README.md) | -| Get-training-pipeline | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-training-pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-training-pipeline.js,samples/README.md) | -| Import-data-image-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-image-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-image-classification.js,samples/README.md) | -| Import-data-image-object-detection | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-image-object-detection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-image-object-detection.js,samples/README.md) | -| Import-data-text-classification-single-label | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-text-classification-single-label.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-text-classification-single-label.js,samples/README.md) | -| Import-data-text-entity-extraction | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-text-entity-extraction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-text-entity-extraction.js,samples/README.md) | -| Import-data-text-sentiment-analysis | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-text-sentiment-analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-text-sentiment-analysis.js,samples/README.md) | -| Import-data-video-action-recognition | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-video-action-recognition.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-video-action-recognition.js,samples/README.md) | -| Import-data-video-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-video-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-video-classification.js,samples/README.md) | -| Import-data-video-object-tracking | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-video-object-tracking.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-video-object-tracking.js,samples/README.md) | -| Import-data | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data.js,samples/README.md) | -| Import-feature-values-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-feature-values-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-feature-values-sample.js,samples/README.md) | -| List-endpoints | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-endpoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-endpoints.js,samples/README.md) | -| List-entity-types-async-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-entity-types-async-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-entity-types-async-sample.js,samples/README.md) | -| List-entity-types-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-entity-types-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-entity-types-sample.js,samples/README.md) | -| List-entity-types-stream-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-entity-types-stream-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-entity-types-stream-sample.js,samples/README.md) | -| List-features-async-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-features-async-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-features-async-sample.js,samples/README.md) | -| List-features-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-features-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-features-sample.js,samples/README.md) | -| List-features-stream-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-features-stream-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-features-stream-sample.js,samples/README.md) | -| List-featurestores-async-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-featurestores-async-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-featurestores-async-sample.js,samples/README.md) | -| List-featurestores-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-featurestores-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-featurestores-sample.js,samples/README.md) | -| List-featurestores-stream-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-featurestores-stream-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-featurestores-stream-sample.js,samples/README.md) | -| List-model-evaluation-slices | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-model-evaluation-slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-model-evaluation-slices.js,samples/README.md) | -| Predict-custom-trained-model | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-custom-trained-model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-custom-trained-model.js,samples/README.md) | -| Predict-image-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-image-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-image-classification.js,samples/README.md) | -| Predict-image-object-detection | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-image-object-detection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-image-object-detection.js,samples/README.md) | -| Predict-tabular-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-tabular-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-tabular-classification.js,samples/README.md) | -| Predict-tabular-regression | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-tabular-regression.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-tabular-regression.js,samples/README.md) | -| Predict-text-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-text-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-classification.js,samples/README.md) | -| Predict-text-entity-extraction | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-text-entity-extraction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-entity-extraction.js,samples/README.md) | -| Predict-text-sentiment-analysis | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-text-sentiment-analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-sentiment-analysis.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | -| Read-feature-values-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/read-feature-values-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/read-feature-values-sample.js,samples/README.md) | -| Search-features-async-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/search-features-async-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/search-features-async-sample.js,samples/README.md) | -| Search-features-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/search-features-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/search-features-sample.js,samples/README.md) | -| Search-features-stream-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/search-features-stream-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/search-features-stream-sample.js,samples/README.md) | -| Undeploy-model | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/undeploy-model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/undeploy-model.js,samples/README.md) | -| Update-entity-type-monitoring-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/update-entity-type-monitoring-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/update-entity-type-monitoring-sample.js,samples/README.md) | -| Update-entity-type-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/update-entity-type-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/update-entity-type-sample.js,samples/README.md) | -| Update-feature-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/update-feature-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/update-feature-sample.js,samples/README.md) | -| Update-featurestore-fixed-nodes-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/update-featurestore-fixed-nodes-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/update-featurestore-fixed-nodes-sample.js,samples/README.md) | -| Update-featurestore-sample | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/update-featurestore-sample.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/update-featurestore-sample.js,samples/README.md) | -| Upload-model | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/upload-model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/upload-model.js,samples/README.md) | diff --git a/owlbot.py b/owlbot.py index 8e20e134..eb9b686e 100644 --- a/owlbot.py +++ b/owlbot.py @@ -21,7 +21,6 @@ # List of excludes for the enhanced library node.owlbot_main( staging_excludes = [ - ".kokoro/presubmit/node12/samples-test.cfg", "package.json", "README.md", "src/decorator.ts", @@ -34,8 +33,6 @@ "tsconfig.json", ], templates_excludes=[ - ".kokoro/continuous/node12/samples-test.cfg", - ".kokoro/presubmit/node12/samples-test.cfg", "src/index.ts", ], ) diff --git a/package.json b/package.json index 061219a9..7eba44d5 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "prelint": "cd samples; npm link ../; npm i", "prepare": "npm run compile-protos && npm run compile", "system-test": "c8 mocha build/system-test", - "samples-test": "cd samples/ && npm link ../ && npm test", "test": "c8 node build/test/run.js" }, "dependencies": { diff --git a/samples/README.md b/samples/README.md deleted file mode 100644 index 3099f795..00000000 --- a/samples/README.md +++ /dev/null @@ -1,2015 +0,0 @@ -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "To regenerate it, use `python -m synthtool`." -Google Cloud Platform logo - -# [Vertex AI: Node.js Samples](https://github.com/googleapis/nodejs-ai-platform) - -[![Open in Cloud Shell][shell_img]][shell_link] - -Google Cloud Vertex AI is an integrated suite of machine learning tools -and services for building and using ML models with AutoML or custom code. -It offers both novices and experts the best workbench for the entire -machine learning development lifecycle. - -## Table of Contents - -* [Before you begin](#before-you-begin) -* [Samples](#samples) - * [Batch-create-features-sample](#batch-create-features-sample) - * [Batch-read-feature-values-sample](#batch-read-feature-values-sample) - * [Cancel-batch-prediction-job](#cancel-batch-prediction-job) - * [Cancel-custom-job](#cancel-custom-job) - * [Create-batch-prediction-job-text-classification](#create-batch-prediction-job-text-classification) - * [Create-batch-prediction-job-text-entity-extraction](#create-batch-prediction-job-text-entity-extraction) - * [Create-batch-prediction-job-text-sentiment-analysis](#create-batch-prediction-job-text-sentiment-analysis) - * [Create-batch-prediction-job-video-action-recognition](#create-batch-prediction-job-video-action-recognition) - * [Create-batch-prediction-job-video-classification](#create-batch-prediction-job-video-classification) - * [Create-batch-prediction-job-video-object-tracking](#create-batch-prediction-job-video-object-tracking) - * [Create-custom-job](#create-custom-job) - * [Create-dataset-image](#create-dataset-image) - * [Create-dataset-tabular-bigquery](#create-dataset-tabular-bigquery) - * [Create-dataset-tabular-gcs](#create-dataset-tabular-gcs) - * [Create-dataset-text](#create-dataset-text) - * [Create-dataset-video](#create-dataset-video) - * [Create-dataset](#create-dataset) - * [Create-endpoint](#create-endpoint) - * [Create-entity-type-monitoring-sample](#create-entity-type-monitoring-sample) - * [Create-entity-type-sample](#create-entity-type-sample) - * [Create-feature-sample](#create-feature-sample) - * [Create-featurestore-fixed-nodes-sample](#create-featurestore-fixed-nodes-sample) - * [Create-featurestore-sample](#create-featurestore-sample) - * [Create-hyperparameter-tuning-job](#create-hyperparameter-tuning-job) - * [Create-training-pipeline-image-classification](#create-training-pipeline-image-classification) - * [Create-training-pipeline-image-object-detection](#create-training-pipeline-image-object-detection) - * [Create-training-pipeline-tabular-classification](#create-training-pipeline-tabular-classification) - * [Create-training-pipeline-tabular-regression](#create-training-pipeline-tabular-regression) - * [Create-training-pipeline-text-classification](#create-training-pipeline-text-classification) - * [Create-training-pipeline-text-entity-extraction](#create-training-pipeline-text-entity-extraction) - * [Create-training-pipeline-text-sentiment-analysis](#create-training-pipeline-text-sentiment-analysis) - * [Create-training-pipeline-video-action-recognition](#create-training-pipeline-video-action-recognition) - * [Create-training-pipeline-video-classification](#create-training-pipeline-video-classification) - * [Create-training-pipeline-video-object-tracking](#create-training-pipeline-video-object-tracking) - * [Delete-batch-prediction-job](#delete-batch-prediction-job) - * [Delete-custom-job](#delete-custom-job) - * [Delete-dataset](#delete-dataset) - * [Delete-endpoint](#delete-endpoint) - * [Delete-entity-type-sample](#delete-entity-type-sample) - * [Delete-export-model](#delete-export-model) - * [Delete-feature-sample](#delete-feature-sample) - * [Delete-featurestore-sample](#delete-featurestore-sample) - * [Delete-model](#delete-model) - * [Deploy-model-custom-trained-model](#deploy-model-custom-trained-model) - * [Deploy-model](#deploy-model) - * [Export-feature-values-sample](#export-feature-values-sample) - * [Export-feature-values-snapshot-sample](#export-feature-values-snapshot-sample) - * [Export-model-tabular-classification](#export-model-tabular-classification) - * [Export-model](#export-model) - * [Get-batch-prediction-job](#get-batch-prediction-job) - * [Get-custom-job](#get-custom-job) - * [Get-entity-type-sample](#get-entity-type-sample) - * [Get-feature-sample](#get-feature-sample) - * [Get-featurestore-sample](#get-featurestore-sample) - * [Get-hyperparameter-tuning-job](#get-hyperparameter-tuning-job) - * [Get-model-evaluation-image-classification](#get-model-evaluation-image-classification) - * [Get-model-evaluation-image-object-detection](#get-model-evaluation-image-object-detection) - * [Get-model-evaluation-slice](#get-model-evaluation-slice) - * [Get-model-evaluation-tabular-classification](#get-model-evaluation-tabular-classification) - * [Get-model-evaluation-tabular-regression](#get-model-evaluation-tabular-regression) - * [Get-model-evaluation-text-classification](#get-model-evaluation-text-classification) - * [Get-model-evaluation-text-entity-extraction](#get-model-evaluation-text-entity-extraction) - * [Get-model-evaluation-text-sentiment-analysis](#get-model-evaluation-text-sentiment-analysis) - * [Get-model-evaluation-video-action-recognition](#get-model-evaluation-video-action-recognition) - * [Get-model-evaluation-video-classification](#get-model-evaluation-video-classification) - * [Get-model-evaluation-video-object-tracking](#get-model-evaluation-video-object-tracking) - * [Get-model-evaluation](#get-model-evaluation) - * [Get-model](#get-model) - * [Get-training-pipeline](#get-training-pipeline) - * [Import-data-image-classification](#import-data-image-classification) - * [Import-data-image-object-detection](#import-data-image-object-detection) - * [Import-data-text-classification-single-label](#import-data-text-classification-single-label) - * [Import-data-text-entity-extraction](#import-data-text-entity-extraction) - * [Import-data-text-sentiment-analysis](#import-data-text-sentiment-analysis) - * [Import-data-video-action-recognition](#import-data-video-action-recognition) - * [Import-data-video-classification](#import-data-video-classification) - * [Import-data-video-object-tracking](#import-data-video-object-tracking) - * [Import-data](#import-data) - * [Import-feature-values-sample](#import-feature-values-sample) - * [List-endpoints](#list-endpoints) - * [List-entity-types-async-sample](#list-entity-types-async-sample) - * [List-entity-types-sample](#list-entity-types-sample) - * [List-entity-types-stream-sample](#list-entity-types-stream-sample) - * [List-features-async-sample](#list-features-async-sample) - * [List-features-sample](#list-features-sample) - * [List-features-stream-sample](#list-features-stream-sample) - * [List-featurestores-async-sample](#list-featurestores-async-sample) - * [List-featurestores-sample](#list-featurestores-sample) - * [List-featurestores-stream-sample](#list-featurestores-stream-sample) - * [List-model-evaluation-slices](#list-model-evaluation-slices) - * [Predict-custom-trained-model](#predict-custom-trained-model) - * [Predict-image-classification](#predict-image-classification) - * [Predict-image-object-detection](#predict-image-object-detection) - * [Predict-tabular-classification](#predict-tabular-classification) - * [Predict-tabular-regression](#predict-tabular-regression) - * [Predict-text-classification](#predict-text-classification) - * [Predict-text-entity-extraction](#predict-text-entity-extraction) - * [Predict-text-sentiment-analysis](#predict-text-sentiment-analysis) - * [Quickstart](#quickstart) - * [Read-feature-values-sample](#read-feature-values-sample) - * [Search-features-async-sample](#search-features-async-sample) - * [Search-features-sample](#search-features-sample) - * [Search-features-stream-sample](#search-features-stream-sample) - * [Undeploy-model](#undeploy-model) - * [Update-entity-type-monitoring-sample](#update-entity-type-monitoring-sample) - * [Update-entity-type-sample](#update-entity-type-sample) - * [Update-feature-sample](#update-feature-sample) - * [Update-featurestore-fixed-nodes-sample](#update-featurestore-fixed-nodes-sample) - * [Update-featurestore-sample](#update-featurestore-sample) - * [Upload-model](#upload-model) - -## Before you begin - -Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-ai-platform#using-the-client-library). - -`cd samples` - -`npm install` - -`cd ..` - -## Samples - - - -### Batch-create-features-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/batch-create-features-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/batch-create-features-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/batch-create-features-sample.js` - - ------ - - - - -### Batch-read-feature-values-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/batch-read-feature-values-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/batch-read-feature-values-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/batch-read-feature-values-sample.js` - - ------ - - - - -### Cancel-batch-prediction-job - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/cancel-batch-prediction-job.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/cancel-batch-prediction-job.js,samples/README.md) - -__Usage:__ - - -`node samples/cancel-batch-prediction-job.js` - - ------ - - - - -### Cancel-custom-job - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/cancel-custom-job.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/cancel-custom-job.js,samples/README.md) - -__Usage:__ - - -`node samples/cancel-custom-job.js` - - ------ - - - - -### Create-batch-prediction-job-text-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-text-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-text-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/create-batch-prediction-job-text-classification.js` - - ------ - - - - -### Create-batch-prediction-job-text-entity-extraction - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-text-entity-extraction.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-text-entity-extraction.js,samples/README.md) - -__Usage:__ - - -`node samples/create-batch-prediction-job-text-entity-extraction.js` - - ------ - - - - -### Create-batch-prediction-job-text-sentiment-analysis - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-text-sentiment-analysis.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-text-sentiment-analysis.js,samples/README.md) - -__Usage:__ - - -`node samples/create-batch-prediction-job-text-sentiment-analysis.js` - - ------ - - - - -### Create-batch-prediction-job-video-action-recognition - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-video-action-recognition.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-video-action-recognition.js,samples/README.md) - -__Usage:__ - - -`node samples/create-batch-prediction-job-video-action-recognition.js` - - ------ - - - - -### Create-batch-prediction-job-video-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-video-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-video-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/create-batch-prediction-job-video-classification.js` - - ------ - - - - -### Create-batch-prediction-job-video-object-tracking - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-batch-prediction-job-video-object-tracking.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-video-object-tracking.js,samples/README.md) - -__Usage:__ - - -`node samples/create-batch-prediction-job-video-object-tracking.js` - - ------ - - - - -### Create-custom-job - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-custom-job.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-custom-job.js,samples/README.md) - -__Usage:__ - - -`node samples/create-custom-job.js` - - ------ - - - - -### Create-dataset-image - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset-image.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset-image.js,samples/README.md) - -__Usage:__ - - -`node samples/create-dataset-image.js` - - ------ - - - - -### Create-dataset-tabular-bigquery - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset-tabular-bigquery.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset-tabular-bigquery.js,samples/README.md) - -__Usage:__ - - -`node samples/create-dataset-tabular-bigquery.js` - - ------ - - - - -### Create-dataset-tabular-gcs - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset-tabular-gcs.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset-tabular-gcs.js,samples/README.md) - -__Usage:__ - - -`node samples/create-dataset-tabular-gcs.js` - - ------ - - - - -### Create-dataset-text - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset-text.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset-text.js,samples/README.md) - -__Usage:__ - - -`node samples/create-dataset-text.js` - - ------ - - - - -### Create-dataset-video - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset-video.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset-video.js,samples/README.md) - -__Usage:__ - - -`node samples/create-dataset-video.js` - - ------ - - - - -### Create-dataset - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-dataset.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-dataset.js,samples/README.md) - -__Usage:__ - - -`node samples/create-dataset.js` - - ------ - - - - -### Create-endpoint - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-endpoint.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-endpoint.js,samples/README.md) - -__Usage:__ - - -`node samples/create-endpoint.js` - - ------ - - - - -### Create-entity-type-monitoring-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-entity-type-monitoring-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-entity-type-monitoring-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/create-entity-type-monitoring-sample.js` - - ------ - - - - -### Create-entity-type-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-entity-type-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-entity-type-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/create-entity-type-sample.js` - - ------ - - - - -### Create-feature-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-feature-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-feature-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/create-feature-sample.js` - - ------ - - - - -### Create-featurestore-fixed-nodes-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-featurestore-fixed-nodes-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-featurestore-fixed-nodes-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/create-featurestore-fixed-nodes-sample.js` - - ------ - - - - -### Create-featurestore-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-featurestore-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-featurestore-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/create-featurestore-sample.js` - - ------ - - - - -### Create-hyperparameter-tuning-job - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-hyperparameter-tuning-job.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-hyperparameter-tuning-job.js,samples/README.md) - -__Usage:__ - - -`node samples/create-hyperparameter-tuning-job.js` - - ------ - - - - -### Create-training-pipeline-image-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-image-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-image-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/create-training-pipeline-image-classification.js` - - ------ - - - - -### Create-training-pipeline-image-object-detection - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-image-object-detection.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-image-object-detection.js,samples/README.md) - -__Usage:__ - - -`node samples/create-training-pipeline-image-object-detection.js` - - ------ - - - - -### Create-training-pipeline-tabular-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-tabular-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-tabular-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/create-training-pipeline-tabular-classification.js` - - ------ - - - - -### Create-training-pipeline-tabular-regression - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-tabular-regression.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-tabular-regression.js,samples/README.md) - -__Usage:__ - - -`node samples/create-training-pipeline-tabular-regression.js` - - ------ - - - - -### Create-training-pipeline-text-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-text-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/create-training-pipeline-text-classification.js` - - ------ - - - - -### Create-training-pipeline-text-entity-extraction - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-text-entity-extraction.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-entity-extraction.js,samples/README.md) - -__Usage:__ - - -`node samples/create-training-pipeline-text-entity-extraction.js` - - ------ - - - - -### Create-training-pipeline-text-sentiment-analysis - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-text-sentiment-analysis.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-sentiment-analysis.js,samples/README.md) - -__Usage:__ - - -`node samples/create-training-pipeline-text-sentiment-analysis.js` - - ------ - - - - -### Create-training-pipeline-video-action-recognition - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-video-action-recognition.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-video-action-recognition.js,samples/README.md) - -__Usage:__ - - -`node samples/create-training-pipeline-video-action-recognition.js` - - ------ - - - - -### Create-training-pipeline-video-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-video-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-video-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/create-training-pipeline-video-classification.js` - - ------ - - - - -### Create-training-pipeline-video-object-tracking - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/create-training-pipeline-video-object-tracking.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-video-object-tracking.js,samples/README.md) - -__Usage:__ - - -`node samples/create-training-pipeline-video-object-tracking.js` - - ------ - - - - -### Delete-batch-prediction-job - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-batch-prediction-job.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-batch-prediction-job.js,samples/README.md) - -__Usage:__ - - -`node samples/delete-batch-prediction-job.js` - - ------ - - - - -### Delete-custom-job - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-custom-job.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-custom-job.js,samples/README.md) - -__Usage:__ - - -`node samples/delete-custom-job.js` - - ------ - - - - -### Delete-dataset - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-dataset.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-dataset.js,samples/README.md) - -__Usage:__ - - -`node samples/delete-dataset.js` - - ------ - - - - -### Delete-endpoint - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-endpoint.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-endpoint.js,samples/README.md) - -__Usage:__ - - -`node samples/delete-endpoint.js` - - ------ - - - - -### Delete-entity-type-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-entity-type-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-entity-type-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/delete-entity-type-sample.js` - - ------ - - - - -### Delete-export-model - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-export-model.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-export-model.js,samples/README.md) - -__Usage:__ - - -`node samples/delete-export-model.js` - - ------ - - - - -### Delete-feature-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-feature-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-feature-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/delete-feature-sample.js` - - ------ - - - - -### Delete-featurestore-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-featurestore-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-featurestore-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/delete-featurestore-sample.js` - - ------ - - - - -### Delete-model - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/delete-model.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/delete-model.js,samples/README.md) - -__Usage:__ - - -`node samples/delete-model.js` - - ------ - - - - -### Deploy-model-custom-trained-model - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/deploy-model-custom-trained-model.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/deploy-model-custom-trained-model.js,samples/README.md) - -__Usage:__ - - -`node samples/deploy-model-custom-trained-model.js` - - ------ - - - - -### Deploy-model - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/deploy-model.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/deploy-model.js,samples/README.md) - -__Usage:__ - - -`node samples/deploy-model.js` - - ------ - - - - -### Export-feature-values-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/export-feature-values-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/export-feature-values-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/export-feature-values-sample.js` - - ------ - - - - -### Export-feature-values-snapshot-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/export-feature-values-snapshot-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/export-feature-values-snapshot-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/export-feature-values-snapshot-sample.js` - - ------ - - - - -### Export-model-tabular-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/export-model-tabular-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/export-model-tabular-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/export-model-tabular-classification.js` - - ------ - - - - -### Export-model - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/export-model.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/export-model.js,samples/README.md) - -__Usage:__ - - -`node samples/export-model.js` - - ------ - - - - -### Get-batch-prediction-job - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-batch-prediction-job.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-batch-prediction-job.js,samples/README.md) - -__Usage:__ - - -`node samples/get-batch-prediction-job.js` - - ------ - - - - -### Get-custom-job - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-custom-job.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-custom-job.js,samples/README.md) - -__Usage:__ - - -`node samples/get-custom-job.js` - - ------ - - - - -### Get-entity-type-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-entity-type-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-entity-type-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/get-entity-type-sample.js` - - ------ - - - - -### Get-feature-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-feature-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-feature-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/get-feature-sample.js` - - ------ - - - - -### Get-featurestore-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-featurestore-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-featurestore-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/get-featurestore-sample.js` - - ------ - - - - -### Get-hyperparameter-tuning-job - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-hyperparameter-tuning-job.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-hyperparameter-tuning-job.js,samples/README.md) - -__Usage:__ - - -`node samples/get-hyperparameter-tuning-job.js` - - ------ - - - - -### Get-model-evaluation-image-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-image-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-image-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-image-classification.js` - - ------ - - - - -### Get-model-evaluation-image-object-detection - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-image-object-detection.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-image-object-detection.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-image-object-detection.js` - - ------ - - - - -### Get-model-evaluation-slice - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-slice.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-slice.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-slice.js` - - ------ - - - - -### Get-model-evaluation-tabular-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-tabular-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-tabular-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-tabular-classification.js` - - ------ - - - - -### Get-model-evaluation-tabular-regression - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-tabular-regression.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-tabular-regression.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-tabular-regression.js` - - ------ - - - - -### Get-model-evaluation-text-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-text-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-text-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-text-classification.js` - - ------ - - - - -### Get-model-evaluation-text-entity-extraction - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-text-entity-extraction.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-text-entity-extraction.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-text-entity-extraction.js` - - ------ - - - - -### Get-model-evaluation-text-sentiment-analysis - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-text-sentiment-analysis.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-text-sentiment-analysis.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-text-sentiment-analysis.js` - - ------ - - - - -### Get-model-evaluation-video-action-recognition - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-video-action-recognition.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-video-action-recognition.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-video-action-recognition.js` - - ------ - - - - -### Get-model-evaluation-video-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-video-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-video-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-video-classification.js` - - ------ - - - - -### Get-model-evaluation-video-object-tracking - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation-video-object-tracking.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation-video-object-tracking.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation-video-object-tracking.js` - - ------ - - - - -### Get-model-evaluation - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model-evaluation.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model-evaluation.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model-evaluation.js` - - ------ - - - - -### Get-model - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-model.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-model.js,samples/README.md) - -__Usage:__ - - -`node samples/get-model.js` - - ------ - - - - -### Get-training-pipeline - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/get-training-pipeline.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/get-training-pipeline.js,samples/README.md) - -__Usage:__ - - -`node samples/get-training-pipeline.js` - - ------ - - - - -### Import-data-image-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-image-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-image-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/import-data-image-classification.js` - - ------ - - - - -### Import-data-image-object-detection - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-image-object-detection.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-image-object-detection.js,samples/README.md) - -__Usage:__ - - -`node samples/import-data-image-object-detection.js` - - ------ - - - - -### Import-data-text-classification-single-label - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-text-classification-single-label.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-text-classification-single-label.js,samples/README.md) - -__Usage:__ - - -`node samples/import-data-text-classification-single-label.js` - - ------ - - - - -### Import-data-text-entity-extraction - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-text-entity-extraction.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-text-entity-extraction.js,samples/README.md) - -__Usage:__ - - -`node samples/import-data-text-entity-extraction.js` - - ------ - - - - -### Import-data-text-sentiment-analysis - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-text-sentiment-analysis.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-text-sentiment-analysis.js,samples/README.md) - -__Usage:__ - - -`node samples/import-data-text-sentiment-analysis.js` - - ------ - - - - -### Import-data-video-action-recognition - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-video-action-recognition.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-video-action-recognition.js,samples/README.md) - -__Usage:__ - - -`node samples/import-data-video-action-recognition.js` - - ------ - - - - -### Import-data-video-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-video-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-video-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/import-data-video-classification.js` - - ------ - - - - -### Import-data-video-object-tracking - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data-video-object-tracking.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data-video-object-tracking.js,samples/README.md) - -__Usage:__ - - -`node samples/import-data-video-object-tracking.js` - - ------ - - - - -### Import-data - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-data.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-data.js,samples/README.md) - -__Usage:__ - - -`node samples/import-data.js` - - ------ - - - - -### Import-feature-values-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/import-feature-values-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/import-feature-values-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/import-feature-values-sample.js` - - ------ - - - - -### List-endpoints - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-endpoints.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-endpoints.js,samples/README.md) - -__Usage:__ - - -`node samples/list-endpoints.js` - - ------ - - - - -### List-entity-types-async-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-entity-types-async-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-entity-types-async-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/list-entity-types-async-sample.js` - - ------ - - - - -### List-entity-types-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-entity-types-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-entity-types-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/list-entity-types-sample.js` - - ------ - - - - -### List-entity-types-stream-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-entity-types-stream-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-entity-types-stream-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/list-entity-types-stream-sample.js` - - ------ - - - - -### List-features-async-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-features-async-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-features-async-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/list-features-async-sample.js` - - ------ - - - - -### List-features-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-features-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-features-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/list-features-sample.js` - - ------ - - - - -### List-features-stream-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-features-stream-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-features-stream-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/list-features-stream-sample.js` - - ------ - - - - -### List-featurestores-async-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-featurestores-async-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-featurestores-async-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/list-featurestores-async-sample.js` - - ------ - - - - -### List-featurestores-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-featurestores-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-featurestores-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/list-featurestores-sample.js` - - ------ - - - - -### List-featurestores-stream-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-featurestores-stream-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-featurestores-stream-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/list-featurestores-stream-sample.js` - - ------ - - - - -### List-model-evaluation-slices - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/list-model-evaluation-slices.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-model-evaluation-slices.js,samples/README.md) - -__Usage:__ - - -`node samples/list-model-evaluation-slices.js` - - ------ - - - - -### Predict-custom-trained-model - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-custom-trained-model.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-custom-trained-model.js,samples/README.md) - -__Usage:__ - - -`node samples/predict-custom-trained-model.js` - - ------ - - - - -### Predict-image-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-image-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-image-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/predict-image-classification.js` - - ------ - - - - -### Predict-image-object-detection - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-image-object-detection.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-image-object-detection.js,samples/README.md) - -__Usage:__ - - -`node samples/predict-image-object-detection.js` - - ------ - - - - -### Predict-tabular-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-tabular-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-tabular-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/predict-tabular-classification.js` - - ------ - - - - -### Predict-tabular-regression - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-tabular-regression.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-tabular-regression.js,samples/README.md) - -__Usage:__ - - -`node samples/predict-tabular-regression.js` - - ------ - - - - -### Predict-text-classification - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-text-classification.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-classification.js,samples/README.md) - -__Usage:__ - - -`node samples/predict-text-classification.js` - - ------ - - - - -### Predict-text-entity-extraction - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-text-entity-extraction.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-entity-extraction.js,samples/README.md) - -__Usage:__ - - -`node samples/predict-text-entity-extraction.js` - - ------ - - - - -### Predict-text-sentiment-analysis - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/predict-text-sentiment-analysis.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-sentiment-analysis.js,samples/README.md) - -__Usage:__ - - -`node samples/predict-text-sentiment-analysis.js` - - ------ - - - - -### Quickstart - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/quickstart.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) - -__Usage:__ - - -`node samples/quickstart.js` - - ------ - - - - -### Read-feature-values-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/read-feature-values-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/read-feature-values-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/read-feature-values-sample.js` - - ------ - - - - -### Search-features-async-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/search-features-async-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/search-features-async-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/search-features-async-sample.js` - - ------ - - - - -### Search-features-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/search-features-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/search-features-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/search-features-sample.js` - - ------ - - - - -### Search-features-stream-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/search-features-stream-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/search-features-stream-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/search-features-stream-sample.js` - - ------ - - - - -### Undeploy-model - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/undeploy-model.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/undeploy-model.js,samples/README.md) - -__Usage:__ - - -`node samples/undeploy-model.js` - - ------ - - - - -### Update-entity-type-monitoring-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/update-entity-type-monitoring-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/update-entity-type-monitoring-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/update-entity-type-monitoring-sample.js` - - ------ - - - - -### Update-entity-type-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/update-entity-type-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/update-entity-type-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/update-entity-type-sample.js` - - ------ - - - - -### Update-feature-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/update-feature-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/update-feature-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/update-feature-sample.js` - - ------ - - - - -### Update-featurestore-fixed-nodes-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/update-featurestore-fixed-nodes-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/update-featurestore-fixed-nodes-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/update-featurestore-fixed-nodes-sample.js` - - ------ - - - - -### Update-featurestore-sample - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/update-featurestore-sample.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/update-featurestore-sample.js,samples/README.md) - -__Usage:__ - - -`node samples/update-featurestore-sample.js` - - ------ - - - - -### Upload-model - -View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/main/samples/upload-model.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/upload-model.js,samples/README.md) - -__Usage:__ - - -`node samples/upload-model.js` - - - - - - -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/README.md -[product-docs]: https://cloud.google.com/vertex-ai/docs diff --git a/samples/batch-create-features-sample.js b/samples/batch-create-features-sample.js deleted file mode 100644 index 56592581..00000000 --- a/samples/batch-create-features-sample.js +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Creates a batch of Features in a given EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_batch_create_features_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function batchCreateFeatures() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const ageFeature = { - valueType: 'INT64', - description: 'User age', - }; - - const ageFeatureRequest = { - feature: ageFeature, - featureId: 'age', - }; - - const genderFeature = { - valueType: 'STRING', - description: 'User gender', - }; - - const genderFeatureRequest = { - feature: genderFeature, - featureId: 'gender', - }; - - const likedGenresFeature = { - valueType: 'STRING_ARRAY', - description: 'An array of genres that this user liked', - }; - - const likedGenresFeatureRequest = { - feature: likedGenresFeature, - featureId: 'liked_genres', - }; - - const requests = [ - ageFeatureRequest, - genderFeatureRequest, - likedGenresFeatureRequest, - ]; - - const request = { - parent: parent, - requests: requests, - }; - - // Batch Create Features request - const [operation] = await featurestoreServiceClient.batchCreateFeatures( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Batch create features response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - batchCreateFeatures(); - // [END aiplatform_batch_create_features_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/batch-read-feature-values-sample.js b/samples/batch-read-feature-values-sample.js deleted file mode 100644 index 75a19893..00000000 --- a/samples/batch-read-feature-values-sample.js +++ /dev/null @@ -1,136 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Batch reads Feature values from a Featurestore. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - inputCsvFile, - destinationTableUri, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_batch_read_feature_values_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const inputCsvFile = 'YOUR_INPUT_CSV_FILE_URI'; - // const destinationTableUri = 'YOUR_BQ_DESTINATION_TABLE_URI'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function batchReadFeatureValues() { - // Configure the featurestoreId resource - const featurestore = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - const csvReadInstances = { - gcsSource: { - uris: [inputCsvFile], - }, - }; - - const destination = { - bigqueryDestination: { - // # Output to BigQuery table created earlier - outputUri: destinationTableUri, - }, - }; - - const usersFeatureSelector = { - idMatcher: { - ids: [ - // features, use "*" if you want to select all features within this entity type - 'age', - 'gender', - 'liked_genres', - ], - }, - }; - - const usersEntityTypeSpec = { - // Read the 'age', 'gender' and 'liked_genres' features from the 'perm_users' entity - entityTypeId: 'perm_users', - featureSelector: usersFeatureSelector, - }; - - const moviesFeatureSelector = { - idMatcher: { - ids: ['*'], - }, - }; - - const moviesEntityTypeSpec = { - // Read the all features from the 'perm_movies' entity - entityTypeId: 'perm_movies', - featureSelector: moviesFeatureSelector, - }; - - const entityTypeSpecs = [usersEntityTypeSpec, moviesEntityTypeSpec]; - - // Construct request - const request = { - featurestore: featurestore, - csvReadInstances: csvReadInstances, - destination: destination, - entityTypeSpecs: entityTypeSpecs, - }; - - // Batch Read Feature Values Request - const [operation] = await featurestoreServiceClient.batchReadFeatureValues( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Batch read feature values response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - batchReadFeatureValues(); - // [END aiplatform_batch_read_feature_values_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/cancel-batch-prediction-job.js b/samples/cancel-batch-prediction-job.js deleted file mode 100644 index c9c8c8e4..00000000 --- a/samples/cancel-batch-prediction-job.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(batchPredictionJobId, project, location = 'us-central1') { - // [START aiplatform_cancel_batch_prediction_job_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const batchPredictionJobId = 'YOUR_BATCH_PREDICTION_JOB_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function cancelBatchPredictionJob() { - // Configure the name resource - const name = `projects/${project}/locations/${location}/batchPredictionJobs/${batchPredictionJobId}`; - const request = { - name, - }; - - // Cancel batch prediction job request - await jobServiceClient.cancelBatchPredictionJob(request); - console.log('Cancel batch prediction job response :'); - } - - cancelBatchPredictionJob(); - // [END aiplatform_cancel_batch_prediction_job_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/cancel-custom-job.js b/samples/cancel-custom-job.js deleted file mode 100644 index b7e56caf..00000000 --- a/samples/cancel-custom-job.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(customJobId, project, location = 'us-central1') { - // [START aiplatform_cancel_custom_job_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - */ - - // const customJobId = 'YOUR_CUSTOM_JOB_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function cancelCustomJob() { - // Configure the name resource - const name = jobServiceClient.customJobPath(project, location, customJobId); - const request = { - name, - }; - - // Cancel custom job request - const [response] = await jobServiceClient.cancelCustomJob(request); - - console.log('Cancel custom job response:\n', response); - } - cancelCustomJob(); - // [END aiplatform_cancel_custom_job_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-batch-prediction-job-text-classification.js b/samples/create-batch-prediction-job-text-classification.js deleted file mode 100644 index f9cc5f35..00000000 --- a/samples/create-batch-prediction-job-text-classification.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -async function main( - batchPredictionDisplayName, - modelId, - gcsSourceUri, - gcsDestinationOutputUriPrefix, - project, - location = 'us-central1' -) { - // [START aiplatform_create_batch_prediction_job_text_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const batchPredictionDisplayName = 'YOUR_BATCH_PREDICTION_DISPLAY_NAME'; - // const modelId = 'YOUR_MODEL_ID'; - // const gcsSourceUri = 'YOUR_GCS_SOURCE_URI'; - // const gcsDestinationOutputUriPrefix = 'YOUR_GCS_DEST_OUTPUT_URI_PREFIX'; - // eg. "gs:///destination_path" - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function createBatchPredictionJobTextClassification() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - const modelName = `projects/${project}/locations/${location}/models/${modelId}`; - - const inputConfig = { - instancesFormat: 'jsonl', - gcsSource: {uris: [gcsSourceUri]}, - }; - const outputConfig = { - predictionsFormat: 'jsonl', - gcsDestination: {outputUriPrefix: gcsDestinationOutputUriPrefix}, - }; - const batchPredictionJob = { - displayName: batchPredictionDisplayName, - model: modelName, - inputConfig, - outputConfig, - }; - const request = { - parent, - batchPredictionJob, - }; - - // Create batch prediction job request - const [response] = await jobServiceClient.createBatchPredictionJob(request); - - console.log('Create batch prediction job text classification response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createBatchPredictionJobTextClassification(); - // [END aiplatform_create_batch_prediction_job_text_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-batch-prediction-job-text-entity-extraction.js b/samples/create-batch-prediction-job-text-entity-extraction.js deleted file mode 100644 index 4497c777..00000000 --- a/samples/create-batch-prediction-job-text-entity-extraction.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -async function main( - batchPredictionDisplayName, - modelId, - gcsSourceUri, - gcsDestinationOutputUriPrefix, - project, - location = 'us-central1' -) { - // [START aiplatform_create_batch_prediction_job_text_entity_extraction_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const batchPredictionDisplayName = 'YOUR_BATCH_PREDICTION_DISPLAY_NAME'; - // const modelId = 'YOUR_MODEL_ID'; - // const gcsSourceUri = 'YOUR_GCS_SOURCE_URI'; - // const gcsDestinationOutputUriPrefix = 'YOUR_GCS_DEST_OUTPUT_URI_PREFIX'; - // eg. "gs:///destination_path" - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function createBatchPredictionJobTextEntityExtraction() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - const modelName = `projects/${project}/locations/${location}/models/${modelId}`; - - const inputConfig = { - instancesFormat: 'jsonl', - gcsSource: {uris: [gcsSourceUri]}, - }; - const outputConfig = { - predictionsFormat: 'jsonl', - gcsDestination: {outputUriPrefix: gcsDestinationOutputUriPrefix}, - }; - const batchPredictionJob = { - displayName: batchPredictionDisplayName, - model: modelName, - inputConfig, - outputConfig, - }; - const request = { - parent, - batchPredictionJob, - }; - - // Create batch prediction job request - const [response] = await jobServiceClient.createBatchPredictionJob(request); - - console.log('Create batch prediction job text entity extraction response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createBatchPredictionJobTextEntityExtraction(); - // [END aiplatform_create_batch_prediction_job_text_entity_extraction_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-batch-prediction-job-text-sentiment-analysis.js b/samples/create-batch-prediction-job-text-sentiment-analysis.js deleted file mode 100644 index db85e599..00000000 --- a/samples/create-batch-prediction-job-text-sentiment-analysis.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -async function main( - batchPredictionDisplayName, - modelId, - gcsSourceUri, - gcsDestinationOutputUriPrefix, - project, - location = 'us-central1' -) { - // [START aiplatform_create_batch_prediction_job_text_sentiment_analysis_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const batchPredictionDisplayName = 'YOUR_BATCH_PREDICTION_DISPLAY_NAME'; - // const modelId = 'YOUR_MODEL_ID'; - // const gcsSourceUri = 'YOUR_GCS_SOURCE_URI'; - // const gcsDestinationOutputUriPrefix = 'YOUR_GCS_DEST_OUTPUT_URI_PREFIX'; - // eg. "gs:///destination_path" - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function createBatchPredictionJobTextSentimentAnalysis() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - const modelName = `projects/${project}/locations/${location}/models/${modelId}`; - - const inputConfig = { - instancesFormat: 'jsonl', - gcsSource: {uris: [gcsSourceUri]}, - }; - const outputConfig = { - predictionsFormat: 'jsonl', - gcsDestination: {outputUriPrefix: gcsDestinationOutputUriPrefix}, - }; - const batchPredictionJob = { - displayName: batchPredictionDisplayName, - model: modelName, - inputConfig, - outputConfig, - }; - const request = { - parent, - batchPredictionJob, - }; - - // Create batch prediction job request - const [response] = await jobServiceClient.createBatchPredictionJob(request); - - console.log('Create batch prediction job text sentiment analysis response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createBatchPredictionJobTextSentimentAnalysis(); - // [END aiplatform_create_batch_prediction_job_text_sentiment_analysis_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-batch-prediction-job-video-action-recognition.js b/samples/create-batch-prediction-job-video-action-recognition.js deleted file mode 100644 index 37d5a50f..00000000 --- a/samples/create-batch-prediction-job-video-action-recognition.js +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -function main( - batchPredictionDisplayName, - modelId, - gcsSourceUri, - gcsDestinationOutputUriPrefix, - project, - location = 'us-central1' -) { - // [START aiplatform_create_batch_prediction_job_video_action_recognition_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const batchPredictionDisplayName = 'YOUR_BATCH_PREDICTION_DISPLAY_NAME'; - // const modelId = 'YOUR_MODEL_ID'; - // const gcsSourceUri = 'YOUR_GCS_SOURCE_URI'; - // const gcsDestinationOutputUriPrefix = 'YOUR_GCS_DEST_OUTPUT_URI_PREFIX'; - // eg. "gs:///destination_path" - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {params} = aiplatform.protos.google.cloud.aiplatform.v1.schema.predict; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function createBatchPredictionJobVideoActionRecognition() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - const modelName = `projects/${project}/locations/${location}/models/${modelId}`; - - // For more information on how to configure the model parameters object, see - // https://cloud.google.com/ai-platform-unified/docs/predictions/batch-predictions - const modelParamsObj = new params.VideoActionRecognitionPredictionParams({ - confidenceThreshold: 0.5, - }); - - const modelParameters = modelParamsObj.toValue(); - - const inputConfig = { - instancesFormat: 'jsonl', - gcsSource: {uris: [gcsSourceUri]}, - }; - const outputConfig = { - predictionsFormat: 'jsonl', - gcsDestination: {outputUriPrefix: gcsDestinationOutputUriPrefix}, - }; - const batchPredictionJob = { - displayName: batchPredictionDisplayName, - model: modelName, - modelParameters, - inputConfig, - outputConfig, - }; - const request = { - parent, - batchPredictionJob, - }; - - // Create batch prediction job request - const [response] = await jobServiceClient.createBatchPredictionJob(request); - - console.log( - 'Create batch prediction job video action recognition response' - ); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createBatchPredictionJobVideoActionRecognition(); - // [END aiplatform_create_batch_prediction_job_video_action_recognition_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-batch-prediction-job-video-classification.js b/samples/create-batch-prediction-job-video-classification.js deleted file mode 100644 index 6208ffb8..00000000 --- a/samples/create-batch-prediction-job-video-classification.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - batchPredictionDisplayName, - modelId, - gcsSourceUri, - gcsDestinationOutputUriPrefix, - project, - location = 'us-central1' -) { - // [START aiplatform_create_batch_prediction_job_video_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const batchPredictionDisplayName = 'YOUR_BATCH_PREDICTION_DISPLAY_NAME'; - // const modelId = 'YOUR_MODEL_ID'; - // const gcsSourceUri = 'YOUR_GCS_SOURCE_URI'; - // const gcsDestinationOutputUriPrefix = 'YOUR_GCS_DEST_OUTPUT_URI_PREFIX'; - // eg. "gs:///destination_path" - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {params} = aiplatform.protos.google.cloud.aiplatform.v1.schema.predict; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function createBatchPredictionJobVideoClassification() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - const modelName = `projects/${project}/locations/${location}/models/${modelId}`; - - // For more information on how to configure the model parameters object, see - // https://cloud.google.com/ai-platform-unified/docs/predictions/batch-predictions - const modelParamsObj = new params.VideoClassificationPredictionParams({ - confidenceThreshold: 0.5, - maxPredictions: 1000, - segmentClassification: true, - shotClassification: true, - oneSecIntervalClassification: true, - }); - - const modelParameters = modelParamsObj.toValue(); - - const inputConfig = { - instancesFormat: 'jsonl', - gcsSource: {uris: [gcsSourceUri]}, - }; - const outputConfig = { - predictionsFormat: 'jsonl', - gcsDestination: {outputUriPrefix: gcsDestinationOutputUriPrefix}, - }; - const batchPredictionJob = { - displayName: batchPredictionDisplayName, - model: modelName, - modelParameters, - inputConfig, - outputConfig, - }; - const request = { - parent, - batchPredictionJob, - }; - - // Create batch prediction job request - const [response] = await jobServiceClient.createBatchPredictionJob(request); - - console.log('Create batch prediction job video classification response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createBatchPredictionJobVideoClassification(); - // [END aiplatform_create_batch_prediction_job_video_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-batch-prediction-job-video-object-tracking.js b/samples/create-batch-prediction-job-video-object-tracking.js deleted file mode 100644 index 0e5b898e..00000000 --- a/samples/create-batch-prediction-job-video-object-tracking.js +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - batchPredictionDisplayName, - modelId, - gcsSourceUri, - gcsDestinationOutputUriPrefix, - project, - location = 'us-central1' -) { - // [START aiplatform_create_batch_prediction_job_video_object_tracking_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const batchPredictionDisplayName = 'YOUR_BATCH_PREDICTION_DISPLAY_NAME'; - // const modelId = 'YOUR_MODEL_ID'; - // const gcsSourceUri = 'YOUR_GCS_SOURCE_URI'; - // const gcsDestinationOutputUriPrefix = 'YOUR_GCS_DEST_OUTPUT_URI_PREFIX'; - // eg. "gs:///destination_path" - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {params} = aiplatform.protos.google.cloud.aiplatform.v1.schema.predict; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function createBatchPredictionJobVideoObjectTracking() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - const modelName = `projects/${project}/locations/${location}/models/${modelId}`; - - // For more information on how to configure the model parameters object, see - // https://cloud.google.com/ai-platform-unified/docs/predictions/batch-predictions - const modelParamsObj = new params.VideoObjectTrackingPredictionParams({ - confidenceThreshold: 0.5, - }); - - const modelParameters = modelParamsObj.toValue(); - - const inputConfig = { - instancesFormat: 'jsonl', - gcsSource: {uris: [gcsSourceUri]}, - }; - const outputConfig = { - predictionsFormat: 'jsonl', - gcsDestination: {outputUriPrefix: gcsDestinationOutputUriPrefix}, - }; - const batchPredictionJob = { - displayName: batchPredictionDisplayName, - model: modelName, - modelParameters, - inputConfig, - outputConfig, - }; - const request = { - parent, - batchPredictionJob, - }; - - // Create batch prediction job request - const [response] = await jobServiceClient.createBatchPredictionJob(request); - - console.log('Create batch prediction job video object tracking response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createBatchPredictionJobVideoObjectTracking(); - // [END aiplatform_create_batch_prediction_job_video_object_tracking_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-custom-job.js b/samples/create-custom-job.js deleted file mode 100644 index cae36902..00000000 --- a/samples/create-custom-job.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - customJobDisplayName, - containerImageUri, - project, - location = 'us-central1' -) { - // [START aiplatform_create_custom_job_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const customJobDisplayName = 'YOUR_CUSTOM_JOB_DISPLAY_NAME'; - // const containerImageUri = 'YOUR_CONTAINER_IMAGE_URI'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function createCustomJob() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - const customJob = { - displayName: customJobDisplayName, - jobSpec: { - workerPoolSpecs: [ - { - machineSpec: { - machineType: 'n1-standard-4', - acceleratorType: 'NVIDIA_TESLA_K80', - acceleratorCount: 1, - }, - replicaCount: 1, - containerSpec: { - imageUri: containerImageUri, - command: [], - args: [], - }, - }, - ], - }, - }; - const request = {parent, customJob}; - - // Create custom job request - const [response] = await jobServiceClient.createCustomJob(request); - - console.log('Create custom job response:\n', JSON.stringify(response)); - } - createCustomJob(); - // [END aiplatform_create_custom_job_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-dataset-image.js b/samples/create-dataset-image.js deleted file mode 100644 index 03353518..00000000 --- a/samples/create-dataset-image.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(datasetDisplayName, project, location = 'us-central1') { - // [START aiplatform_create_dataset_image_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetDisplayName = "YOUR_DATASTE_DISPLAY_NAME"; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function createDatasetImage() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - // Configure the dataset resource - const dataset = { - displayName: datasetDisplayName, - metadataSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml', - }; - const request = { - parent, - dataset, - }; - - // Create Dataset Request - const [response] = await datasetServiceClient.createDataset(request); - console.log(`Long running operation: ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Create dataset image response'); - console.log(`Name : ${result.name}`); - console.log(`Display name : ${result.displayName}`); - console.log(`Metadata schema uri : ${result.metadataSchemaUri}`); - console.log(`Metadata : ${JSON.stringify(result.metadata)}`); - console.log(`Labels : ${JSON.stringify(result.labels)}`); - } - createDatasetImage(); - // [END aiplatform_create_dataset_image_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-dataset-tabular-bigquery.js b/samples/create-dataset-tabular-bigquery.js deleted file mode 100644 index a68b3b83..00000000 --- a/samples/create-dataset-tabular-bigquery.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetDisplayName, - bigquerySourceUri, - project, - location = 'us-central1' -) { - // [START aiplatform_create_dataset_tabular_bigquery_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetDisplayName = 'YOUR_DATASET_DISPLAY_NAME'; - // const bigquerySourceUri = 'YOUR_BIGQUERY_SOURCE_URI'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function createDatasetTabularBigquery() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - const metadata = { - structValue: { - fields: { - inputConfig: { - structValue: { - fields: { - bigquerySource: { - structValue: { - fields: { - uri: { - listValue: { - values: [{stringValue: bigquerySourceUri}], - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }; - // Configure the dataset resource - const dataset = { - displayName: datasetDisplayName, - metadataSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/metadata/tabular_1.0.0.yaml', - metadata: metadata, - }; - const request = { - parent, - dataset, - }; - - // Create dataset request - const [response] = await datasetServiceClient.createDataset(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Create dataset tabular bigquery response'); - console.log(`\tName : ${result.name}`); - console.log(`\tDisplay name : ${result.displayName}`); - console.log(`\tMetadata schema uri : ${result.metadataSchemaUri}`); - console.log(`\tMetadata : ${JSON.stringify(result.metadata)}`); - } - createDatasetTabularBigquery(); - // [END aiplatform_create_dataset_tabular_bigquery_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-dataset-tabular-gcs.js b/samples/create-dataset-tabular-gcs.js deleted file mode 100644 index 34dd8bf3..00000000 --- a/samples/create-dataset-tabular-gcs.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetDisplayName, - gcsSourceUri, - project, - location = 'us-central1' -) { - // [START aiplatform_create_dataset_tabular_gcs_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetDisplayName = 'YOUR_DATASET_DISPLAY_NAME'; - // const gcsSourceUri = 'YOUR_GCS_SOURCE_URI'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function createDatasetTabularGcs() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - const metadata = { - structValue: { - fields: { - inputConfig: { - structValue: { - fields: { - gcsSource: { - structValue: { - fields: { - uri: { - listValue: { - values: [{stringValue: gcsSourceUri}], - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }; - // Configure the dataset resource - const dataset = { - displayName: datasetDisplayName, - metadataSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/metadata/tabular_1.0.0.yaml', - metadata: metadata, - }; - const request = { - parent, - dataset, - }; - - // Create dataset request - const [response] = await datasetServiceClient.createDataset(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Create dataset tabular gcs response'); - console.log(`\tName : ${result.name}`); - console.log(`\tDisplay name : ${result.displayName}`); - console.log(`\tMetadata schema uri : ${result.metadataSchemaUri}`); - console.log(`\tMetadata : ${JSON.stringify(result.metadata)}`); - } - createDatasetTabularGcs(); - // [END aiplatform_create_dataset_tabular_gcs_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-dataset-text.js b/samples/create-dataset-text.js deleted file mode 100644 index 93b99be7..00000000 --- a/samples/create-dataset-text.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(datasetDisplayName, project, location = 'us-central1') { - // [START aiplatform_create_dataset_text_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetDisplayName = "YOUR_DATASTE_DISPLAY_NAME"; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function createDatasetText() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - // Configure the dataset resource - const dataset = { - displayName: datasetDisplayName, - metadataSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/metadata/text_1.0.0.yaml', - }; - const request = { - parent, - dataset, - }; - - // Create Dataset Request - const [response] = await datasetServiceClient.createDataset(request); - console.log(`Long running operation: ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Create dataset text response'); - console.log(`Name : ${result.name}`); - console.log(`Display name : ${result.displayName}`); - console.log(`Metadata schema uri : ${result.metadataSchemaUri}`); - console.log(`Metadata : ${JSON.stringify(result.metadata)}`); - console.log(`Labels : ${JSON.stringify(result.labels)}`); - } - createDatasetText(); - // [END aiplatform_create_dataset_text_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-dataset-video.js b/samples/create-dataset-video.js deleted file mode 100644 index 04c6c2e7..00000000 --- a/samples/create-dataset-video.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(datasetDisplayName, project, location = 'us-central1') { - // [START aiplatform_create_dataset_video_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetDisplayName = "YOUR_DATASTE_DISPLAY_NAME"; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function createDatasetVideo() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - // Configure the dataset resource - const dataset = { - displayName: datasetDisplayName, - metadataSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/metadata/video_1.0.0.yaml', - }; - const request = { - parent, - dataset, - }; - - // Create Dataset Request - const [response] = await datasetServiceClient.createDataset(request); - console.log(`Long running operation: ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Create dataset video response'); - console.log(`Name : ${result.name}`); - console.log(`Display name : ${result.displayName}`); - console.log(`Metadata schema uri : ${result.metadataSchemaUri}`); - console.log(`Metadata : ${JSON.stringify(result.metadata)}`); - console.log(`Labels : ${JSON.stringify(result.labels)}`); - } - createDatasetVideo(); - // [END aiplatform_create_dataset_video_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-dataset.js b/samples/create-dataset.js deleted file mode 100644 index bf87a34f..00000000 --- a/samples/create-dataset.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetDisplayName, - metadataSchemaUri, - project, - location = 'us-central1' -) { - // [START aiplatform_create_dataset_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetDisplayName = 'YOUR_DATASET_DISPLAY_NAME'; - // const metadataSchemaUri = 'YOUR_METADATA_SCHEMA_URI'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function createDataset() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - // Configure the dataset resource - const dataset = { - displayName: datasetDisplayName, - metadataSchemaUri: metadataSchemaUri, - }; - const request = { - parent, - dataset, - }; - - // Create Dataset Request - const [response] = await datasetServiceClient.createDataset(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - const [createDatasetResponse] = await response.promise(); - - console.log('Create dataset response'); - console.log(`\tName : ${createDatasetResponse.name}`); - console.log(`\tDisplay name : ${createDatasetResponse.displayName}`); - console.log( - `\tMetadata schema uri : ${createDatasetResponse.metadataSchemaUri}` - ); - console.log( - `\tMetadata : ${JSON.stringify(createDatasetResponse.metadata)}` - ); - console.log(`\tCreate time : ${createDatasetResponse.createTime}`); - console.log(`\tUpdate time : ${createDatasetResponse.updateTime}`); - console.log(`\tLabels : ${JSON.stringify(createDatasetResponse.labels)}`); - } - createDataset(); - // [END aiplatform_create_dataset_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-endpoint.js b/samples/create-endpoint.js deleted file mode 100644 index 1a1abbad..00000000 --- a/samples/create-endpoint.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(endpointDisplayName, project, location = 'us-central1') { - // [START aiplatform_create_endpoint_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const endpointDisplayName = 'YOUR_ENDPOINT_DISPLAY_NAME'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Endpoint Service Client library - const {EndpointServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const endpointServiceClient = new EndpointServiceClient(clientOptions); - - async function createEndpoint() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - const endpoint = { - displayName: endpointDisplayName, - }; - const request = { - parent, - endpoint, - }; - - // Get and print out a list of all the endpoints for this resource - const [response] = await endpointServiceClient.createEndpoint(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Create endpoint response'); - console.log(`\tName : ${result.name}`); - console.log(`\tDisplay name : ${result.displayName}`); - console.log(`\tDescription : ${result.description}`); - console.log(`\tLabels : ${JSON.stringify(result.labels)}`); - console.log(`\tCreate time : ${JSON.stringify(result.createTime)}`); - console.log(`\tUpdate time : ${JSON.stringify(result.updateTime)}`); - } - createEndpoint(); - // [END aiplatform_create_endpoint_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-entity-type-monitoring-sample.js b/samples/create-entity-type-monitoring-sample.js deleted file mode 100644 index d2444847..00000000 --- a/samples/create-entity-type-monitoring-sample.js +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Creates a new EntityType with monitoring configuration in a given Featurestore. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - description, - duration = 86400, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_create_entity_type_monitoring_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const description = 'YOUR_ENTITY_TYPE_DESCRIPTION'; - // const duration = ; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = - require('@google-cloud/aiplatform').v1beta1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function createEntityTypeMonitoring() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const entityType = { - description: description, - monitoringConfig: { - snapshotAnalysis: { - monitoringInterval: { - seconds: Number(duration), - }, - }, - }, - }; - - const request = { - parent: parent, - entityTypeId: entityTypeId, - entityType: entityType, - }; - - // Create EntityType request - const [operation] = await featurestoreServiceClient.createEntityType( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Create entity type monitoring response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createEntityTypeMonitoring(); - // [END aiplatform_create_entity_type_monitoring_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-entity-type-sample.js b/samples/create-entity-type-sample.js deleted file mode 100644 index fe867db2..00000000 --- a/samples/create-entity-type-sample.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Creates a new EntityType in a given Featurestore. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - description, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_create_entity_type_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const description = 'YOUR_ENTITY_TYPE_DESCRIPTION'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function createEntityType() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const entityType = { - description: description, - }; - - const request = { - parent: parent, - entityTypeId: entityTypeId, - entityType: entityType, - }; - - // Create EntityType request - const [operation] = await featurestoreServiceClient.createEntityType( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Create entity type response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createEntityType(); - // [END aiplatform_create_entity_type_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-feature-sample.js b/samples/create-feature-sample.js deleted file mode 100644 index e637f890..00000000 --- a/samples/create-feature-sample.js +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Creates a new Feature in a given EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - featureId, - valueType, - description, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_create_feature_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const featureId = 'YOUR_FEATURE_ID'; - // const valueType = 'FEATURE_VALUE_DATA_TYPE'; - // const description = 'YOUR_ENTITY_TYPE_DESCRIPTION'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function createFeature() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const feature = { - valueType: valueType, - description: description, - }; - - const request = { - parent: parent, - feature: feature, - featureId: featureId, - }; - - // Create Feature request - const [operation] = await featurestoreServiceClient.createFeature(request, { - timeout: Number(timeout), - }); - const [response] = await operation.promise(); - - console.log('Create feature response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createFeature(); - // [END aiplatform_create_feature_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-featurestore-fixed-nodes-sample.js b/samples/create-featurestore-fixed-nodes-sample.js deleted file mode 100644 index 6fcd87be..00000000 --- a/samples/create-featurestore-fixed-nodes-sample.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Creates a new Featurestore with fixed nodes configuration in a given project and location. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - fixedNodeCount = 1, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 900000 -) { - // [START aiplatform_create_featurestore_fixed_nodes_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const fixedNodeCount = ; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function createFeaturestoreFixedNodes() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const featurestore = { - onlineServingConfig: {fixedNodeCount: Number(fixedNodeCount)}, - }; - - const request = { - parent: parent, - featurestore: featurestore, - featurestoreId: featurestoreId, - }; - - // Create Featurestore request - const [operation] = await featurestoreServiceClient.createFeaturestore( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Create featurestore fixed nodes response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createFeaturestoreFixedNodes(); - // [END aiplatform_create_featurestore_fixed_nodes_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-featurestore-sample.js b/samples/create-featurestore-sample.js deleted file mode 100644 index a4933a54..00000000 --- a/samples/create-featurestore-sample.js +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Creates a new Featurestore in a given project and location. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - minNodeCount = 1, - maxNodeCount = 5, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 900000 -) { - // [START aiplatform_create_featurestore_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const minNodeCount = ; - // const maxNodeCount = ; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = - require('@google-cloud/aiplatform').v1beta1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function createFeaturestore() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const featurestore = { - onlineServingConfig: { - scaling: { - minNodeCount: minNodeCount, - maxNodeCount: maxNodeCount, - }, - }, - }; - - const request = { - parent: parent, - featurestore: featurestore, - featurestoreId: featurestoreId, - }; - - // Create Featurestore request - const [operation] = await featurestoreServiceClient.createFeaturestore( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Create featurestore response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createFeaturestore(); - // [END aiplatform_create_featurestore_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-hyperparameter-tuning-job.js b/samples/create-hyperparameter-tuning-job.js deleted file mode 100644 index d6803a57..00000000 --- a/samples/create-hyperparameter-tuning-job.js +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -function main( - displayName, - containerImageUri, - project, - location = 'us-central1' -) { - // [START aiplatform_create_hyperparameter_tuning_job_sample] - /** - * TODO(developer): Uncomment these variables before running the sample. - * (Not necessary if passing values as arguments) - */ - /* - const displayName = 'YOUR HYPERPARAMETER TUNING JOB; - const containerImageUri = 'TUNING JOB CONTAINER URI; - const project = 'YOUR PROJECT ID'; - const location = 'us-central1'; - */ - // Imports the Google Cloud Pipeline Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function createHyperParameterTuningJob() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - // Create the hyperparameter tuning job configuration - const hyperparameterTuningJob = { - displayName, - maxTrialCount: 2, - parallelTrialCount: 1, - maxFailedTrialCount: 1, - studySpec: { - metrics: [ - { - metricId: 'accuracy', - goal: 'MAXIMIZE', - }, - ], - parameters: [ - { - parameterId: 'lr', - doubleValueSpec: { - minValue: 0.001, - maxValue: 0.1, - }, - }, - ], - }, - trialJobSpec: { - workerPoolSpecs: [ - { - machineSpec: { - machineType: 'n1-standard-4', - acceleratorType: 'NVIDIA_TESLA_K80', - acceleratorCount: 1, - }, - replicaCount: 1, - containerSpec: { - imageUri: containerImageUri, - command: [], - args: [], - }, - }, - ], - }, - }; - - const [response] = await jobServiceClient.createHyperparameterTuningJob({ - parent, - hyperparameterTuningJob, - }); - - console.log('Create hyperparameter tuning job response:'); - console.log(`\tDisplay name: ${response.displayName}`); - console.log(`\tTuning job resource name: ${response.name}`); - console.log(`\tJob status: ${response.state}`); - } - - createHyperParameterTuningJob(); - // [END aiplatform_create_hyperparameter_tuning_job_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-training-pipeline-image-classification.js b/samples/create-training-pipeline-image-classification.js deleted file mode 100644 index bca7efde..00000000 --- a/samples/create-training-pipeline-image-classification.js +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -function main( - datasetId, - modelDisplayName, - trainingPipelineDisplayName, - project, - location = 'us-central1' -) { - // [START aiplatform_create_training_pipeline_image_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample. - * (Not necessary if passing values as arguments) - */ - /* - const datasetId = 'YOUR DATASET'; - const modelDisplayName = 'NEW MODEL NAME; - const trainingPipelineDisplayName = 'NAME FOR TRAINING PIPELINE'; - const project = 'YOUR PROJECT ID'; - const location = 'us-central1'; - */ - // Imports the Google Cloud Pipeline Service Client library - const aiplatform = require('@google-cloud/aiplatform'); - - const {definition} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.trainingjob; - const ModelType = definition.AutoMlImageClassificationInputs.ModelType; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const {PipelineServiceClient} = aiplatform.v1; - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function createTrainingPipelineImageClassification() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - // Values should match the input expected by your model. - const trainingTaskInputsMessage = - new definition.AutoMlImageClassificationInputs({ - multiLabel: true, - modelType: ModelType.CLOUD, - budgetMilliNodeHours: 8000, - disableEarlyStopping: false, - }); - - const trainingTaskInputs = trainingTaskInputsMessage.toValue(); - - const trainingTaskDefinition = - 'gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_image_classification_1.0.0.yaml'; - - const modelToUpload = {displayName: modelDisplayName}; - const inputDataConfig = {datasetId}; - const trainingPipeline = { - displayName: trainingPipelineDisplayName, - trainingTaskDefinition, - trainingTaskInputs, - inputDataConfig, - modelToUpload, - }; - const request = {parent, trainingPipeline}; - - // Create training pipeline request - const [response] = await pipelineServiceClient.createTrainingPipeline( - request - ); - - console.log('Create training pipeline image classification response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - - createTrainingPipelineImageClassification(); - // [END aiplatform_create_training_pipeline_image_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-training-pipeline-image-object-detection.js b/samples/create-training-pipeline-image-object-detection.js deleted file mode 100644 index 207fa719..00000000 --- a/samples/create-training-pipeline-image-object-detection.js +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - modelDisplayName, - trainingPipelineDisplayName, - project, - location = 'us-central1' -) { - // [START aiplatform_create_training_pipeline_image_object_detection_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const modelDisplayName = 'YOUR_MODEL_DISPLAY_NAME'; - // const trainingPipelineDisplayName = 'YOUR_TRAINING_PIPELINE_DISPLAY_NAME'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - const aiplatform = require('@google-cloud/aiplatform'); - const {definition} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.trainingjob; - const ModelType = definition.AutoMlImageObjectDetectionInputs.ModelType; - - // Imports the Google Cloud Pipeline Service Client library - const {PipelineServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function createTrainingPipelineImageObjectDetection() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const trainingTaskInputsObj = - new definition.AutoMlImageObjectDetectionInputs({ - disableEarlyStopping: false, - modelType: ModelType.CLOUD_HIGH_ACCURACY_1, - budgetMilliNodeHours: 20000, - }); - - const trainingTaskInputs = trainingTaskInputsObj.toValue(); - const modelToUpload = {displayName: modelDisplayName}; - const inputDataConfig = {datasetId: datasetId}; - const trainingPipeline = { - displayName: trainingPipelineDisplayName, - trainingTaskDefinition: - 'gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_image_object_detection_1.0.0.yaml', - trainingTaskInputs, - inputDataConfig, - modelToUpload, - }; - const request = { - parent, - trainingPipeline, - }; - - // Create training pipeline request - const [response] = await pipelineServiceClient.createTrainingPipeline( - request - ); - - console.log('Create training pipeline image object detection response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createTrainingPipelineImageObjectDetection(); - // [END aiplatform_create_training_pipeline_image_object_detection_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-training-pipeline-tabular-classification.js b/samples/create-training-pipeline-tabular-classification.js deleted file mode 100644 index 16500b61..00000000 --- a/samples/create-training-pipeline-tabular-classification.js +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - modelDisplayName, - trainingPipelineDisplayName, - targetColumn, - project, - location = 'us-central1' -) { - // [START aiplatform_create_training_pipeline_tabular_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const modelDisplayName = 'YOUR_MODEL_DISPLAY_NAME'; - // const trainingPipelineDisplayName = 'YOUR_TRAINING_PIPELINE_DISPLAY_NAME'; - // const targetColumn = 'YOUR_TARGET_COLUMN'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {definition} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.trainingjob; - - // Imports the Google Cloud Pipeline Service Client library - const {PipelineServiceClient} = aiplatform.v1; - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function createTrainingPipelineTablesClassification() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const transformations = [ - {auto: {column_name: 'sepal_width'}}, - {auto: {column_name: 'sepal_length'}}, - {auto: {column_name: 'petal_length'}}, - {auto: {column_name: 'petal_width'}}, - ]; - const trainingTaskInputsObj = new definition.AutoMlTablesInputs({ - targetColumn: targetColumn, - predictionType: 'classification', - transformations: transformations, - trainBudgetMilliNodeHours: 8000, - disableEarlyStopping: false, - optimizationObjective: 'minimize-log-loss', - }); - const trainingTaskInputs = trainingTaskInputsObj.toValue(); - - const modelToUpload = {displayName: modelDisplayName}; - const inputDataConfig = { - datasetId: datasetId, - fractionSplit: { - trainingFraction: 0.8, - validationFraction: 0.1, - testFraction: 0.1, - }, - }; - const trainingPipeline = { - displayName: trainingPipelineDisplayName, - trainingTaskDefinition: - 'gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_tables_1.0.0.yaml', - trainingTaskInputs, - inputDataConfig, - modelToUpload, - }; - const request = { - parent, - trainingPipeline, - }; - - // Create training pipeline request - const [response] = await pipelineServiceClient.createTrainingPipeline( - request - ); - - console.log('Create training pipeline tabular classification response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createTrainingPipelineTablesClassification(); - // [END aiplatform_create_training_pipeline_tabular_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-training-pipeline-tabular-regression.js b/samples/create-training-pipeline-tabular-regression.js deleted file mode 100644 index 368cc717..00000000 --- a/samples/create-training-pipeline-tabular-regression.js +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - modelDisplayName, - trainingPipelineDisplayName, - targetColumn, - project, - location = 'us-central1' -) { - // [START aiplatform_create_training_pipeline_tabular_regression_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const modelDisplayName = 'YOUR_MODEL_DISPLAY_NAME'; - // const trainingPipelineDisplayName = 'YOUR_TRAINING_PIPELINE_DISPLAY_NAME'; - // const targetColumn = 'YOUR_TARGET_COLUMN'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {definition} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.trainingjob; - - // Imports the Google Cloud Pipeline Service Client library - const {PipelineServiceClient} = aiplatform.v1; - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function createTrainingPipelineTablesRegression() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const transformations = [ - {auto: {column_name: 'STRING_5000unique_NULLABLE'}}, - {auto: {column_name: 'INTEGER_5000unique_NULLABLE'}}, - {auto: {column_name: 'FLOAT_5000unique_NULLABLE'}}, - {auto: {column_name: 'FLOAT_5000unique_REPEATED'}}, - {auto: {column_name: 'NUMERIC_5000unique_NULLABLE'}}, - {auto: {column_name: 'BOOLEAN_2unique_NULLABLE'}}, - { - timestamp: { - column_name: 'TIMESTAMP_1unique_NULLABLE', - invalid_values_allowed: true, - }, - }, - {auto: {column_name: 'DATE_1unique_NULLABLE'}}, - {auto: {column_name: 'TIME_1unique_NULLABLE'}}, - { - timestamp: { - column_name: 'DATETIME_1unique_NULLABLE', - invalid_values_allowed: true, - }, - }, - {auto: {column_name: 'STRUCT_NULLABLE.STRING_5000unique_NULLABLE'}}, - {auto: {column_name: 'STRUCT_NULLABLE.INTEGER_5000unique_NULLABLE'}}, - {auto: {column_name: 'STRUCT_NULLABLE.FLOAT_5000unique_NULLABLE'}}, - {auto: {column_name: 'STRUCT_NULLABLE.FLOAT_5000unique_REQUIRED'}}, - {auto: {column_name: 'STRUCT_NULLABLE.FLOAT_5000unique_REPEATED'}}, - {auto: {column_name: 'STRUCT_NULLABLE.NUMERIC_5000unique_NULLABLE'}}, - {auto: {column_name: 'STRUCT_NULLABLE.BOOLEAN_2unique_NULLABLE'}}, - {auto: {column_name: 'STRUCT_NULLABLE.TIMESTAMP_1unique_NULLABLE'}}, - ]; - - const trainingTaskInputsObj = new definition.AutoMlTablesInputs({ - transformations, - targetColumn, - predictionType: 'regression', - trainBudgetMilliNodeHours: 8000, - disableEarlyStopping: false, - optimizationObjective: 'minimize-rmse', - }); - const trainingTaskInputs = trainingTaskInputsObj.toValue(); - - const modelToUpload = {displayName: modelDisplayName}; - const inputDataConfig = { - datasetId: datasetId, - fractionSplit: { - trainingFraction: 0.8, - validationFraction: 0.1, - testFraction: 0.1, - }, - }; - const trainingPipeline = { - displayName: trainingPipelineDisplayName, - trainingTaskDefinition: - 'gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_tables_1.0.0.yaml', - trainingTaskInputs, - inputDataConfig, - modelToUpload, - }; - const request = { - parent, - trainingPipeline, - }; - - // Create training pipeline request - const [response] = await pipelineServiceClient.createTrainingPipeline( - request - ); - - console.log('Create training pipeline tabular regression response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createTrainingPipelineTablesRegression(); - // [END aiplatform_create_training_pipeline_tabular_regression_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-training-pipeline-text-classification.js b/samples/create-training-pipeline-text-classification.js deleted file mode 100644 index b453091f..00000000 --- a/samples/create-training-pipeline-text-classification.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - modelDisplayName, - trainingPipelineDisplayName, - project, - location = 'us-central1' -) { - // [START aiplatform_create_training_pipeline_text_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const modelDisplayName = 'YOUR_MODEL_DISPLAY_NAME'; - // const trainingPipelineDisplayName = 'YOUR_TRAINING_PIPELINE_DISPLAY_NAME'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {definition} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.trainingjob; - - // Imports the Google Cloud Pipeline Service Client library - const {PipelineServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function createTrainingPipelineTextClassification() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const trainingTaskInputObj = new definition.AutoMlTextClassificationInputs({ - multiLabel: false, - }); - const trainingTaskInputs = trainingTaskInputObj.toValue(); - - const modelToUpload = {displayName: modelDisplayName}; - const inputDataConfig = {datasetId: datasetId}; - const trainingPipeline = { - displayName: trainingPipelineDisplayName, - trainingTaskDefinition: - 'gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_text_classification_1.0.0.yaml', - trainingTaskInputs, - inputDataConfig, - modelToUpload, - }; - const request = { - parent, - trainingPipeline, - }; - - // Create training pipeline request - const [response] = await pipelineServiceClient.createTrainingPipeline( - request - ); - - console.log('Create training pipeline text classification response :'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createTrainingPipelineTextClassification(); - // [END aiplatform_create_training_pipeline_text_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-training-pipeline-text-entity-extraction.js b/samples/create-training-pipeline-text-entity-extraction.js deleted file mode 100644 index 5c84e6cc..00000000 --- a/samples/create-training-pipeline-text-entity-extraction.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - modelDisplayName, - trainingPipelineDisplayName, - project, - location = 'us-central1' -) { - // [START aiplatform_create_training_pipeline_text_entity_extraction_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const modelDisplayName = 'YOUR_MODEL_DISPLAY_NAME'; - // const trainingPipelineDisplayName = 'YOUR_TRAINING_PIPELINE_DISPLAY_NAME'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {definition} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.trainingjob; - - // Imports the Google Cloud Pipeline Service Client library - const {PipelineServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function createTrainingPipelineTextEntityExtraction() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const trainingTaskInputObj = new definition.AutoMlTextExtractionInputs({}); - const trainingTaskInputs = trainingTaskInputObj.toValue(); - - const modelToUpload = {displayName: modelDisplayName}; - const inputDataConfig = {datasetId: datasetId}; - const trainingPipeline = { - displayName: trainingPipelineDisplayName, - trainingTaskDefinition: - 'gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_text_extraction_1.0.0.yaml', - trainingTaskInputs, - inputDataConfig, - modelToUpload, - }; - const request = { - parent, - trainingPipeline, - }; - - // Create training pipeline request - const [response] = await pipelineServiceClient.createTrainingPipeline( - request - ); - - console.log('Create training pipeline text entity extraction response :'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createTrainingPipelineTextEntityExtraction(); - // [END aiplatform_create_training_pipeline_text_entity_extraction_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-training-pipeline-text-sentiment-analysis.js b/samples/create-training-pipeline-text-sentiment-analysis.js deleted file mode 100644 index a2f6ac54..00000000 --- a/samples/create-training-pipeline-text-sentiment-analysis.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - modelDisplayName, - trainingPipelineDisplayName, - project, - location = 'us-central1' -) { - // [START aiplatform_create_training_pipeline_text_sentiment_analysis_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const modelDisplayName = 'YOUR_MODEL_DISPLAY_NAME'; - // const trainingPipelineDisplayName = 'YOUR_TRAINING_PIPELINE_DISPLAY_NAME'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {definition} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.trainingjob; - - // Imports the Google Cloud Pipeline Service Client library - const {PipelineServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function createTrainingPipelineTextSentimentAnalysis() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const trainingTaskInputObj = new definition.AutoMlTextSentimentInputs({ - sentimentMax: 4, - }); - const trainingTaskInputs = trainingTaskInputObj.toValue(); - - const modelToUpload = {displayName: modelDisplayName}; - const inputDataConfig = {datasetId: datasetId}; - const trainingPipeline = { - displayName: trainingPipelineDisplayName, - trainingTaskDefinition: - 'gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_text_sentiment_1.0.0.yaml', - trainingTaskInputs, - inputDataConfig, - modelToUpload, - }; - const request = { - parent, - trainingPipeline, - }; - - // Create training pipeline request - const [response] = await pipelineServiceClient.createTrainingPipeline( - request - ); - - console.log('Create training pipeline text sentiment analysis response :'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createTrainingPipelineTextSentimentAnalysis(); - // [END aiplatform_create_training_pipeline_text_sentiment_analysis_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-training-pipeline-video-action-recognition.js b/samples/create-training-pipeline-video-action-recognition.js deleted file mode 100644 index d53f4aa1..00000000 --- a/samples/create-training-pipeline-video-action-recognition.js +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - modelDisplayName, - trainingPipelineDisplayName, - project, - location = 'us-central1' -) { - // [START aiplatform_create_training_pipeline_video_action_recognition_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const modelDisplayName = 'YOUR_MODEL_DISPLAY_NAME'; - // const trainingPipelineDisplayName = 'YOUR_TRAINING_PIPELINE_DISPLAY_NAME'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {definition} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.trainingjob; - - // Imports the Google Cloud Pipeline Service Client library - const {PipelineServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function createTrainingPipelineVideoActionRecognition() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - // Values should match the input expected by your model. - const trainingTaskInputObj = - new definition.AutoMlVideoActionRecognitionInputs({ - // modelType can be either 'CLOUD' or 'MOBILE_VERSATILE_1' - modelType: 'CLOUD', - }); - const trainingTaskInputs = trainingTaskInputObj.toValue(); - - const modelToUpload = {displayName: modelDisplayName}; - const inputDataConfig = {datasetId: datasetId}; - const trainingPipeline = { - displayName: trainingPipelineDisplayName, - trainingTaskDefinition: - 'gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_video_action_recognition_1.0.0.yaml', - trainingTaskInputs, - inputDataConfig, - modelToUpload, - }; - const request = { - parent, - trainingPipeline, - }; - - // Create training pipeline request - const [response] = await pipelineServiceClient.createTrainingPipeline( - request - ); - - console.log('Create training pipeline video action recognition response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createTrainingPipelineVideoActionRecognition(); - // [END aiplatform_create_training_pipeline_video_action_recognition_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-training-pipeline-video-classification.js b/samples/create-training-pipeline-video-classification.js deleted file mode 100644 index 8c3bf977..00000000 --- a/samples/create-training-pipeline-video-classification.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - modelDisplayName, - trainingPipelineDisplayName, - project, - location = 'us-central1' -) { - // [START aiplatform_create_training_pipeline_video_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const modelDisplayName = 'YOUR_MODEL_DISPLAY_NAME'; - // const trainingPipelineDisplayName = 'YOUR_TRAINING_PIPELINE_DISPLAY_NAME'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {definition} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.trainingjob; - - // Imports the Google Cloud Pipeline Service Client library - const {PipelineServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function createTrainingPipelineVideoClassification() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - // Values should match the input expected by your model. - const trainingTaskInputObj = new definition.AutoMlVideoClassificationInputs( - {} - ); - const trainingTaskInputs = trainingTaskInputObj.toValue(); - - const modelToUpload = {displayName: modelDisplayName}; - const inputDataConfig = {datasetId: datasetId}; - const trainingPipeline = { - displayName: trainingPipelineDisplayName, - trainingTaskDefinition: - 'gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_video_classification_1.0.0.yaml', - trainingTaskInputs, - inputDataConfig, - modelToUpload, - }; - const request = { - parent, - trainingPipeline, - }; - - // Create training pipeline request - const [response] = await pipelineServiceClient.createTrainingPipeline( - request - ); - - console.log('Create training pipeline video classification response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createTrainingPipelineVideoClassification(); - // [END aiplatform_create_training_pipeline_video_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/create-training-pipeline-video-object-tracking.js b/samples/create-training-pipeline-video-object-tracking.js deleted file mode 100644 index 5a8cef88..00000000 --- a/samples/create-training-pipeline-video-object-tracking.js +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - modelDisplayName, - trainingPipelineDisplayName, - project, - location = 'us-central1' -) { - // [START aiplatform_create_training_pipeline_video_object_tracking_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const modelDisplayName = 'YOUR_MODEL_DISPLAY_NAME'; - // const trainingPipelineDisplayName = 'YOUR_TRAINING_PIPELINE_DISPLAY_NAME'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {definition} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.trainingjob; - const ModelType = definition.AutoMlVideoObjectTrackingInputs.ModelType; - - // Imports the Google Cloud Pipeline Service Client library - const {PipelineServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function createTrainingPipelineVideoObjectTracking() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const trainingTaskInputsObj = - new definition.AutoMlVideoObjectTrackingInputs({ - modelType: ModelType.CLOUD, - }); - const trainingTaskInputs = trainingTaskInputsObj.toValue(); - - const modelToUpload = {displayName: modelDisplayName}; - const inputDataConfig = {datasetId: datasetId}; - const trainingPipeline = { - displayName: trainingPipelineDisplayName, - trainingTaskDefinition: - 'gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_video_object_tracking_1.0.0.yaml', - trainingTaskInputs, - inputDataConfig, - modelToUpload, - }; - const request = { - parent, - trainingPipeline, - }; - - // Create training pipeline request - const [response] = await pipelineServiceClient.createTrainingPipeline( - request - ); - - console.log('Create training pipeline video object tracking response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - createTrainingPipelineVideoObjectTracking(); - // [END aiplatform_create_training_pipeline_video_object_tracking_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/delete-batch-prediction-job.js b/samples/delete-batch-prediction-job.js deleted file mode 100644 index 1616485c..00000000 --- a/samples/delete-batch-prediction-job.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(batchPredictionJobId, project, location = 'us-central1') { - // [START aiplatform_delete_batch_prediction_job_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const batchPredictionJobId = 'YOUR_BATCH_PREDICTION_JOB_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function deleteBatchPredictionJob() { - // Configure the parent resource - const name = `projects/${project}/locations/${location}/batchPredictionJobs/${batchPredictionJobId}`; - const request = { - name, - }; - - // Get and print out a list of all the endpoints for this resource - await jobServiceClient.deleteBatchPredictionJob(request); - - console.log('Delete batch prediction job response :'); - } - deleteBatchPredictionJob(); - // [END aiplatform_delete_batch_prediction_job_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/delete-custom-job.js b/samples/delete-custom-job.js deleted file mode 100644 index c3a0cf6e..00000000 --- a/samples/delete-custom-job.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(customJobId, project, location = 'us-central1') { - // [START aiplatform_delete_custom_job_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const customJobId = 'YOUR_CUSTOM_JOB_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function deleteCustomJob() { - // Configure the name resource - const name = jobServiceClient.customJobPath(project, location, customJobId); - const request = { - name, - }; - - // Delete custom job request - const [response] = await jobServiceClient.deleteCustomJob(request); - - console.log('Delete custom job response:\n', response); - } - setTimeout(deleteCustomJob, 60000); - // [END aiplatform_delete_custom_job_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/delete-dataset.js b/samples/delete-dataset.js deleted file mode 100644 index 6b6da42e..00000000 --- a/samples/delete-dataset.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(datasetId, project, location = 'us-central1') { - // [START aiplatform_delete_dataset_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function deleteDataset() { - // Configure the resource - const name = datasetServiceClient.datasetPath(project, location, datasetId); - const request = {name}; - - // Delete Dataset Request - const [response] = await datasetServiceClient.deleteDataset(request); - console.log(`Long running operation: ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Delete dataset response:\n', result); - } - deleteDataset(); - // [END aiplatform_delete_dataset_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/delete-endpoint.js b/samples/delete-endpoint.js deleted file mode 100644 index db5d531b..00000000 --- a/samples/delete-endpoint.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(endpointId, project, location = 'us-central1') { - // [START aiplatform_delete_endpoint_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const endpointId = 'YOUR_ENDPOINT_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Endpoint Service Client library - const {EndpointServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const endpointServiceClient = new EndpointServiceClient(clientOptions); - - async function deleteEndpoint() { - // Configure the parent resource - const endpoint = { - name: `projects/${project}/locations/${location}/endpoints/${endpointId}`, - }; - - // Delete endpoint request - const [response] = await endpointServiceClient.deleteEndpoint(endpoint); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Delete endpoint response:\n', result); - } - deleteEndpoint(); - // [END aiplatform_delete_endpoint_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/delete-entity-type-sample.js b/samples/delete-entity-type-sample.js deleted file mode 100644 index 84f490a0..00000000 --- a/samples/delete-entity-type-sample.js +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Deletes a single EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - force, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_delete_entity_type_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const force = ; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function deleteEntityType() { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const request = { - name: name, - force: Boolean(force), - }; - - // Delete EntityType request - const [operation] = await featurestoreServiceClient.deleteEntityType( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Delete entity type response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - deleteEntityType(); - // [END aiplatform_delete_entity_type_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/delete-export-model.js b/samples/delete-export-model.js deleted file mode 100644 index 8ecb80fd..00000000 --- a/samples/delete-export-model.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(bucketName, uriPrefix) { - // [START aiplatform_delete_export_model_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const bucketName = 'YOUR_BUCKET_NAME'; - // const uriPrefix = 'YOUR_GCS_URI_PREFIX' - - // Imports the Google Cloud Storage Client library - const {Storage} = require('@google-cloud/storage'); - - // Instantiates a client - const storageClient = new Storage(); - - async function deleteExportModel() { - const options = { - prefix: uriPrefix, - }; - const [files] = await storageClient - .bucket(`gs://${bucketName}`) - .getFiles(options); - for (const file of files) { - await storageClient.bucket(`gs://${bucketName}`).file(file.name).delete(); - } - console.log('Export model deleted'); - } - deleteExportModel(); - // [END aiplatform_delete_export_model_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/delete-feature-sample.js b/samples/delete-feature-sample.js deleted file mode 100644 index c509de97..00000000 --- a/samples/delete-feature-sample.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Deletes a single Feature. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - featureId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_delete_feature_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const featureId = 'YOUR_FEATURE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function deleteFeature() { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}/features/${featureId}`; - - const request = { - name: name, - }; - - // Delete Feature request - const [operation] = await featurestoreServiceClient.deleteFeature(request, { - timeout: Number(timeout), - }); - const [response] = await operation.promise(); - - console.log('Delete feature response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - deleteFeature(); - // [END aiplatform_delete_feature_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/delete-featurestore-sample.js b/samples/delete-featurestore-sample.js deleted file mode 100644 index e7220eba..00000000 --- a/samples/delete-featurestore-sample.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Deletes a single Featurestore. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - force = false, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 60000 -) { - // [START aiplatform_delete_featurestore_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const force = ; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function deleteFeaturestore() { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const request = { - name: name, - force: Boolean(force), - }; - - // Delete Featurestore request - const [operation] = await featurestoreServiceClient.deleteFeaturestore( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Delete featurestore response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - deleteFeaturestore(); - // [END aiplatform_delete_featurestore_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/delete-model.js b/samples/delete-model.js deleted file mode 100644 index a00b2b77..00000000 --- a/samples/delete-model.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, project, location = 'us-central1') { - // [START aiplatform_delete_model_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - */ - - // const modelId = 'YOUR_MODEL_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function deleteModel() { - // Configure the resource - const name = modelServiceClient.modelPath(project, location, modelId); - const request = {name}; - - // Delete Model Request - const [response] = await modelServiceClient.deleteModel(request); - console.log(`Long running operation: ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Delete model response:\n', result); - } - deleteModel(); - // [END aiplatform_delete_model_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/deploy-model-custom-trained-model.js b/samples/deploy-model-custom-trained-model.js deleted file mode 100644 index 40956cf4..00000000 --- a/samples/deploy-model-custom-trained-model.js +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -function main( - modelId, - deployedModelDisplayName, - endpointId, - project, - location = 'us-central1' -) { - // [START aiplatform_deploy_model_custom_trained_model_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const modelId = "YOUR_MODEL_ID"; - // const endpointId = 'YOUR_ENDPOINT_ID'; - // const deployedModelDisplayName = 'YOUR_DEPLOYED_MODEL_DISPLAY_NAME'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - const modelName = `projects/${project}/locations/${location}/models/${modelId}`; - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - // Imports the Google Cloud Endpoint Service Client library - const {EndpointServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint: - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const endpointServiceClient = new EndpointServiceClient(clientOptions); - - async function deployModelCustomTrainedModel() { - // Configure the parent resource - // key '0' assigns traffic for the newly deployed model - // Traffic percentage values must add up to 100 - // Leave dictionary empty if endpoint should not accept any traffic - const trafficSplit = {0: 100}; - const deployedModel = { - // format: 'projects/{project}/locations/{location}/models/{model}' - model: modelName, - displayName: deployedModelDisplayName, - // `dedicatedResources` must be used for non-AutoML models - dedicatedResources: { - minReplicaCount: 1, - machineSpec: { - machineType: 'n1-standard-2', - // Accelerators can be used only if the model specifies a GPU image. - // acceleratorType: 'NVIDIA_TESLA_K80', - // acceleratorCount: 1, - }, - }, - }; - const request = { - endpoint, - deployedModel, - trafficSplit, - }; - - // Get and print out a list of all the endpoints for this resource - const [response] = await endpointServiceClient.deployModel(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Deploy model response'); - const modelDeployed = result.deployedModel; - console.log(`\t\tId : ${modelDeployed.id}`); - console.log(modelDeployed); - } - deployModelCustomTrainedModel(); - // [END aiplatform_deploy_model_custom_trained_model_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/deploy-model.js b/samples/deploy-model.js deleted file mode 100644 index aa0c2d66..00000000 --- a/samples/deploy-model.js +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - modelId, - deployedModelDisplayName, - endpointId, - project, - location = 'us-central1' -) { - // [START aiplatform_deploy_model_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const modelId = "YOUR_MODEL_ID"; - // const endpointId = 'YOUR_ENDPOINT_ID'; - // const deployedModelDisplayName = 'YOUR_DEPLOYED_MODEL_DISPLAY_NAME'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - const modelName = `projects/${project}/locations/${location}/models/${modelId}`; - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - // Imports the Google Cloud Endpoint Service Client library - const {EndpointServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint: - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const endpointServiceClient = new EndpointServiceClient(clientOptions); - - async function deployModel() { - // Configure the parent resource - // key '0' assigns traffic for the newly deployed model - // Traffic percentage values must add up to 100 - // Leave dictionary empty if endpoint should not accept any traffic - const trafficSplit = {0: 100}; - const deployedModel = { - // format: 'projects/{project}/locations/{location}/models/{model}' - model: modelName, - displayName: deployedModelDisplayName, - // AutoML Vision models require `automatic_resources` field - // Other model types may require `dedicated_resources` field instead - automaticResources: {minReplicaCount: 1, maxReplicaCount: 1}, - }; - const request = { - endpoint, - deployedModel, - trafficSplit, - }; - - // Get and print out a list of all the endpoints for this resource - const [response] = await endpointServiceClient.deployModel(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Deploy model response'); - const modelDeployed = result.deployedModel; - console.log('\tDeployed model'); - if (!modelDeployed) { - console.log('\t\tId : {}'); - console.log('\t\tModel : {}'); - console.log('\t\tDisplay name : {}'); - console.log('\t\tCreate time : {}'); - - console.log('\t\tDedicated resources'); - console.log('\t\t\tMin replica count : {}'); - console.log('\t\t\tMachine spec {}'); - console.log('\t\t\t\tMachine type : {}'); - console.log('\t\t\t\tAccelerator type : {}'); - console.log('\t\t\t\tAccelerator count : {}'); - - console.log('\t\tAutomatic resources'); - console.log('\t\t\tMin replica count : {}'); - console.log('\t\t\tMax replica count : {}'); - } else { - console.log(`\t\tId : ${modelDeployed.id}`); - console.log(`\t\tModel : ${modelDeployed.model}`); - console.log(`\t\tDisplay name : ${modelDeployed.displayName}`); - console.log(`\t\tCreate time : ${modelDeployed.createTime}`); - - const dedicatedResources = modelDeployed.dedicatedResources; - console.log('\t\tDedicated resources'); - if (!dedicatedResources) { - console.log('\t\t\tMin replica count : {}'); - console.log('\t\t\tMachine spec {}'); - console.log('\t\t\t\tMachine type : {}'); - console.log('\t\t\t\tAccelerator type : {}'); - console.log('\t\t\t\tAccelerator count : {}'); - } else { - console.log( - `\t\t\tMin replica count : \ - ${dedicatedResources.minReplicaCount}` - ); - const machineSpec = dedicatedResources.machineSpec; - console.log('\t\t\tMachine spec'); - console.log(`\t\t\t\tMachine type : ${machineSpec.machineType}`); - console.log( - `\t\t\t\tAccelerator type : ${machineSpec.acceleratorType}` - ); - console.log( - `\t\t\t\tAccelerator count : ${machineSpec.acceleratorCount}` - ); - } - - const automaticResources = modelDeployed.automaticResources; - console.log('\t\tAutomatic resources'); - if (!automaticResources) { - console.log('\t\t\tMin replica count : {}'); - console.log('\t\t\tMax replica count : {}'); - } else { - console.log( - `\t\t\tMin replica count : \ - ${automaticResources.minReplicaCount}` - ); - console.log( - `\t\t\tMax replica count : \ - ${automaticResources.maxReplicaCount}` - ); - } - } - } - deployModel(); - // [END aiplatform_deploy_model_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/expensive-test/create-data-labeling-job-image.test.js b/samples/expensive-test/create-data-labeling-job-image.test.js deleted file mode 100644 index c3381e16..00000000 --- a/samples/expensive-test/create-data-labeling-job-image.test.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const displayName = `temp_create_data_labeling_job_image_test_${uuid()}`; -const datasetId = '1905673553261363200'; -const instructionUri = - 'gs://ucaip-sample-resources/images/datalabeling_instructions.pdf'; -const annotationSpec = 'roses'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -let dataLabelingJobId; - -describe('AI platform create data labeling job image', () => { - it('should create a new data labeling job image', async () => { - const stdout = execSync( - `node ./create-data-labeling-job-image.js ${displayName} ${datasetId} \ - ${instructionUri} \ - ${annotationSpec} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create data labeling job image response/); - dataLabelingJobId = stdout - .split('/locations/us-central1/dataLabelingJobs/')[1] - .split('\n')[0]; - }); - after('should cancel the data labeling job and delete it', async () => { - execSync( - `node ./cancel-data-labeling-job.js ${dataLabelingJobId} ${project} \ - ${location}`, - { - cwd, - } - ); - execSync( - `node ./delete-data-labeling-job.js ${dataLabelingJobId} ${project} \ - ${location}`, - { - cwd, - } - ); - }); -}); diff --git a/samples/expensive-test/create-data-labeling-job-video.test.js b/samples/expensive-test/create-data-labeling-job-video.test.js deleted file mode 100644 index 33800c8e..00000000 --- a/samples/expensive-test/create-data-labeling-job-video.test.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const displayName = `temp_create_data_labeling_job_video_test_${uuid()}`; -const datasetId = '3459133949727473664'; -const instructionUri = - 'gs://ucaip-sample-resources/images/datalabeling_instructions.pdf'; -const annotationSpec = 'cartwheel'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -let dataLabelingJobId; - -describe('AI platform create data labeling job video', () => { - it('should create a new data labeling job video', async () => { - const stdout = execSync( - `node ./create-data-labeling-job-video.js ${displayName} ${datasetId} \ - ${instructionUri} \ - ${annotationSpec} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create data labeling job video response/); - dataLabelingJobId = stdout - .split('/locations/us-central1/dataLabelingJobs/')[1] - .split('\n')[0]; - }); - after('should cancel the data labeling job and delete it', async () => { - execSync( - `node ./cancel-data-labeling-job.js ${dataLabelingJobId} ${project} \ - ${location}`, - { - cwd, - } - ); - execSync( - `node ./delete-data-labeling-job.js ${dataLabelingJobId} ${project} \ - ${location}`, - { - cwd, - } - ); - }); -}); diff --git a/samples/expensive-test/create-data-labeling-job.test.js b/samples/expensive-test/create-data-labeling-job.test.js deleted file mode 100644 index 342c54a5..00000000 --- a/samples/expensive-test/create-data-labeling-job.test.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const displayName = `temp_create_data_labeling_job_test_${uuid()}`; -const datasetId = '8268327440875520000'; -const instructionUri = - 'gs://ucaip-sample-resources/images/datalabeling_instructions.pdf'; -const inputsSchemaUri = - 'gs://google-cloud-aiplatform/schema/datalabelingjob/inputs/image_classification.yaml'; -const annotationSpec = 'daisy'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -let dataLabelingJobId; - -describe('AI platform create data labeling job', () => { - it('should create a new data labeling job', async () => { - const stdout = execSync( - `node ./create-data-labeling-job.js ${displayName} ${datasetId} \ - ${instructionUri} \ - ${inputsSchemaUri} \ - ${annotationSpec} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create data labeling job response/); - dataLabelingJobId = stdout - .split('/locations/us-central1/dataLabelingJobs/')[1] - .split('\n')[0]; - }); - after('should cancel the data labeling job and delete it', async () => { - execSync( - `node ./cancel-data-labeling-job.js ${dataLabelingJobId} ${project} \ - ${location}`, - { - cwd, - } - ); - execSync( - `node ./delete-data-labeling-job.js ${dataLabelingJobId} ${project} \ - ${location}`, - { - cwd, - } - ); - }); -}); diff --git a/samples/expensive-test/get-training-pipeline.test.js b/samples/expensive-test/get-training-pipeline.test.js deleted file mode 100644 index 1f553f84..00000000 --- a/samples/expensive-test/get-training-pipeline.test.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const trainingPipelineId = '1419759782528548864'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get training pipeline', () => { - it('should get the training pipeline', async () => { - const stdout = execSync( - `node ./get-training-pipeline.js ${trainingPipelineId} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Get training pipeline response/); - }); -}); diff --git a/samples/expensive-test/import-data-text-entity-extraction.test.js b/samples/expensive-test/import-data-text-entity-extraction.test.js deleted file mode 100644 index bb6ca678..00000000 --- a/samples/expensive-test/import-data-text-entity-extraction.test.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const datasetId = '6203215905493614592'; -const gcsSourceUri = - 'gs://cloud-ml-data/NL-entity/AIPlatform-unified/entity_extraction_dataset.jsonl'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform import data text entity extraction', () => { - it('should import data to text entity extraction dataset', async () => { - const stdout = execSync( - `node ./import-data-text-entity-extraction.js ${datasetId} \ - ${gcsSourceUri} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Import data text entity extraction response/); - }); -}); diff --git a/samples/expensive-test/import-data-text-sentiment-analysis.test.js b/samples/expensive-test/import-data-text-sentiment-analysis.test.js deleted file mode 100644 index 8449d211..00000000 --- a/samples/expensive-test/import-data-text-sentiment-analysis.test.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const datasetId = '5148529167758786560'; -const gcsSourceUri = - 'gs://cloud-ml-data/NL-sentiment/crowdflower-twitter-claritin-80-10-10.csv'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform import data text sentiment analysis', () => { - it('should import data text sentiment analysis to dataset', async () => { - const stdout = execSync( - `node ./import-data-text-sentiment-analysis.js ${datasetId} \ - ${gcsSourceUri} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Import data text sentiment analysis response/); - }); -}); diff --git a/samples/expensive-test/import-data-video-object-tracking.test.js b/samples/expensive-test/import-data-video-object-tracking.test.js deleted file mode 100644 index 592390e9..00000000 --- a/samples/expensive-test/import-data-video-object-tracking.test.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const datasetId = '1138566280794603520'; -const gcsSourceUri = - 'gs://ucaip-sample-resources/youtube_8m_videos_animal_full.jsonl'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform import data video object tracking', () => { - it('should import video object tracking data to dataset', async () => { - const stdout = execSync( - `node ./import-data-video-object-tracking.js ${datasetId} \ - ${gcsSourceUri} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Import data video object tracking response/); - }); -}); diff --git a/samples/export-feature-values-sample.js b/samples/export-feature-values-sample.js deleted file mode 100644 index 04d9c34c..00000000 --- a/samples/export-feature-values-sample.js +++ /dev/null @@ -1,105 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Exports Feature values from all the entities of a target EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - destinationTableUri, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_export_feature_values_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const destinationTableUri = 'YOUR_BQ_DESTINATION_TABLE_URI'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function exportFeatureValues() { - // Configure the entityType resource - const entityType = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const destination = { - bigqueryDestination: { - // # Output to BigQuery table created earlier - outputUri: destinationTableUri, - }, - }; - - const featureSelector = { - idMatcher: { - ids: ['age', 'gender', 'liked_genres'], - }, - }; - - const request = { - entityType: entityType, - destination: destination, - featureSelector: featureSelector, - fullExport: {}, - }; - - // Export Feature Values Request - const [operation] = await featurestoreServiceClient.exportFeatureValues( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Export feature values response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - exportFeatureValues(); - // [END aiplatform_export_feature_values_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/export-feature-values-snapshot-sample.js b/samples/export-feature-values-snapshot-sample.js deleted file mode 100644 index f527bfb1..00000000 --- a/samples/export-feature-values-snapshot-sample.js +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Exports Feature values with snapshot from all the entities of a target EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - destinationTableUri, - timestamp, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_export_feature_values_snapshot_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const destinationTableUri = 'YOUR_BQ_DESTINATION_TABLE_URI'; - // const timestamp = ; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function exportFeatureValuesSnapshot() { - // Configure the entityType resource - const entityType = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const destination = { - bigqueryDestination: { - // # Output to BigQuery table created earlier - outputUri: destinationTableUri, - }, - }; - - const featureSelector = { - idMatcher: { - ids: ['age', 'gender', 'liked_genres'], - }, - }; - - const snapshotExport = { - startTime: { - seconds: Number(timestamp), - }, - }; - - const request = { - entityType: entityType, - destination: destination, - featureSelector: featureSelector, - snapshotExport: snapshotExport, - }; - - // Export Feature Values Request - const [operation] = await featurestoreServiceClient.exportFeatureValues( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Export feature values snapshot response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - exportFeatureValuesSnapshot(); - // [END aiplatform_export_feature_values_snapshot_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/export-model-tabular-classification.js b/samples/export-model-tabular-classification.js deleted file mode 100644 index bbdabab5..00000000 --- a/samples/export-model-tabular-classification.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - gcsDestinationOutputUriPrefix, - modelId, - project, - location = 'us-central1' -) { - // [START aiplatform_export_model_tabular_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const gcsDestinationOutputUriPrefix ='YOUR_GCS_DESTINATION_\ - // OUTPUT_URI_PREFIX'; eg. "gs:///destination_path" - // const modelId = 'YOUR_MODEL_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function exportModelTabularClassification() { - // Configure the name resources - const name = `projects/${project}/locations/${location}/models/${modelId}`; - // Configure the outputConfig resources - const outputConfig = { - exportFormatId: 'tf-saved-model', - artifactDestination: { - outputUriPrefix: gcsDestinationOutputUriPrefix, - }, - }; - const request = { - name, - outputConfig, - }; - - // Export Model request - const [response] = await modelServiceClient.exportModel(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - console.log(`Export model response : ${JSON.stringify(response.result)}`); - } - exportModelTabularClassification(); - // [END aiplatform_export_model_tabular_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/export-model.js b/samples/export-model.js deleted file mode 100644 index a7fb1fbd..00000000 --- a/samples/export-model.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - modelId, - gcsDestinationOutputUriPrefix, - exportFormat, - project, - location = 'us-central1' -) { - // [START aiplatform_export_model_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - (Not necessary if passing values as arguments) - */ - - // const modelId = 'YOUR_MODEL_ID'; - // const gcsDestinationOutputUriPrefix ='YOUR_GCS_DEST_OUTPUT_URI_PREFIX'; - // eg. "gs:///destination_path" - // const exportFormat = 'YOUR_EXPORT_FORMAT'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function exportModel() { - // Configure the name resources - const name = `projects/${project}/locations/${location}/models/${modelId}`; - // Configure the outputConfig resources - const outputConfig = { - exportFormatId: exportFormat, - gcsDestination: { - outputUriPrefix: gcsDestinationOutputUriPrefix, - }, - }; - const request = { - name, - outputConfig, - }; - - // Export Model request - const [response] = await modelServiceClient.exportModel(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log(`Export model response : ${JSON.stringify(result)}`); - } - exportModel(); - // [END aiplatform_export_model_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.create_dataset.js b/samples/generated/v1/dataset_service.create_dataset.js deleted file mode 100644 index b7a02130..00000000 --- a/samples/generated/v1/dataset_service.create_dataset.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, dataset) { - // [START aiplatform_v1_generated_DatasetService_CreateDataset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the Dataset in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The Dataset to create. - */ - // const dataset = {} - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callCreateDataset() { - // Construct request - const request = { - parent, - dataset, - }; - - // Run request - const [operation] = await aiplatformClient.createDataset(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateDataset(); - // [END aiplatform_v1_generated_DatasetService_CreateDataset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.delete_dataset.js b/samples/generated/v1/dataset_service.delete_dataset.js deleted file mode 100644 index 9d774875..00000000 --- a/samples/generated/v1/dataset_service.delete_dataset.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_DatasetService_DeleteDataset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Dataset to delete. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callDeleteDataset() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteDataset(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDataset(); - // [END aiplatform_v1_generated_DatasetService_DeleteDataset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.export_data.js b/samples/generated/v1/dataset_service.export_data.js deleted file mode 100644 index d4323dba..00000000 --- a/samples/generated/v1/dataset_service.export_data.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, exportConfig) { - // [START aiplatform_v1_generated_DatasetService_ExportData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Dataset resource. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}` - */ - // const name = 'abc123' - /** - * Required. The desired output location. - */ - // const exportConfig = {} - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callExportData() { - // Construct request - const request = { - name, - exportConfig, - }; - - // Run request - const [operation] = await aiplatformClient.exportData(request); - const [response] = await operation.promise(); - console.log(response); - } - - callExportData(); - // [END aiplatform_v1_generated_DatasetService_ExportData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.get_annotation_spec.js b/samples/generated/v1/dataset_service.get_annotation_spec.js deleted file mode 100644 index 5fc9c43b..00000000 --- a/samples/generated/v1/dataset_service.get_annotation_spec.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_DatasetService_GetAnnotationSpec_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the AnnotationSpec resource. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` - */ - // const name = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callGetAnnotationSpec() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getAnnotationSpec(request); - console.log(response); - } - - callGetAnnotationSpec(); - // [END aiplatform_v1_generated_DatasetService_GetAnnotationSpec_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.get_dataset.js b/samples/generated/v1/dataset_service.get_dataset.js deleted file mode 100644 index 6e4606aa..00000000 --- a/samples/generated/v1/dataset_service.get_dataset.js +++ /dev/null @@ -1,65 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_DatasetService_GetDataset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Dataset resource. - */ - // const name = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callGetDataset() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getDataset(request); - console.log(response); - } - - callGetDataset(); - // [END aiplatform_v1_generated_DatasetService_GetDataset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.import_data.js b/samples/generated/v1/dataset_service.import_data.js deleted file mode 100644 index 7d49c2e9..00000000 --- a/samples/generated/v1/dataset_service.import_data.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, importConfigs) { - // [START aiplatform_v1_generated_DatasetService_ImportData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Dataset resource. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}` - */ - // const name = 'abc123' - /** - * Required. The desired input locations. The contents of all input locations will be - * imported in one batch. - */ - // const importConfigs = 1234 - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callImportData() { - // Construct request - const request = { - name, - importConfigs, - }; - - // Run request - const [operation] = await aiplatformClient.importData(request); - const [response] = await operation.promise(); - console.log(response); - } - - callImportData(); - // [END aiplatform_v1_generated_DatasetService_ImportData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.list_annotations.js b/samples/generated/v1/dataset_service.list_annotations.js deleted file mode 100644 index 7c093cb1..00000000 --- a/samples/generated/v1/dataset_service.list_annotations.js +++ /dev/null @@ -1,86 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_DatasetService_ListAnnotations_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataItem to list Annotations from. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callListAnnotations() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listAnnotationsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAnnotations(); - // [END aiplatform_v1_generated_DatasetService_ListAnnotations_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.list_data_items.js b/samples/generated/v1/dataset_service.list_data_items.js deleted file mode 100644 index eeb37502..00000000 --- a/samples/generated/v1/dataset_service.list_data_items.js +++ /dev/null @@ -1,86 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_DatasetService_ListDataItems_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Dataset to list DataItems from. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callListDataItems() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listDataItemsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDataItems(); - // [END aiplatform_v1_generated_DatasetService_ListDataItems_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.list_datasets.js b/samples/generated/v1/dataset_service.list_datasets.js deleted file mode 100644 index cbe66aeb..00000000 --- a/samples/generated/v1/dataset_service.list_datasets.js +++ /dev/null @@ -1,99 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_DatasetService_ListDatasets_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Dataset's parent resource. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * An expression for filtering the results of the request. For field names - * both snake_case and camelCase are supported. - * * `display_name`: supports = and != - * * `metadata_schema_uri`: supports = and != - * * `labels` supports general map functions that is: - * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence - * * A key including a space must be quoted. `labels."a key"`. - * Some examples: - * * `displayName="myDisplayName"` - * * `labels.myKey="myValue"` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - * Supported fields: - * * `display_name` - * * `create_time` - * * `update_time` - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callListDatasets() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listDatasetsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDatasets(); - // [END aiplatform_v1_generated_DatasetService_ListDatasets_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.list_saved_queries.js b/samples/generated/v1/dataset_service.list_saved_queries.js deleted file mode 100644 index 2ff96e7c..00000000 --- a/samples/generated/v1/dataset_service.list_saved_queries.js +++ /dev/null @@ -1,86 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_DatasetService_ListSavedQueries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Dataset to list SavedQueries from. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callListSavedQueries() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listSavedQueriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListSavedQueries(); - // [END aiplatform_v1_generated_DatasetService_ListSavedQueries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/dataset_service.update_dataset.js b/samples/generated/v1/dataset_service.update_dataset.js deleted file mode 100644 index 56c0f96b..00000000 --- a/samples/generated/v1/dataset_service.update_dataset.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(dataset, updateMask) { - // [START aiplatform_v1_generated_DatasetService_UpdateDataset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Dataset which replaces the resource on the server. - */ - // const dataset = {} - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see google.protobuf.FieldMask google.protobuf.FieldMask. - * Updatable fields: - * * `display_name` - * * `description` - * * `labels` - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callUpdateDataset() { - // Construct request - const request = { - dataset, - updateMask, - }; - - // Run request - const response = await aiplatformClient.updateDataset(request); - console.log(response); - } - - callUpdateDataset(); - // [END aiplatform_v1_generated_DatasetService_UpdateDataset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/endpoint_service.create_endpoint.js b/samples/generated/v1/endpoint_service.create_endpoint.js deleted file mode 100644 index bfb43a41..00000000 --- a/samples/generated/v1/endpoint_service.create_endpoint.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, endpoint, endpointId) { - // [START aiplatform_v1_generated_EndpointService_CreateEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the Endpoint in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The Endpoint to create. - */ - // const endpoint = {} - /** - * Immutable. The ID to use for endpoint, which will become the final - * component of the endpoint resource name. - * If not provided, Vertex AI will generate a value for this ID. - * This value should be 1-10 characters, and valid characters are /[0-9]/. - * When using HTTP/JSON, this field is populated based on a query string - * argument, such as `?endpoint_id=12345`. This is the fallback for fields - * that are not included in either the URI or the body. - */ - // const endpointId = 'abc123' - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callCreateEndpoint() { - // Construct request - const request = { - parent, - endpoint, - endpointId, - }; - - // Run request - const [operation] = await aiplatformClient.createEndpoint(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateEndpoint(); - // [END aiplatform_v1_generated_EndpointService_CreateEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/endpoint_service.delete_endpoint.js b/samples/generated/v1/endpoint_service.delete_endpoint.js deleted file mode 100644 index f51a8acf..00000000 --- a/samples/generated/v1/endpoint_service.delete_endpoint.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_EndpointService_DeleteEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callDeleteEndpoint() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteEndpoint(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteEndpoint(); - // [END aiplatform_v1_generated_EndpointService_DeleteEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/endpoint_service.deploy_model.js b/samples/generated/v1/endpoint_service.deploy_model.js deleted file mode 100644 index 33554f93..00000000 --- a/samples/generated/v1/endpoint_service.deploy_model.js +++ /dev/null @@ -1,84 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint, deployedModel) { - // [START aiplatform_v1_generated_EndpointService_DeployModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint resource into which to deploy a Model. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const endpoint = 'abc123' - /** - * Required. The DeployedModel to be created within the Endpoint. Note that - * Endpoint.traffic_split google.cloud.aiplatform.v1.Endpoint.traffic_split must be updated for the DeployedModel to start - * receiving traffic, either as part of this call, or via - * EndpointService.UpdateEndpoint google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint. - */ - // const deployedModel = {} - /** - * A map from a DeployedModel's ID to the percentage of this Endpoint's - * traffic that should be forwarded to that DeployedModel. - * If this field is non-empty, then the Endpoint's - * traffic_split google.cloud.aiplatform.v1.Endpoint.traffic_split will be overwritten with it. - * To refer to the ID of the just being deployed Model, a "0" should be used, - * and the actual ID of the new DeployedModel will be filled in its place by - * this method. The traffic percentage values must add up to 100. - * If this field is empty, then the Endpoint's - * traffic_split google.cloud.aiplatform.v1.Endpoint.traffic_split is not updated. - */ - // const trafficSplit = 1234 - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callDeployModel() { - // Construct request - const request = { - endpoint, - deployedModel, - }; - - // Run request - const [operation] = await aiplatformClient.deployModel(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeployModel(); - // [END aiplatform_v1_generated_EndpointService_DeployModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/endpoint_service.get_endpoint.js b/samples/generated/v1/endpoint_service.get_endpoint.js deleted file mode 100644 index 02ca00cf..00000000 --- a/samples/generated/v1/endpoint_service.get_endpoint.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_EndpointService_GetEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint resource. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callGetEndpoint() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getEndpoint(request); - console.log(response); - } - - callGetEndpoint(); - // [END aiplatform_v1_generated_EndpointService_GetEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/endpoint_service.list_endpoints.js b/samples/generated/v1/endpoint_service.list_endpoints.js deleted file mode 100644 index b5d7007a..00000000 --- a/samples/generated/v1/endpoint_service.list_endpoints.js +++ /dev/null @@ -1,105 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_EndpointService_ListEndpoints_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location from which to list the Endpoints. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. An expression for filtering the results of the request. For field names - * both snake_case and camelCase are supported. - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's resource name google.cloud.aiplatform.v1.Endpoint.name. - * * `display_name` supports = and, != - * * `labels` supports general map functions that is: - * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence - * * A key including a space must be quoted. `labels."a key"`. - * Some examples: - * * `endpoint=1` - * * `displayName="myDisplayName"` - * * `labels.myKey="myValue"` - */ - // const filter = 'abc123' - /** - * Optional. The standard list page size. - */ - // const pageSize = 1234 - /** - * Optional. The standard list page token. - * Typically obtained via - * ListEndpointsResponse.next_page_token google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token of the previous - * EndpointService.ListEndpoints google.cloud.aiplatform.v1.EndpointService.ListEndpoints call. - */ - // const pageToken = 'abc123' - /** - * Optional. Mask specifying which fields to read. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - * Supported fields: - * * `display_name` - * * `create_time` - * * `update_time` - * Example: `display_name, create_time desc`. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callListEndpoints() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listEndpointsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEndpoints(); - // [END aiplatform_v1_generated_EndpointService_ListEndpoints_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/endpoint_service.undeploy_model.js b/samples/generated/v1/endpoint_service.undeploy_model.js deleted file mode 100644 index 03778c13..00000000 --- a/samples/generated/v1/endpoint_service.undeploy_model.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint, deployedModelId) { - // [START aiplatform_v1_generated_EndpointService_UndeployModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint resource from which to undeploy a Model. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const endpoint = 'abc123' - /** - * Required. The ID of the DeployedModel to be undeployed from the Endpoint. - */ - // const deployedModelId = 'abc123' - /** - * If this field is provided, then the Endpoint's - * traffic_split google.cloud.aiplatform.v1.Endpoint.traffic_split will be overwritten with it. If - * last DeployedModel is being undeployed from the Endpoint, the - * Endpoint.traffic_split will always end up empty when this call returns. - * A DeployedModel will be successfully undeployed only if it doesn't have - * any traffic assigned to it when this method executes, or if this field - * unassigns any traffic to it. - */ - // const trafficSplit = 1234 - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callUndeployModel() { - // Construct request - const request = { - endpoint, - deployedModelId, - }; - - // Run request - const [operation] = await aiplatformClient.undeployModel(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUndeployModel(); - // [END aiplatform_v1_generated_EndpointService_UndeployModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/endpoint_service.update_endpoint.js b/samples/generated/v1/endpoint_service.update_endpoint.js deleted file mode 100644 index 46c5ebe2..00000000 --- a/samples/generated/v1/endpoint_service.update_endpoint.js +++ /dev/null @@ -1,66 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint, updateMask) { - // [START aiplatform_v1_generated_EndpointService_UpdateEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Endpoint which replaces the resource on the server. - */ - // const endpoint = {} - /** - * Required. The update mask applies to the resource. See google.protobuf.FieldMask google.protobuf.FieldMask. - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callUpdateEndpoint() { - // Construct request - const request = { - endpoint, - updateMask, - }; - - // Run request - const response = await aiplatformClient.updateEndpoint(request); - console.log(response); - } - - callUpdateEndpoint(); - // [END aiplatform_v1_generated_EndpointService_UpdateEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_online_serving_service.read_feature_values.js b/samples/generated/v1/featurestore_online_serving_service.read_feature_values.js deleted file mode 100644 index 22a53813..00000000 --- a/samples/generated/v1/featurestore_online_serving_service.read_feature_values.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType, entityId, featureSelector) { - // [START aiplatform_v1_generated_FeaturestoreOnlineServingService_ReadFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntityType for the entity being read. - * Value format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`. - * For example, for a machine learning model predicting user clicks on a - * website, an EntityType ID could be `user`. - */ - // const entityType = 'abc123' - /** - * Required. ID for a specific entity. For example, - * for a machine learning model predicting user clicks on a website, an entity - * ID could be `user_123`. - */ - // const entityId = 'abc123' - /** - * Required. Selector choosing Features of the target EntityType. - */ - // const featureSelector = {} - - // Imports the Aiplatform library - const {FeaturestoreOnlineServingServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreOnlineServingServiceClient(); - - async function callReadFeatureValues() { - // Construct request - const request = { - entityType, - entityId, - featureSelector, - }; - - // Run request - const response = await aiplatformClient.readFeatureValues(request); - console.log(response); - } - - callReadFeatureValues(); - // [END aiplatform_v1_generated_FeaturestoreOnlineServingService_ReadFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_online_serving_service.streaming_read_feature_values.js b/samples/generated/v1/featurestore_online_serving_service.streaming_read_feature_values.js deleted file mode 100644 index 803b0838..00000000 --- a/samples/generated/v1/featurestore_online_serving_service.streaming_read_feature_values.js +++ /dev/null @@ -1,81 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType, entityIds, featureSelector) { - // [START aiplatform_v1_generated_FeaturestoreOnlineServingService_StreamingReadFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the entities' type. - * Value format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`. - * For example, - * for a machine learning model predicting user clicks on a website, an - * EntityType ID could be `user`. - */ - // const entityType = 'abc123' - /** - * Required. IDs of entities to read Feature values of. The maximum number of IDs is - * 100. For example, for a machine learning model predicting user clicks on a - * website, an entity ID could be `user_123`. - */ - // const entityIds = 'abc123' - /** - * Required. Selector choosing Features of the target EntityType. Feature IDs will be - * deduplicated. - */ - // const featureSelector = {} - - // Imports the Aiplatform library - const {FeaturestoreOnlineServingServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreOnlineServingServiceClient(); - - async function callStreamingReadFeatureValues() { - // Construct request - const request = { - entityType, - entityIds, - featureSelector, - }; - - // Run request - const stream = await aiplatformClient.streamingReadFeatureValues(request); - stream.on('data', (response) => { console.log(response) }); - stream.on('error', (err) => { throw(err) }); - stream.on('end', () => { /* API call completed */ }); - } - - callStreamingReadFeatureValues(); - // [END aiplatform_v1_generated_FeaturestoreOnlineServingService_StreamingReadFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.batch_create_features.js b/samples/generated/v1/featurestore_service.batch_create_features.js deleted file mode 100644 index 3ec849cd..00000000 --- a/samples/generated/v1/featurestore_service.batch_create_features.js +++ /dev/null @@ -1,72 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, requests) { - // [START aiplatform_v1_generated_FeaturestoreService_BatchCreateFeatures_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntityType to create the batch of Features under. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const parent = 'abc123' - /** - * Required. The request message specifying the Features to create. All Features must be - * created under the same parent EntityType. The `parent` field in each child - * request message can be omitted. If `parent` is set in a child request, then - * the value must match the `parent` value in this request message. - */ - // const requests = 1234 - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callBatchCreateFeatures() { - // Construct request - const request = { - parent, - requests, - }; - - // Run request - const [operation] = await aiplatformClient.batchCreateFeatures(request); - const [response] = await operation.promise(); - console.log(response); - } - - callBatchCreateFeatures(); - // [END aiplatform_v1_generated_FeaturestoreService_BatchCreateFeatures_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.batch_read_feature_values.js b/samples/generated/v1/featurestore_service.batch_read_feature_values.js deleted file mode 100644 index d23e3ce5..00000000 --- a/samples/generated/v1/featurestore_service.batch_read_feature_values.js +++ /dev/null @@ -1,111 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(featurestore, destination, entityTypeSpecs) { - // [START aiplatform_v1_generated_FeaturestoreService_BatchReadFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Each read instance consists of exactly one read timestamp and one or more - * entity IDs identifying entities of the corresponding EntityTypes whose - * Features are requested. - * Each output instance contains Feature values of requested entities - * concatenated together as of the read time. - * An example read instance may be `foo_entity_id, bar_entity_id, - * 2020-01-01T10:00:00.123Z`. - * An example output instance may be `foo_entity_id, bar_entity_id, - * 2020-01-01T10:00:00.123Z, foo_entity_feature1_value, - * bar_entity_feature2_value`. - * Timestamp in each read instance must be millisecond-aligned. - * `csv_read_instances` are read instances stored in a plain-text CSV file. - * The header should be: - * ENTITY_TYPE_ID1, ENTITY_TYPE_ID2, ..., timestamp - * The columns can be in any order. - * Values in the timestamp column must use the RFC 3339 format, e.g. - * `2012-07-30T10:43:17.123Z`. - */ - // const csvReadInstances = {} - /** - * Similar to csv_read_instances, but from BigQuery source. - */ - // const bigqueryReadInstances = {} - /** - * Required. The resource name of the Featurestore from which to query Feature values. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}` - */ - // const featurestore = 'abc123' - /** - * Required. Specifies output location and format. - */ - // const destination = {} - /** - * When not empty, the specified fields in the *_read_instances source will be - * joined as-is in the output, in addition to those fields from the - * Featurestore Entity. - * For BigQuery source, the type of the pass-through values will be - * automatically inferred. For CSV source, the pass-through values will be - * passed as opaque bytes. - */ - // const passThroughFields = 1234 - /** - * Required. Specifies EntityType grouping Features to read values of and settings. - * Each EntityType referenced in - * BatchReadFeatureValuesRequest.entity_type_specs must have a column - * specifying entity IDs in the EntityType in - * BatchReadFeatureValuesRequest.request . - */ - // const entityTypeSpecs = 1234 - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callBatchReadFeatureValues() { - // Construct request - const request = { - featurestore, - destination, - entityTypeSpecs, - }; - - // Run request - const [operation] = await aiplatformClient.batchReadFeatureValues(request); - const [response] = await operation.promise(); - console.log(response); - } - - callBatchReadFeatureValues(); - // [END aiplatform_v1_generated_FeaturestoreService_BatchReadFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.create_entity_type.js b/samples/generated/v1/featurestore_service.create_entity_type.js deleted file mode 100644 index e276520f..00000000 --- a/samples/generated/v1/featurestore_service.create_entity_type.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, entityTypeId) { - // [START aiplatform_v1_generated_FeaturestoreService_CreateEntityType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Featurestore to create EntityTypes. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}` - */ - // const parent = 'abc123' - /** - * The EntityType to create. - */ - // const entityType = {} - /** - * Required. The ID to use for the EntityType, which will become the final component of - * the EntityType's resource name. - * This value may be up to 60 characters, and valid characters are - * `[a-z0-9_]`. The first character cannot be a number. - * The value must be unique within a featurestore. - */ - // const entityTypeId = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callCreateEntityType() { - // Construct request - const request = { - parent, - entityTypeId, - }; - - // Run request - const [operation] = await aiplatformClient.createEntityType(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateEntityType(); - // [END aiplatform_v1_generated_FeaturestoreService_CreateEntityType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.create_feature.js b/samples/generated/v1/featurestore_service.create_feature.js deleted file mode 100644 index 501ca5fd..00000000 --- a/samples/generated/v1/featurestore_service.create_feature.js +++ /dev/null @@ -1,78 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, feature, featureId) { - // [START aiplatform_v1_generated_FeaturestoreService_CreateFeature_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntityType to create a Feature. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const parent = 'abc123' - /** - * Required. The Feature to create. - */ - // const feature = {} - /** - * Required. The ID to use for the Feature, which will become the final component of - * the Feature's resource name. - * This value may be up to 60 characters, and valid characters are - * `[a-z0-9_]`. The first character cannot be a number. - * The value must be unique within an EntityType. - */ - // const featureId = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callCreateFeature() { - // Construct request - const request = { - parent, - feature, - featureId, - }; - - // Run request - const [operation] = await aiplatformClient.createFeature(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateFeature(); - // [END aiplatform_v1_generated_FeaturestoreService_CreateFeature_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.create_featurestore.js b/samples/generated/v1/featurestore_service.create_featurestore.js deleted file mode 100644 index bc6f82bc..00000000 --- a/samples/generated/v1/featurestore_service.create_featurestore.js +++ /dev/null @@ -1,78 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, featurestore, featurestoreId) { - // [START aiplatform_v1_generated_FeaturestoreService_CreateFeaturestore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create Featurestores. - * Format: - * `projects/{project}/locations/{location}'` - */ - // const parent = 'abc123' - /** - * Required. The Featurestore to create. - */ - // const featurestore = {} - /** - * Required. The ID to use for this Featurestore, which will become the final component - * of the Featurestore's resource name. - * This value may be up to 60 characters, and valid characters are - * `[a-z0-9_]`. The first character cannot be a number. - * The value must be unique within the project and location. - */ - // const featurestoreId = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callCreateFeaturestore() { - // Construct request - const request = { - parent, - featurestore, - featurestoreId, - }; - - // Run request - const [operation] = await aiplatformClient.createFeaturestore(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateFeaturestore(); - // [END aiplatform_v1_generated_FeaturestoreService_CreateFeaturestore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.delete_entity_type.js b/samples/generated/v1/featurestore_service.delete_entity_type.js deleted file mode 100644 index 35a524f9..00000000 --- a/samples/generated/v1/featurestore_service.delete_entity_type.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_FeaturestoreService_DeleteEntityType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the EntityType to be deleted. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const name = 'abc123' - /** - * If set to true, any Features for this EntityType will also be deleted. - * (Otherwise, the request will only work if the EntityType has no Features.) - */ - // const force = true - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callDeleteEntityType() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteEntityType(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteEntityType(); - // [END aiplatform_v1_generated_FeaturestoreService_DeleteEntityType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.delete_feature.js b/samples/generated/v1/featurestore_service.delete_feature.js deleted file mode 100644 index 99e88823..00000000 --- a/samples/generated/v1/featurestore_service.delete_feature.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_FeaturestoreService_DeleteFeature_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Features to be deleted. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callDeleteFeature() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteFeature(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteFeature(); - // [END aiplatform_v1_generated_FeaturestoreService_DeleteFeature_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.delete_featurestore.js b/samples/generated/v1/featurestore_service.delete_featurestore.js deleted file mode 100644 index 87129231..00000000 --- a/samples/generated/v1/featurestore_service.delete_featurestore.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_FeaturestoreService_DeleteFeaturestore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Featurestore to be deleted. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}` - */ - // const name = 'abc123' - /** - * If set to true, any EntityTypes and Features for this Featurestore will - * also be deleted. (Otherwise, the request will only work if the Featurestore - * has no EntityTypes.) - */ - // const force = true - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callDeleteFeaturestore() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteFeaturestore(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteFeaturestore(); - // [END aiplatform_v1_generated_FeaturestoreService_DeleteFeaturestore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.export_feature_values.js b/samples/generated/v1/featurestore_service.export_feature_values.js deleted file mode 100644 index 44f3d068..00000000 --- a/samples/generated/v1/featurestore_service.export_feature_values.js +++ /dev/null @@ -1,88 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType, destination, featureSelector) { - // [START aiplatform_v1_generated_FeaturestoreService_ExportFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Exports the latest Feature values of all entities of the EntityType - * within a time range. - */ - // const snapshotExport = {} - /** - * Exports all historical values of all entities of the EntityType within a - * time range - */ - // const fullExport = {} - /** - * Required. The resource name of the EntityType from which to export Feature values. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const entityType = 'abc123' - /** - * Required. Specifies destination location and format. - */ - // const destination = {} - /** - * Required. Selects Features to export values of. - */ - // const featureSelector = {} - /** - * Per-Feature export settings. - */ - // const settings = 1234 - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callExportFeatureValues() { - // Construct request - const request = { - entityType, - destination, - featureSelector, - }; - - // Run request - const [operation] = await aiplatformClient.exportFeatureValues(request); - const [response] = await operation.promise(); - console.log(response); - } - - callExportFeatureValues(); - // [END aiplatform_v1_generated_FeaturestoreService_ExportFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.get_entity_type.js b/samples/generated/v1/featurestore_service.get_entity_type.js deleted file mode 100644 index 6c0f82b3..00000000 --- a/samples/generated/v1/featurestore_service.get_entity_type.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_FeaturestoreService_GetEntityType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the EntityType resource. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callGetEntityType() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getEntityType(request); - console.log(response); - } - - callGetEntityType(); - // [END aiplatform_v1_generated_FeaturestoreService_GetEntityType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.get_feature.js b/samples/generated/v1/featurestore_service.get_feature.js deleted file mode 100644 index 86677d01..00000000 --- a/samples/generated/v1/featurestore_service.get_feature.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_FeaturestoreService_GetFeature_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Feature resource. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callGetFeature() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getFeature(request); - console.log(response); - } - - callGetFeature(); - // [END aiplatform_v1_generated_FeaturestoreService_GetFeature_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.get_featurestore.js b/samples/generated/v1/featurestore_service.get_featurestore.js deleted file mode 100644 index acae2e51..00000000 --- a/samples/generated/v1/featurestore_service.get_featurestore.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_FeaturestoreService_GetFeaturestore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Featurestore resource. - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callGetFeaturestore() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getFeaturestore(request); - console.log(response); - } - - callGetFeaturestore(); - // [END aiplatform_v1_generated_FeaturestoreService_GetFeaturestore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.import_feature_values.js b/samples/generated/v1/featurestore_service.import_feature_values.js deleted file mode 100644 index b194ada8..00000000 --- a/samples/generated/v1/featurestore_service.import_feature_values.js +++ /dev/null @@ -1,114 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType, featureSpecs) { - // [START aiplatform_v1_generated_FeaturestoreService_ImportFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - */ - // const avroSource = {} - /** - */ - // const bigquerySource = {} - /** - */ - // const csvSource = {} - /** - * Source column that holds the Feature timestamp for all Feature - * values in each entity. - */ - // const featureTimeField = 'abc123' - /** - * Single Feature timestamp for all entities being imported. The - * timestamp must not have higher than millisecond precision. - */ - // const featureTime = {} - /** - * Required. The resource name of the EntityType grouping the Features for which values - * are being imported. Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` - */ - // const entityType = 'abc123' - /** - * Source column that holds entity IDs. If not provided, entity IDs are - * extracted from the column named `entity_id`. - */ - // const entityIdField = 'abc123' - /** - * Required. Specifications defining which Feature values to import from the entity. The - * request fails if no feature_specs are provided, and having multiple - * feature_specs for one Feature is not allowed. - */ - // const featureSpecs = 1234 - /** - * If set, data will not be imported for online serving. This - * is typically used for backfilling, where Feature generation timestamps are - * not in the timestamp range needed for online serving. - */ - // const disableOnlineServing = true - /** - * Specifies the number of workers that are used to write data to the - * Featurestore. Consider the online serving capacity that you require to - * achieve the desired import throughput without interfering with online - * serving. The value must be positive, and less than or equal to 100. - * If not set, defaults to using 1 worker. The low count ensures minimal - * impact on online serving performance. - */ - // const workerCount = 1234 - /** - * If true, API doesn't start ingestion analysis pipeline. - */ - // const disableIngestionAnalysis = true - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callImportFeatureValues() { - // Construct request - const request = { - entityType, - featureSpecs, - }; - - // Run request - const [operation] = await aiplatformClient.importFeatureValues(request); - const [response] = await operation.promise(); - console.log(response); - } - - callImportFeatureValues(); - // [END aiplatform_v1_generated_FeaturestoreService_ImportFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.list_entity_types.js b/samples/generated/v1/featurestore_service.list_entity_types.js deleted file mode 100644 index 4dc7a5ed..00000000 --- a/samples/generated/v1/featurestore_service.list_entity_types.js +++ /dev/null @@ -1,112 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_FeaturestoreService_ListEntityTypes_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Featurestore to list EntityTypes. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}` - */ - // const parent = 'abc123' - /** - * Lists the EntityTypes that match the filter expression. The following - * filters are supported: - * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. - * Values must be in RFC 3339 format. - * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. - * Values must be in RFC 3339 format. - * * `labels`: Supports key-value equality as well as key presence. - * Examples: - * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR - * update_time > \"2020-01-31T15:30:00.000000Z\"` --> EntityTypes created - * or updated after 2020-01-31T15:30:00.000000Z. - * * `labels.active = yes AND labels.env = prod` --> EntityTypes having both - * (active: yes) and (env: prod) labels. - * * `labels.env: *` --> Any EntityType which has a label with 'env' as the - * key. - */ - // const filter = 'abc123' - /** - * The maximum number of EntityTypes to return. The service may return fewer - * than this value. If unspecified, at most 1000 EntityTypes will be returned. - * The maximum value is 1000; any value greater than 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * FeaturestoreService.ListEntityTypes google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * FeaturestoreService.ListEntityTypes google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - * Supported fields: - * * `entity_type_id` - * * `create_time` - * * `update_time` - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callListEntityTypes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listEntityTypesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEntityTypes(); - // [END aiplatform_v1_generated_FeaturestoreService_ListEntityTypes_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.list_features.js b/samples/generated/v1/featurestore_service.list_features.js deleted file mode 100644 index 14d7902e..00000000 --- a/samples/generated/v1/featurestore_service.list_features.js +++ /dev/null @@ -1,122 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_FeaturestoreService_ListFeatures_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list Features. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const parent = 'abc123' - /** - * Lists the Features that match the filter expression. The following - * filters are supported: - * * `value_type`: Supports = and != comparisons. - * * `create_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must - * be in RFC 3339 format. - * * `update_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must - * be in RFC 3339 format. - * * `labels`: Supports key-value equality as well as key presence. - * Examples: - * * `value_type = DOUBLE` --> Features whose type is DOUBLE. - * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR - * update_time > \"2020-01-31T15:30:00.000000Z\"` --> EntityTypes created - * or updated after 2020-01-31T15:30:00.000000Z. - * * `labels.active = yes AND labels.env = prod` --> Features having both - * (active: yes) and (env: prod) labels. - * * `labels.env: *` --> Any Feature which has a label with 'env' as the - * key. - */ - // const filter = 'abc123' - /** - * The maximum number of Features to return. The service may return fewer - * than this value. If unspecified, at most 1000 Features will be returned. - * The maximum value is 1000; any value greater than 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * FeaturestoreService.ListFeatures google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * FeaturestoreService.ListFeatures google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - * Supported fields: - * * `feature_id` - * * `value_type` - * * `create_time` - * * `update_time` - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * If set, return the most recent ListFeaturesRequest.latest_stats_count google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count - * of stats for each Feature in response. Valid value is 0, 10. If number of - * stats exists < ListFeaturesRequest.latest_stats_count google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count, return all - * existing stats. - */ - // const latestStatsCount = 1234 - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callListFeatures() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listFeaturesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFeatures(); - // [END aiplatform_v1_generated_FeaturestoreService_ListFeatures_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.list_featurestores.js b/samples/generated/v1/featurestore_service.list_featurestores.js deleted file mode 100644 index 44e9e19e..00000000 --- a/samples/generated/v1/featurestore_service.list_featurestores.js +++ /dev/null @@ -1,113 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_FeaturestoreService_ListFeaturestores_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list Featurestores. - * Format: - * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Lists the featurestores that match the filter expression. The following - * fields are supported: - * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. - * Values must be - * in RFC 3339 format. - * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. - * Values must be - * in RFC 3339 format. - * * `online_serving_config.fixed_node_count`: Supports `=`, `!=`, `<`, `>`, - * `<=`, and `>=` comparisons. - * * `labels`: Supports key-value equality and key presence. - * Examples: - * * `create_time > "2020-01-01" OR update_time > "2020-01-01"` - * Featurestores created or updated after 2020-01-01. - * * `labels.env = "prod"` - * Featurestores with label "env" set to "prod". - */ - // const filter = 'abc123' - /** - * The maximum number of Featurestores to return. The service may return fewer - * than this value. If unspecified, at most 100 Featurestores will be - * returned. The maximum value is 100; any value greater than 100 will be - * coerced to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * FeaturestoreService.ListFeaturestores google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * FeaturestoreService.ListFeaturestores google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - * Supported Fields: - * * `create_time` - * * `update_time` - * * `online_serving_config.fixed_node_count` - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callListFeaturestores() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listFeaturestoresAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFeaturestores(); - // [END aiplatform_v1_generated_FeaturestoreService_ListFeaturestores_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.search_features.js b/samples/generated/v1/featurestore_service.search_features.js deleted file mode 100644 index 611c707d..00000000 --- a/samples/generated/v1/featurestore_service.search_features.js +++ /dev/null @@ -1,132 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(location) { - // [START aiplatform_v1_generated_FeaturestoreService_SearchFeatures_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to search Features. - * Format: - * `projects/{project}/locations/{location}` - */ - // const location = 'abc123' - /** - * Query string that is a conjunction of field-restricted queries and/or - * field-restricted filters. Field-restricted queries and filters can be - * combined using `AND` to form a conjunction. - * A field query is in the form FIELD:QUERY. This implicitly checks if QUERY - * exists as a substring within Feature's FIELD. The QUERY - * and the FIELD are converted to a sequence of words (i.e. tokens) for - * comparison. This is done by: - * * Removing leading/trailing whitespace and tokenizing the search value. - * Characters that are not one of alphanumeric `[a-zA-Z0-9]`, underscore - * `_`, or asterisk `*` are treated as delimiters for tokens. `*` is treated - * as a wildcard that matches characters within a token. - * * Ignoring case. - * * Prepending an asterisk to the first and appending an asterisk to the - * last token in QUERY. - * A QUERY must be either a singular token or a phrase. A phrase is one or - * multiple words enclosed in double quotation marks ("). With phrases, the - * order of the words is important. Words in the phrase must be matching in - * order and consecutively. - * Supported FIELDs for field-restricted queries: - * * `feature_id` - * * `description` - * * `entity_type_id` - * Examples: - * * `feature_id: foo` --> Matches a Feature with ID containing the substring - * `foo` (eg. `foo`, `foofeature`, `barfoo`). - * * `feature_id: foo*feature` --> Matches a Feature with ID containing the - * substring `foo*feature` (eg. `foobarfeature`). - * * `feature_id: foo AND description: bar` --> Matches a Feature with ID - * containing the substring `foo` and description containing the substring - * `bar`. - * Besides field queries, the following exact-match filters are - * supported. The exact-match filters do not support wildcards. Unlike - * field-restricted queries, exact-match filters are case-sensitive. - * * `feature_id`: Supports = comparisons. - * * `description`: Supports = comparisons. Multi-token filters should be - * enclosed in quotes. - * * `entity_type_id`: Supports = comparisons. - * * `value_type`: Supports = and != comparisons. - * * `labels`: Supports key-value equality as well as key presence. - * * `featurestore_id`: Supports = comparisons. - * Examples: - * * `description = "foo bar"` --> Any Feature with description exactly equal - * to `foo bar` - * * `value_type = DOUBLE` --> Features whose type is DOUBLE. - * * `labels.active = yes AND labels.env = prod` --> Features having both - * (active: yes) and (env: prod) labels. - * * `labels.env: *` --> Any Feature which has a label with `env` as the - * key. - */ - // const query = 'abc123' - /** - * The maximum number of Features to return. The service may return fewer - * than this value. If unspecified, at most 100 Features will be returned. - * The maximum value is 100; any value greater than 100 will be coerced to - * 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * FeaturestoreService.SearchFeatures google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * FeaturestoreService.SearchFeatures google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures, except `page_size`, must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callSearchFeatures() { - // Construct request - const request = { - location, - }; - - // Run request - const iterable = await aiplatformClient.searchFeaturesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callSearchFeatures(); - // [END aiplatform_v1_generated_FeaturestoreService_SearchFeatures_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.update_entity_type.js b/samples/generated/v1/featurestore_service.update_entity_type.js deleted file mode 100644 index 9757c943..00000000 --- a/samples/generated/v1/featurestore_service.update_entity_type.js +++ /dev/null @@ -1,84 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType) { - // [START aiplatform_v1_generated_FeaturestoreService_UpdateEntityType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The EntityType's `name` field is used to identify the EntityType to be - * updated. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const entityType = {} - /** - * Field mask is used to specify the fields to be overwritten in the - * EntityType resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then only the non-empty fields present in the - * request will be overwritten. Set the update_mask to `*` to override all - * fields. - * Updatable fields: - * * `description` - * * `labels` - * * `monitoring_config.snapshot_analysis.disabled` - * * `monitoring_config.snapshot_analysis.monitoring_interval_days` - * * `monitoring_config.snapshot_analysis.staleness_days` - * * `monitoring_config.import_features_analysis.state` - * * `monitoring_config.import_features_analysis.anomaly_detection_baseline` - * * `monitoring_config.numerical_threshold_config.value` - * * `monitoring_config.categorical_threshold_config.value` - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callUpdateEntityType() { - // Construct request - const request = { - entityType, - }; - - // Run request - const response = await aiplatformClient.updateEntityType(request); - console.log(response); - } - - callUpdateEntityType(); - // [END aiplatform_v1_generated_FeaturestoreService_UpdateEntityType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.update_feature.js b/samples/generated/v1/featurestore_service.update_feature.js deleted file mode 100644 index 819a2320..00000000 --- a/samples/generated/v1/featurestore_service.update_feature.js +++ /dev/null @@ -1,78 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(feature) { - // [START aiplatform_v1_generated_FeaturestoreService_UpdateFeature_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Feature's `name` field is used to identify the Feature to be - * updated. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` - */ - // const feature = {} - /** - * Field mask is used to specify the fields to be overwritten in the - * Features resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then only the non-empty fields present in the - * request will be overwritten. Set the update_mask to `*` to override all - * fields. - * Updatable fields: - * * `description` - * * `labels` - * * `disable_monitoring` - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callUpdateFeature() { - // Construct request - const request = { - feature, - }; - - // Run request - const response = await aiplatformClient.updateFeature(request); - console.log(response); - } - - callUpdateFeature(); - // [END aiplatform_v1_generated_FeaturestoreService_UpdateFeature_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/featurestore_service.update_featurestore.js b/samples/generated/v1/featurestore_service.update_featurestore.js deleted file mode 100644 index f8d43801..00000000 --- a/samples/generated/v1/featurestore_service.update_featurestore.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(featurestore) { - // [START aiplatform_v1_generated_FeaturestoreService_UpdateFeaturestore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Featurestore's `name` field is used to identify the Featurestore to be - * updated. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}` - */ - // const featurestore = {} - /** - * Field mask is used to specify the fields to be overwritten in the - * Featurestore resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then only the non-empty fields present in the - * request will be overwritten. Set the update_mask to `*` to override all - * fields. - * Updatable fields: - * * `labels` - * * `online_serving_config.fixed_node_count` - * * `online_serving_config.scaling` - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callUpdateFeaturestore() { - // Construct request - const request = { - featurestore, - }; - - // Run request - const [operation] = await aiplatformClient.updateFeaturestore(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateFeaturestore(); - // [END aiplatform_v1_generated_FeaturestoreService_UpdateFeaturestore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_endpoint_service.create_index_endpoint.js b/samples/generated/v1/index_endpoint_service.create_index_endpoint.js deleted file mode 100644 index b727f13e..00000000 --- a/samples/generated/v1/index_endpoint_service.create_index_endpoint.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, indexEndpoint) { - // [START aiplatform_v1_generated_IndexEndpointService_CreateIndexEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the IndexEndpoint in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The IndexEndpoint to create. - */ - // const indexEndpoint = {} - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callCreateIndexEndpoint() { - // Construct request - const request = { - parent, - indexEndpoint, - }; - - // Run request - const [operation] = await aiplatformClient.createIndexEndpoint(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateIndexEndpoint(); - // [END aiplatform_v1_generated_IndexEndpointService_CreateIndexEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_endpoint_service.delete_index_endpoint.js b/samples/generated/v1/index_endpoint_service.delete_index_endpoint.js deleted file mode 100644 index ba6a0437..00000000 --- a/samples/generated/v1/index_endpoint_service.delete_index_endpoint.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_IndexEndpointService_DeleteIndexEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the IndexEndpoint resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callDeleteIndexEndpoint() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteIndexEndpoint(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteIndexEndpoint(); - // [END aiplatform_v1_generated_IndexEndpointService_DeleteIndexEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_endpoint_service.deploy_index.js b/samples/generated/v1/index_endpoint_service.deploy_index.js deleted file mode 100644 index 2dc6b7e4..00000000 --- a/samples/generated/v1/index_endpoint_service.deploy_index.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(indexEndpoint, deployedIndex) { - // [START aiplatform_v1_generated_IndexEndpointService_DeployIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the IndexEndpoint resource into which to deploy an Index. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - */ - // const indexEndpoint = 'abc123' - /** - * Required. The DeployedIndex to be created within the IndexEndpoint. - */ - // const deployedIndex = {} - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callDeployIndex() { - // Construct request - const request = { - indexEndpoint, - deployedIndex, - }; - - // Run request - const [operation] = await aiplatformClient.deployIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeployIndex(); - // [END aiplatform_v1_generated_IndexEndpointService_DeployIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_endpoint_service.get_index_endpoint.js b/samples/generated/v1/index_endpoint_service.get_index_endpoint.js deleted file mode 100644 index ed0867b7..00000000 --- a/samples/generated/v1/index_endpoint_service.get_index_endpoint.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_IndexEndpointService_GetIndexEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the IndexEndpoint resource. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callGetIndexEndpoint() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getIndexEndpoint(request); - console.log(response); - } - - callGetIndexEndpoint(); - // [END aiplatform_v1_generated_IndexEndpointService_GetIndexEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_endpoint_service.list_index_endpoints.js b/samples/generated/v1/index_endpoint_service.list_index_endpoints.js deleted file mode 100644 index c9d1bb51..00000000 --- a/samples/generated/v1/index_endpoint_service.list_index_endpoints.js +++ /dev/null @@ -1,98 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_IndexEndpointService_ListIndexEndpoints_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location from which to list the IndexEndpoints. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. An expression for filtering the results of the request. For field names - * both snake_case and camelCase are supported. - * * `index_endpoint` supports = and !=. `index_endpoint` represents the - * IndexEndpoint ID, ie. the last segment of the IndexEndpoint's - * resourcename google.cloud.aiplatform.v1.IndexEndpoint.name. - * * `display_name` supports =, != and regex() - * (uses re2 (https://github.com/google/re2/wiki/Syntax) syntax) - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* or labels:key - key existence - * A key including a space must be quoted. `labels."a key"`. - * Some examples: - * * `index_endpoint="1"` - * * `display_name="myDisplayName"` - * * `regex(display_name, "^A") -> The display name starts with an A. - * * `labels.myKey="myValue"` - */ - // const filter = 'abc123' - /** - * Optional. The standard list page size. - */ - // const pageSize = 1234 - /** - * Optional. The standard list page token. - * Typically obtained via - * ListIndexEndpointsResponse.next_page_token google.cloud.aiplatform.v1.ListIndexEndpointsResponse.next_page_token of the previous - * IndexEndpointService.ListIndexEndpoints google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints call. - */ - // const pageToken = 'abc123' - /** - * Optional. Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callListIndexEndpoints() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listIndexEndpointsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListIndexEndpoints(); - // [END aiplatform_v1_generated_IndexEndpointService_ListIndexEndpoints_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_endpoint_service.mutate_deployed_index.js b/samples/generated/v1/index_endpoint_service.mutate_deployed_index.js deleted file mode 100644 index cfce6c9a..00000000 --- a/samples/generated/v1/index_endpoint_service.mutate_deployed_index.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(indexEndpoint, deployedIndex) { - // [START aiplatform_v1_generated_IndexEndpointService_MutateDeployedIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the IndexEndpoint resource into which to deploy an Index. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - */ - // const indexEndpoint = 'abc123' - /** - * Required. The DeployedIndex to be updated within the IndexEndpoint. - * Currently, the updatable fields are DeployedIndex automatic_resources - * and DeployedIndex dedicated_resources - */ - // const deployedIndex = {} - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callMutateDeployedIndex() { - // Construct request - const request = { - indexEndpoint, - deployedIndex, - }; - - // Run request - const [operation] = await aiplatformClient.mutateDeployedIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callMutateDeployedIndex(); - // [END aiplatform_v1_generated_IndexEndpointService_MutateDeployedIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_endpoint_service.undeploy_index.js b/samples/generated/v1/index_endpoint_service.undeploy_index.js deleted file mode 100644 index c3ae344f..00000000 --- a/samples/generated/v1/index_endpoint_service.undeploy_index.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(indexEndpoint, deployedIndexId) { - // [START aiplatform_v1_generated_IndexEndpointService_UndeployIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the IndexEndpoint resource from which to undeploy an Index. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - */ - // const indexEndpoint = 'abc123' - /** - * Required. The ID of the DeployedIndex to be undeployed from the IndexEndpoint. - */ - // const deployedIndexId = 'abc123' - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callUndeployIndex() { - // Construct request - const request = { - indexEndpoint, - deployedIndexId, - }; - - // Run request - const [operation] = await aiplatformClient.undeployIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUndeployIndex(); - // [END aiplatform_v1_generated_IndexEndpointService_UndeployIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_endpoint_service.update_index_endpoint.js b/samples/generated/v1/index_endpoint_service.update_index_endpoint.js deleted file mode 100644 index 5ffece31..00000000 --- a/samples/generated/v1/index_endpoint_service.update_index_endpoint.js +++ /dev/null @@ -1,66 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(indexEndpoint, updateMask) { - // [START aiplatform_v1_generated_IndexEndpointService_UpdateIndexEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The IndexEndpoint which replaces the resource on the server. - */ - // const indexEndpoint = {} - /** - * Required. The update mask applies to the resource. See google.protobuf.FieldMask google.protobuf.FieldMask. - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callUpdateIndexEndpoint() { - // Construct request - const request = { - indexEndpoint, - updateMask, - }; - - // Run request - const response = await aiplatformClient.updateIndexEndpoint(request); - console.log(response); - } - - callUpdateIndexEndpoint(); - // [END aiplatform_v1_generated_IndexEndpointService_UpdateIndexEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_service.create_index.js b/samples/generated/v1/index_service.create_index.js deleted file mode 100644 index 96c8fac0..00000000 --- a/samples/generated/v1/index_service.create_index.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, index) { - // [START aiplatform_v1_generated_IndexService_CreateIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the Index in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The Index to create. - */ - // const index = {} - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callCreateIndex() { - // Construct request - const request = { - parent, - index, - }; - - // Run request - const [operation] = await aiplatformClient.createIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateIndex(); - // [END aiplatform_v1_generated_IndexService_CreateIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_service.delete_index.js b/samples/generated/v1/index_service.delete_index.js deleted file mode 100644 index 40781b02..00000000 --- a/samples/generated/v1/index_service.delete_index.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_IndexService_DeleteIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Index resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/indexes/{index}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callDeleteIndex() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteIndex(); - // [END aiplatform_v1_generated_IndexService_DeleteIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_service.get_index.js b/samples/generated/v1/index_service.get_index.js deleted file mode 100644 index 8f746f02..00000000 --- a/samples/generated/v1/index_service.get_index.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_IndexService_GetIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Index resource. - * Format: - * `projects/{project}/locations/{location}/indexes/{index}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callGetIndex() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getIndex(request); - console.log(response); - } - - callGetIndex(); - // [END aiplatform_v1_generated_IndexService_GetIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_service.list_indexes.js b/samples/generated/v1/index_service.list_indexes.js deleted file mode 100644 index bc39d123..00000000 --- a/samples/generated/v1/index_service.list_indexes.js +++ /dev/null @@ -1,83 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_IndexService_ListIndexes_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location from which to list the Indexes. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListIndexesResponse.next_page_token google.cloud.aiplatform.v1.ListIndexesResponse.next_page_token of the previous - * IndexService.ListIndexes google.cloud.aiplatform.v1.IndexService.ListIndexes call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callListIndexes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listIndexesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListIndexes(); - // [END aiplatform_v1_generated_IndexService_ListIndexes_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_service.remove_datapoints.js b/samples/generated/v1/index_service.remove_datapoints.js deleted file mode 100644 index e4fc9bbb..00000000 --- a/samples/generated/v1/index_service.remove_datapoints.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(index) { - // [START aiplatform_v1_generated_IndexService_RemoveDatapoints_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Index resource to be updated. - * Format: - * `projects/{project}/locations/{location}/indexes/{index}` - */ - // const index = 'abc123' - /** - * A list of datapoint ids to be deleted. - */ - // const datapointIds = 'abc123' - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callRemoveDatapoints() { - // Construct request - const request = { - index, - }; - - // Run request - const response = await aiplatformClient.removeDatapoints(request); - console.log(response); - } - - callRemoveDatapoints(); - // [END aiplatform_v1_generated_IndexService_RemoveDatapoints_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_service.update_index.js b/samples/generated/v1/index_service.update_index.js deleted file mode 100644 index 0cc48da6..00000000 --- a/samples/generated/v1/index_service.update_index.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(index) { - // [START aiplatform_v1_generated_IndexService_UpdateIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Index which updates the resource on the server. - */ - // const index = {} - /** - * The update mask applies to the resource. - * For the `FieldMask` definition, see google.protobuf.FieldMask google.protobuf.FieldMask. - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callUpdateIndex() { - // Construct request - const request = { - index, - }; - - // Run request - const [operation] = await aiplatformClient.updateIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateIndex(); - // [END aiplatform_v1_generated_IndexService_UpdateIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/index_service.upsert_datapoints.js b/samples/generated/v1/index_service.upsert_datapoints.js deleted file mode 100644 index 4e8ce557..00000000 --- a/samples/generated/v1/index_service.upsert_datapoints.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(index) { - // [START aiplatform_v1_generated_IndexService_UpsertDatapoints_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Index resource to be updated. - * Format: - * `projects/{project}/locations/{location}/indexes/{index}` - */ - // const index = 'abc123' - /** - * A list of datapoints to be created/updated. - */ - // const datapoints = 1234 - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callUpsertDatapoints() { - // Construct request - const request = { - index, - }; - - // Run request - const response = await aiplatformClient.upsertDatapoints(request); - console.log(response); - } - - callUpsertDatapoints(); - // [END aiplatform_v1_generated_IndexService_UpsertDatapoints_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.cancel_batch_prediction_job.js b/samples/generated/v1/job_service.cancel_batch_prediction_job.js deleted file mode 100644 index 06f335e2..00000000 --- a/samples/generated/v1/job_service.cancel_batch_prediction_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_CancelBatchPredictionJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the BatchPredictionJob to cancel. - * Format: - * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCancelBatchPredictionJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelBatchPredictionJob(request); - console.log(response); - } - - callCancelBatchPredictionJob(); - // [END aiplatform_v1_generated_JobService_CancelBatchPredictionJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.cancel_custom_job.js b/samples/generated/v1/job_service.cancel_custom_job.js deleted file mode 100644 index 146ab7d1..00000000 --- a/samples/generated/v1/job_service.cancel_custom_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_CancelCustomJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the CustomJob to cancel. - * Format: - * `projects/{project}/locations/{location}/customJobs/{custom_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCancelCustomJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelCustomJob(request); - console.log(response); - } - - callCancelCustomJob(); - // [END aiplatform_v1_generated_JobService_CancelCustomJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.cancel_data_labeling_job.js b/samples/generated/v1/job_service.cancel_data_labeling_job.js deleted file mode 100644 index 8b3cf916..00000000 --- a/samples/generated/v1/job_service.cancel_data_labeling_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_CancelDataLabelingJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the DataLabelingJob. - * Format: - * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCancelDataLabelingJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelDataLabelingJob(request); - console.log(response); - } - - callCancelDataLabelingJob(); - // [END aiplatform_v1_generated_JobService_CancelDataLabelingJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.cancel_hyperparameter_tuning_job.js b/samples/generated/v1/job_service.cancel_hyperparameter_tuning_job.js deleted file mode 100644 index d22114a6..00000000 --- a/samples/generated/v1/job_service.cancel_hyperparameter_tuning_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_CancelHyperparameterTuningJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the HyperparameterTuningJob to cancel. - * Format: - * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCancelHyperparameterTuningJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelHyperparameterTuningJob(request); - console.log(response); - } - - callCancelHyperparameterTuningJob(); - // [END aiplatform_v1_generated_JobService_CancelHyperparameterTuningJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.create_batch_prediction_job.js b/samples/generated/v1/job_service.create_batch_prediction_job.js deleted file mode 100644 index 1b16ec02..00000000 --- a/samples/generated/v1/job_service.create_batch_prediction_job.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, batchPredictionJob) { - // [START aiplatform_v1_generated_JobService_CreateBatchPredictionJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the BatchPredictionJob in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The BatchPredictionJob to create. - */ - // const batchPredictionJob = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCreateBatchPredictionJob() { - // Construct request - const request = { - parent, - batchPredictionJob, - }; - - // Run request - const response = await aiplatformClient.createBatchPredictionJob(request); - console.log(response); - } - - callCreateBatchPredictionJob(); - // [END aiplatform_v1_generated_JobService_CreateBatchPredictionJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.create_custom_job.js b/samples/generated/v1/job_service.create_custom_job.js deleted file mode 100644 index 51ebeba2..00000000 --- a/samples/generated/v1/job_service.create_custom_job.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, customJob) { - // [START aiplatform_v1_generated_JobService_CreateCustomJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the CustomJob in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The CustomJob to create. - */ - // const customJob = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCreateCustomJob() { - // Construct request - const request = { - parent, - customJob, - }; - - // Run request - const response = await aiplatformClient.createCustomJob(request); - console.log(response); - } - - callCreateCustomJob(); - // [END aiplatform_v1_generated_JobService_CreateCustomJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.create_data_labeling_job.js b/samples/generated/v1/job_service.create_data_labeling_job.js deleted file mode 100644 index df0d4bc1..00000000 --- a/samples/generated/v1/job_service.create_data_labeling_job.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, dataLabelingJob) { - // [START aiplatform_v1_generated_JobService_CreateDataLabelingJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent of the DataLabelingJob. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The DataLabelingJob to create. - */ - // const dataLabelingJob = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCreateDataLabelingJob() { - // Construct request - const request = { - parent, - dataLabelingJob, - }; - - // Run request - const response = await aiplatformClient.createDataLabelingJob(request); - console.log(response); - } - - callCreateDataLabelingJob(); - // [END aiplatform_v1_generated_JobService_CreateDataLabelingJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.create_hyperparameter_tuning_job.js b/samples/generated/v1/job_service.create_hyperparameter_tuning_job.js deleted file mode 100644 index 537ed99c..00000000 --- a/samples/generated/v1/job_service.create_hyperparameter_tuning_job.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, hyperparameterTuningJob) { - // [START aiplatform_v1_generated_JobService_CreateHyperparameterTuningJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the HyperparameterTuningJob in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The HyperparameterTuningJob to create. - */ - // const hyperparameterTuningJob = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCreateHyperparameterTuningJob() { - // Construct request - const request = { - parent, - hyperparameterTuningJob, - }; - - // Run request - const response = await aiplatformClient.createHyperparameterTuningJob(request); - console.log(response); - } - - callCreateHyperparameterTuningJob(); - // [END aiplatform_v1_generated_JobService_CreateHyperparameterTuningJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.create_model_deployment_monitoring_job.js b/samples/generated/v1/job_service.create_model_deployment_monitoring_job.js deleted file mode 100644 index 362a1d9e..00000000 --- a/samples/generated/v1/job_service.create_model_deployment_monitoring_job.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, modelDeploymentMonitoringJob) { - // [START aiplatform_v1_generated_JobService_CreateModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent of the ModelDeploymentMonitoringJob. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The ModelDeploymentMonitoringJob to create - */ - // const modelDeploymentMonitoringJob = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCreateModelDeploymentMonitoringJob() { - // Construct request - const request = { - parent, - modelDeploymentMonitoringJob, - }; - - // Run request - const response = await aiplatformClient.createModelDeploymentMonitoringJob(request); - console.log(response); - } - - callCreateModelDeploymentMonitoringJob(); - // [END aiplatform_v1_generated_JobService_CreateModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.delete_batch_prediction_job.js b/samples/generated/v1/job_service.delete_batch_prediction_job.js deleted file mode 100644 index 4a35d1b0..00000000 --- a/samples/generated/v1/job_service.delete_batch_prediction_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_DeleteBatchPredictionJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the BatchPredictionJob resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callDeleteBatchPredictionJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteBatchPredictionJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteBatchPredictionJob(); - // [END aiplatform_v1_generated_JobService_DeleteBatchPredictionJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.delete_custom_job.js b/samples/generated/v1/job_service.delete_custom_job.js deleted file mode 100644 index 72f14f66..00000000 --- a/samples/generated/v1/job_service.delete_custom_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_DeleteCustomJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the CustomJob resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/customJobs/{custom_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callDeleteCustomJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteCustomJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteCustomJob(); - // [END aiplatform_v1_generated_JobService_DeleteCustomJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.delete_data_labeling_job.js b/samples/generated/v1/job_service.delete_data_labeling_job.js deleted file mode 100644 index 7df44262..00000000 --- a/samples/generated/v1/job_service.delete_data_labeling_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_DeleteDataLabelingJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the DataLabelingJob to be deleted. - * Format: - * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callDeleteDataLabelingJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteDataLabelingJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDataLabelingJob(); - // [END aiplatform_v1_generated_JobService_DeleteDataLabelingJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.delete_hyperparameter_tuning_job.js b/samples/generated/v1/job_service.delete_hyperparameter_tuning_job.js deleted file mode 100644 index 6b934dcc..00000000 --- a/samples/generated/v1/job_service.delete_hyperparameter_tuning_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_DeleteHyperparameterTuningJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the HyperparameterTuningJob resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callDeleteHyperparameterTuningJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteHyperparameterTuningJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteHyperparameterTuningJob(); - // [END aiplatform_v1_generated_JobService_DeleteHyperparameterTuningJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.delete_model_deployment_monitoring_job.js b/samples/generated/v1/job_service.delete_model_deployment_monitoring_job.js deleted file mode 100644 index ce3e2d8f..00000000 --- a/samples/generated/v1/job_service.delete_model_deployment_monitoring_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_DeleteModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the model monitoring job to delete. - * Format: - * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callDeleteModelDeploymentMonitoringJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteModelDeploymentMonitoringJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteModelDeploymentMonitoringJob(); - // [END aiplatform_v1_generated_JobService_DeleteModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.get_batch_prediction_job.js b/samples/generated/v1/job_service.get_batch_prediction_job.js deleted file mode 100644 index d006e476..00000000 --- a/samples/generated/v1/job_service.get_batch_prediction_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_GetBatchPredictionJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the BatchPredictionJob resource. - * Format: - * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callGetBatchPredictionJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getBatchPredictionJob(request); - console.log(response); - } - - callGetBatchPredictionJob(); - // [END aiplatform_v1_generated_JobService_GetBatchPredictionJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.get_custom_job.js b/samples/generated/v1/job_service.get_custom_job.js deleted file mode 100644 index 7a270254..00000000 --- a/samples/generated/v1/job_service.get_custom_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_GetCustomJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the CustomJob resource. - * Format: - * `projects/{project}/locations/{location}/customJobs/{custom_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callGetCustomJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getCustomJob(request); - console.log(response); - } - - callGetCustomJob(); - // [END aiplatform_v1_generated_JobService_GetCustomJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.get_data_labeling_job.js b/samples/generated/v1/job_service.get_data_labeling_job.js deleted file mode 100644 index 6968b5ff..00000000 --- a/samples/generated/v1/job_service.get_data_labeling_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_GetDataLabelingJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the DataLabelingJob. - * Format: - * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callGetDataLabelingJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getDataLabelingJob(request); - console.log(response); - } - - callGetDataLabelingJob(); - // [END aiplatform_v1_generated_JobService_GetDataLabelingJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.get_hyperparameter_tuning_job.js b/samples/generated/v1/job_service.get_hyperparameter_tuning_job.js deleted file mode 100644 index 3e2455ae..00000000 --- a/samples/generated/v1/job_service.get_hyperparameter_tuning_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_GetHyperparameterTuningJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the HyperparameterTuningJob resource. - * Format: - * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callGetHyperparameterTuningJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getHyperparameterTuningJob(request); - console.log(response); - } - - callGetHyperparameterTuningJob(); - // [END aiplatform_v1_generated_JobService_GetHyperparameterTuningJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.get_model_deployment_monitoring_job.js b/samples/generated/v1/job_service.get_model_deployment_monitoring_job.js deleted file mode 100644 index 10bc1e05..00000000 --- a/samples/generated/v1/job_service.get_model_deployment_monitoring_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_GetModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the ModelDeploymentMonitoringJob. - * Format: - * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callGetModelDeploymentMonitoringJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getModelDeploymentMonitoringJob(request); - console.log(response); - } - - callGetModelDeploymentMonitoringJob(); - // [END aiplatform_v1_generated_JobService_GetModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.list_batch_prediction_jobs.js b/samples/generated/v1/job_service.list_batch_prediction_jobs.js deleted file mode 100644 index 8b024535..00000000 --- a/samples/generated/v1/job_service.list_batch_prediction_jobs.js +++ /dev/null @@ -1,99 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_JobService_ListBatchPredictionJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the BatchPredictionJobs - * from. Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `model_display_name` supports `=`, `!=` comparisons. - * * `state` supports `=`, `!=` comparisons. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` - * * `state!="JOB_STATE_FAILED" OR display_name="my_job"` - * * `NOT display_name="my_job"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `labels.keyA=valueA` - * * `labels.keyB:*` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListBatchPredictionJobsResponse.next_page_token google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token of the previous - * JobService.ListBatchPredictionJobs google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callListBatchPredictionJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listBatchPredictionJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListBatchPredictionJobs(); - // [END aiplatform_v1_generated_JobService_ListBatchPredictionJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.list_custom_jobs.js b/samples/generated/v1/job_service.list_custom_jobs.js deleted file mode 100644 index 3e0b9855..00000000 --- a/samples/generated/v1/job_service.list_custom_jobs.js +++ /dev/null @@ -1,98 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_JobService_ListCustomJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the CustomJobs from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `state` supports `=`, `!=` comparisons. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` - * * `state!="JOB_STATE_FAILED" OR display_name="my_job"` - * * `NOT display_name="my_job"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `labels.keyA=valueA` - * * `labels.keyB:*` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListCustomJobsResponse.next_page_token google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token of the previous - * JobService.ListCustomJobs google.cloud.aiplatform.v1.JobService.ListCustomJobs call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callListCustomJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listCustomJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListCustomJobs(); - // [END aiplatform_v1_generated_JobService_ListCustomJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.list_data_labeling_jobs.js b/samples/generated/v1/job_service.list_data_labeling_jobs.js deleted file mode 100644 index 35104fac..00000000 --- a/samples/generated/v1/job_service.list_data_labeling_jobs.js +++ /dev/null @@ -1,104 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_JobService_ListDataLabelingJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent of the DataLabelingJob. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `state` supports `=`, `!=` comparisons. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` - * * `state!="JOB_STATE_FAILED" OR display_name="my_job"` - * * `NOT display_name="my_job"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `labels.keyA=valueA` - * * `labels.keyB:*` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. FieldMask represents a set of - * symbolic field paths. For example, the mask can be `paths: "name"`. The - * "name" here is a field in DataLabelingJob. - * If this field is not set, all fields of the DataLabelingJob are returned. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order by - * default. - * Use `desc` after a field name for descending. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callListDataLabelingJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listDataLabelingJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDataLabelingJobs(); - // [END aiplatform_v1_generated_JobService_ListDataLabelingJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.list_hyperparameter_tuning_jobs.js b/samples/generated/v1/job_service.list_hyperparameter_tuning_jobs.js deleted file mode 100644 index db8c9721..00000000 --- a/samples/generated/v1/job_service.list_hyperparameter_tuning_jobs.js +++ /dev/null @@ -1,98 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_JobService_ListHyperparameterTuningJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the HyperparameterTuningJobs - * from. Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `state` supports `=`, `!=` comparisons. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` - * * `state!="JOB_STATE_FAILED" OR display_name="my_job"` - * * `NOT display_name="my_job"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `labels.keyA=valueA` - * * `labels.keyB:*` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListHyperparameterTuningJobsResponse.next_page_token google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token of the previous - * JobService.ListHyperparameterTuningJobs google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callListHyperparameterTuningJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listHyperparameterTuningJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListHyperparameterTuningJobs(); - // [END aiplatform_v1_generated_JobService_ListHyperparameterTuningJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.list_model_deployment_monitoring_jobs.js b/samples/generated/v1/job_service.list_model_deployment_monitoring_jobs.js deleted file mode 100644 index d85e8b3e..00000000 --- a/samples/generated/v1/job_service.list_model_deployment_monitoring_jobs.js +++ /dev/null @@ -1,95 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_JobService_ListModelDeploymentMonitoringJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent of the ModelDeploymentMonitoringJob. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `state` supports `=`, `!=` comparisons. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` - * * `state!="JOB_STATE_FAILED" OR display_name="my_job"` - * * `NOT display_name="my_job"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `labels.keyA=valueA` - * * `labels.keyB:*` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read - */ - // const readMask = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callListModelDeploymentMonitoringJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listModelDeploymentMonitoringJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListModelDeploymentMonitoringJobs(); - // [END aiplatform_v1_generated_JobService_ListModelDeploymentMonitoringJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.pause_model_deployment_monitoring_job.js b/samples/generated/v1/job_service.pause_model_deployment_monitoring_job.js deleted file mode 100644 index 2007cdeb..00000000 --- a/samples/generated/v1/job_service.pause_model_deployment_monitoring_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_PauseModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the ModelDeploymentMonitoringJob to pause. - * Format: - * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callPauseModelDeploymentMonitoringJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.pauseModelDeploymentMonitoringJob(request); - console.log(response); - } - - callPauseModelDeploymentMonitoringJob(); - // [END aiplatform_v1_generated_JobService_PauseModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.resume_model_deployment_monitoring_job.js b/samples/generated/v1/job_service.resume_model_deployment_monitoring_job.js deleted file mode 100644 index 06a80f59..00000000 --- a/samples/generated/v1/job_service.resume_model_deployment_monitoring_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_JobService_ResumeModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the ModelDeploymentMonitoringJob to resume. - * Format: - * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callResumeModelDeploymentMonitoringJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.resumeModelDeploymentMonitoringJob(request); - console.log(response); - } - - callResumeModelDeploymentMonitoringJob(); - // [END aiplatform_v1_generated_JobService_ResumeModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.search_model_deployment_monitoring_stats_anomalies.js b/samples/generated/v1/job_service.search_model_deployment_monitoring_stats_anomalies.js deleted file mode 100644 index f63ad857..00000000 --- a/samples/generated/v1/job_service.search_model_deployment_monitoring_stats_anomalies.js +++ /dev/null @@ -1,103 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(modelDeploymentMonitoringJob, deployedModelId, objectives) { - // [START aiplatform_v1_generated_JobService_SearchModelDeploymentMonitoringStatsAnomalies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. ModelDeploymentMonitoring Job resource name. - * Format: - * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - */ - // const modelDeploymentMonitoringJob = 'abc123' - /** - * Required. The DeployedModel ID of the - * ModelDeploymentMonitoringObjectiveConfig.deployed_model_id. - */ - // const deployedModelId = 'abc123' - /** - * The feature display name. If specified, only return the stats belonging to - * this feature. Format: - * ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name, - * example: "user_destination". - */ - // const featureDisplayName = 'abc123' - /** - * Required. Objectives of the stats to retrieve. - */ - // const objectives = 1234 - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * A page token received from a previous - * JobService.SearchModelDeploymentMonitoringStatsAnomalies google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies - * call. - */ - // const pageToken = 'abc123' - /** - * The earliest timestamp of stats being generated. - * If not set, indicates fetching stats till the earliest possible one. - */ - // const startTime = {} - /** - * The latest timestamp of stats being generated. - * If not set, indicates feching stats till the latest possible one. - */ - // const endTime = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callSearchModelDeploymentMonitoringStatsAnomalies() { - // Construct request - const request = { - modelDeploymentMonitoringJob, - deployedModelId, - objectives, - }; - - // Run request - const iterable = await aiplatformClient.searchModelDeploymentMonitoringStatsAnomaliesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callSearchModelDeploymentMonitoringStatsAnomalies(); - // [END aiplatform_v1_generated_JobService_SearchModelDeploymentMonitoringStatsAnomalies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/job_service.update_model_deployment_monitoring_job.js b/samples/generated/v1/job_service.update_model_deployment_monitoring_job.js deleted file mode 100644 index 0d3a751f..00000000 --- a/samples/generated/v1/job_service.update_model_deployment_monitoring_job.js +++ /dev/null @@ -1,92 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(modelDeploymentMonitoringJob, updateMask) { - // [START aiplatform_v1_generated_JobService_UpdateModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The model monitoring configuration which replaces the resource on the - * server. - */ - // const modelDeploymentMonitoringJob = {} - /** - * Required. The update mask is used to specify the fields to be overwritten in the - * ModelDeploymentMonitoringJob resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then only the non-empty fields present in the - * request will be overwritten. Set the update_mask to `*` to override all - * fields. - * For the objective config, the user can either provide the update mask for - * model_deployment_monitoring_objective_configs or any combination of its - * nested fields, such as: - * model_deployment_monitoring_objective_configs.objective_config.training_dataset. - * Updatable fields: - * * `display_name` - * * `model_deployment_monitoring_schedule_config` - * * `model_monitoring_alert_config` - * * `logging_sampling_strategy` - * * `labels` - * * `log_ttl` - * * `enable_monitoring_pipeline_logs` - * . and - * * `model_deployment_monitoring_objective_configs` - * . or - * * `model_deployment_monitoring_objective_configs.objective_config.training_dataset` - * * `model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config` - * * `model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config` - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callUpdateModelDeploymentMonitoringJob() { - // Construct request - const request = { - modelDeploymentMonitoringJob, - updateMask, - }; - - // Run request - const [operation] = await aiplatformClient.updateModelDeploymentMonitoringJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateModelDeploymentMonitoringJob(); - // [END aiplatform_v1_generated_JobService_UpdateModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.add_context_artifacts_and_executions.js b/samples/generated/v1/metadata_service.add_context_artifacts_and_executions.js deleted file mode 100644 index 6d5ca63e..00000000 --- a/samples/generated/v1/metadata_service.add_context_artifacts_and_executions.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(context) { - // [START aiplatform_v1_generated_MetadataService_AddContextArtifactsAndExecutions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Context that the Artifacts and Executions - * belong to. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const context = 'abc123' - /** - * The resource names of the Artifacts to attribute to the Context. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - */ - // const artifacts = 'abc123' - /** - * The resource names of the Executions to associate with the - * Context. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const executions = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callAddContextArtifactsAndExecutions() { - // Construct request - const request = { - context, - }; - - // Run request - const response = await aiplatformClient.addContextArtifactsAndExecutions(request); - console.log(response); - } - - callAddContextArtifactsAndExecutions(); - // [END aiplatform_v1_generated_MetadataService_AddContextArtifactsAndExecutions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.add_context_children.js b/samples/generated/v1/metadata_service.add_context_children.js deleted file mode 100644 index a9d2b920..00000000 --- a/samples/generated/v1/metadata_service.add_context_children.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(context) { - // [START aiplatform_v1_generated_MetadataService_AddContextChildren_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent Context. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const context = 'abc123' - /** - * The resource names of the child Contexts. - */ - // const childContexts = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callAddContextChildren() { - // Construct request - const request = { - context, - }; - - // Run request - const response = await aiplatformClient.addContextChildren(request); - console.log(response); - } - - callAddContextChildren(); - // [END aiplatform_v1_generated_MetadataService_AddContextChildren_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.add_execution_events.js b/samples/generated/v1/metadata_service.add_execution_events.js deleted file mode 100644 index b029b738..00000000 --- a/samples/generated/v1/metadata_service.add_execution_events.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(execution) { - // [START aiplatform_v1_generated_MetadataService_AddExecutionEvents_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Execution that the Events connect - * Artifacts with. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const execution = 'abc123' - /** - * The Events to create and add. - */ - // const events = 1234 - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callAddExecutionEvents() { - // Construct request - const request = { - execution, - }; - - // Run request - const response = await aiplatformClient.addExecutionEvents(request); - console.log(response); - } - - callAddExecutionEvents(); - // [END aiplatform_v1_generated_MetadataService_AddExecutionEvents_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.create_artifact.js b/samples/generated/v1/metadata_service.create_artifact.js deleted file mode 100644 index 68275734..00000000 --- a/samples/generated/v1/metadata_service.create_artifact.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, artifact) { - // [START aiplatform_v1_generated_MetadataService_CreateArtifact_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore where the Artifact should - * be created. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. The Artifact to create. - */ - // const artifact = {} - /** - * The {artifact} portion of the resource name with the format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - * If not provided, the Artifact's ID will be a UUID generated by the service. - * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. - * Must be unique across all Artifacts in the parent MetadataStore. (Otherwise - * the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the - * caller can't view the preexisting Artifact.) - */ - // const artifactId = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callCreateArtifact() { - // Construct request - const request = { - parent, - artifact, - }; - - // Run request - const response = await aiplatformClient.createArtifact(request); - console.log(response); - } - - callCreateArtifact(); - // [END aiplatform_v1_generated_MetadataService_CreateArtifact_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.create_context.js b/samples/generated/v1/metadata_service.create_context.js deleted file mode 100644 index bf0d9c3d..00000000 --- a/samples/generated/v1/metadata_service.create_context.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, context) { - // [START aiplatform_v1_generated_MetadataService_CreateContext_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore where the Context should be - * created. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. The Context to create. - */ - // const context = {} - /** - * The {context} portion of the resource name with the format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`. - * If not provided, the Context's ID will be a UUID generated by the service. - * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. - * Must be unique across all Contexts in the parent MetadataStore. (Otherwise - * the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the - * caller can't view the preexisting Context.) - */ - // const contextId = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callCreateContext() { - // Construct request - const request = { - parent, - context, - }; - - // Run request - const response = await aiplatformClient.createContext(request); - console.log(response); - } - - callCreateContext(); - // [END aiplatform_v1_generated_MetadataService_CreateContext_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.create_execution.js b/samples/generated/v1/metadata_service.create_execution.js deleted file mode 100644 index eb0a6ae3..00000000 --- a/samples/generated/v1/metadata_service.create_execution.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, execution) { - // [START aiplatform_v1_generated_MetadataService_CreateExecution_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore where the Execution should - * be created. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. The Execution to create. - */ - // const execution = {} - /** - * The {execution} portion of the resource name with the format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - * If not provided, the Execution's ID will be a UUID generated by the - * service. - * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. - * Must be unique across all Executions in the parent MetadataStore. - * (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED - * if the caller can't view the preexisting Execution.) - */ - // const executionId = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callCreateExecution() { - // Construct request - const request = { - parent, - execution, - }; - - // Run request - const response = await aiplatformClient.createExecution(request); - console.log(response); - } - - callCreateExecution(); - // [END aiplatform_v1_generated_MetadataService_CreateExecution_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.create_metadata_schema.js b/samples/generated/v1/metadata_service.create_metadata_schema.js deleted file mode 100644 index c1a796d9..00000000 --- a/samples/generated/v1/metadata_service.create_metadata_schema.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, metadataSchema) { - // [START aiplatform_v1_generated_MetadataService_CreateMetadataSchema_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore where the MetadataSchema should - * be created. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. The MetadataSchema to create. - */ - // const metadataSchema = {} - /** - * The {metadata_schema} portion of the resource name with the format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}` - * If not provided, the MetadataStore's ID will be a UUID generated by the - * service. - * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. - * Must be unique across all MetadataSchemas in the parent Location. - * (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED - * if the caller can't view the preexisting MetadataSchema.) - */ - // const metadataSchemaId = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callCreateMetadataSchema() { - // Construct request - const request = { - parent, - metadataSchema, - }; - - // Run request - const response = await aiplatformClient.createMetadataSchema(request); - console.log(response); - } - - callCreateMetadataSchema(); - // [END aiplatform_v1_generated_MetadataService_CreateMetadataSchema_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.create_metadata_store.js b/samples/generated/v1/metadata_service.create_metadata_store.js deleted file mode 100644 index 2767869b..00000000 --- a/samples/generated/v1/metadata_service.create_metadata_store.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, metadataStore) { - // [START aiplatform_v1_generated_MetadataService_CreateMetadataStore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location where the MetadataStore should - * be created. - * Format: `projects/{project}/locations/{location}/` - */ - // const parent = 'abc123' - /** - * Required. The MetadataStore to create. - */ - // const metadataStore = {} - /** - * The {metadatastore} portion of the resource name with the format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - * If not provided, the MetadataStore's ID will be a UUID generated by the - * service. - * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. - * Must be unique across all MetadataStores in the parent Location. - * (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED - * if the caller can't view the preexisting MetadataStore.) - */ - // const metadataStoreId = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callCreateMetadataStore() { - // Construct request - const request = { - parent, - metadataStore, - }; - - // Run request - const [operation] = await aiplatformClient.createMetadataStore(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateMetadataStore(); - // [END aiplatform_v1_generated_MetadataService_CreateMetadataStore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.delete_artifact.js b/samples/generated/v1/metadata_service.delete_artifact.js deleted file mode 100644 index 54f61b88..00000000 --- a/samples/generated/v1/metadata_service.delete_artifact.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_MetadataService_DeleteArtifact_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Artifact to delete. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - */ - // const name = 'abc123' - /** - * Optional. The etag of the Artifact to delete. - * If this is provided, it must match the server's etag. Otherwise, the - * request will fail with a FAILED_PRECONDITION. - */ - // const etag = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callDeleteArtifact() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteArtifact(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteArtifact(); - // [END aiplatform_v1_generated_MetadataService_DeleteArtifact_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.delete_context.js b/samples/generated/v1/metadata_service.delete_context.js deleted file mode 100644 index 07840fb1..00000000 --- a/samples/generated/v1/metadata_service.delete_context.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_MetadataService_DeleteContext_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Context to delete. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const name = 'abc123' - /** - * The force deletion semantics is still undefined. - * Users should not use this field. - */ - // const force = true - /** - * Optional. The etag of the Context to delete. - * If this is provided, it must match the server's etag. Otherwise, the - * request will fail with a FAILED_PRECONDITION. - */ - // const etag = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callDeleteContext() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteContext(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteContext(); - // [END aiplatform_v1_generated_MetadataService_DeleteContext_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.delete_execution.js b/samples/generated/v1/metadata_service.delete_execution.js deleted file mode 100644 index bb4423a3..00000000 --- a/samples/generated/v1/metadata_service.delete_execution.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_MetadataService_DeleteExecution_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Execution to delete. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const name = 'abc123' - /** - * Optional. The etag of the Execution to delete. - * If this is provided, it must match the server's etag. Otherwise, the - * request will fail with a FAILED_PRECONDITION. - */ - // const etag = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callDeleteExecution() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteExecution(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteExecution(); - // [END aiplatform_v1_generated_MetadataService_DeleteExecution_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.delete_metadata_store.js b/samples/generated/v1/metadata_service.delete_metadata_store.js deleted file mode 100644 index 8e547f47..00000000 --- a/samples/generated/v1/metadata_service.delete_metadata_store.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_MetadataService_DeleteMetadataStore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore to delete. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callDeleteMetadataStore() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteMetadataStore(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteMetadataStore(); - // [END aiplatform_v1_generated_MetadataService_DeleteMetadataStore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.get_artifact.js b/samples/generated/v1/metadata_service.get_artifact.js deleted file mode 100644 index d84a6aaf..00000000 --- a/samples/generated/v1/metadata_service.get_artifact.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_MetadataService_GetArtifact_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Artifact to retrieve. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callGetArtifact() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getArtifact(request); - console.log(response); - } - - callGetArtifact(); - // [END aiplatform_v1_generated_MetadataService_GetArtifact_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.get_context.js b/samples/generated/v1/metadata_service.get_context.js deleted file mode 100644 index 6f6cb2f0..00000000 --- a/samples/generated/v1/metadata_service.get_context.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_MetadataService_GetContext_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Context to retrieve. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callGetContext() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getContext(request); - console.log(response); - } - - callGetContext(); - // [END aiplatform_v1_generated_MetadataService_GetContext_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.get_execution.js b/samples/generated/v1/metadata_service.get_execution.js deleted file mode 100644 index cb12920c..00000000 --- a/samples/generated/v1/metadata_service.get_execution.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_MetadataService_GetExecution_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Execution to retrieve. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callGetExecution() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getExecution(request); - console.log(response); - } - - callGetExecution(); - // [END aiplatform_v1_generated_MetadataService_GetExecution_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.get_metadata_schema.js b/samples/generated/v1/metadata_service.get_metadata_schema.js deleted file mode 100644 index 673d1831..00000000 --- a/samples/generated/v1/metadata_service.get_metadata_schema.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_MetadataService_GetMetadataSchema_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataSchema to retrieve. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callGetMetadataSchema() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getMetadataSchema(request); - console.log(response); - } - - callGetMetadataSchema(); - // [END aiplatform_v1_generated_MetadataService_GetMetadataSchema_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.get_metadata_store.js b/samples/generated/v1/metadata_service.get_metadata_store.js deleted file mode 100644 index fbd429e3..00000000 --- a/samples/generated/v1/metadata_service.get_metadata_store.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_MetadataService_GetMetadataStore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore to retrieve. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callGetMetadataStore() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getMetadataStore(request); - console.log(response); - } - - callGetMetadataStore(); - // [END aiplatform_v1_generated_MetadataService_GetMetadataStore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.list_artifacts.js b/samples/generated/v1/metadata_service.list_artifacts.js deleted file mode 100644 index 01c231f9..00000000 --- a/samples/generated/v1/metadata_service.list_artifacts.js +++ /dev/null @@ -1,114 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_MetadataService_ListArtifacts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The MetadataStore whose Artifacts should be listed. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * The maximum number of Artifacts to return. The service may return fewer. - * Must be in range 1-1000, inclusive. Defaults to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous MetadataService.ListArtifacts google.cloud.aiplatform.v1.MetadataService.ListArtifacts - * call. Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters must match the call that - * provided the page token. (Otherwise the request will fail with - * INVALID_ARGUMENT error.) - */ - // const pageToken = 'abc123' - /** - * Filter specifying the boolean condition for the Artifacts to satisfy in - * order to be part of the result set. - * The syntax to define filter query is based on https://google.aip.dev/160. - * The supported set of filters include the following: - * * **Attribute filtering**: - * For example: `display_name = "test"`. - * Supported fields include: `name`, `display_name`, `uri`, `state`, - * `schema_title`, `create_time`, and `update_time`. - * Time fields, such as `create_time` and `update_time`, require values - * specified in RFC-3339 format. - * For example: `create_time = "2020-11-19T11:30:00-04:00"` - * * **Metadata field**: - * To filter on metadata fields use traversal operation as follows: - * `metadata..`. - * For example: `metadata.field_1.number_value = 10.0` - * * **Context based filtering**: - * To filter Artifacts based on the contexts to which they belong, use the - * function operator with the full resource name - * `in_context()`. - * For example: - * `in_context("projects//locations//metadataStores//contexts/")` - * Each of the above supported filter types can be combined together using - * logical operators (`AND` & `OR`). - * For example: `display_name = "test" AND metadata.field1.bool_value = true`. - */ - // const filter = 'abc123' - /** - * How the list of messages is ordered. Specify the values to order by and an - * ordering operation. The default sorting order is ascending. To specify - * descending order for a field, users append a " desc" suffix; for example: - * "foo desc, bar". - * Subfields are specified with a `.` character, such as foo.bar. - * see https://google.aip.dev/132#ordering for more details. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callListArtifacts() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listArtifactsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListArtifacts(); - // [END aiplatform_v1_generated_MetadataService_ListArtifacts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.list_contexts.js b/samples/generated/v1/metadata_service.list_contexts.js deleted file mode 100644 index fb467faa..00000000 --- a/samples/generated/v1/metadata_service.list_contexts.js +++ /dev/null @@ -1,117 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_MetadataService_ListContexts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The MetadataStore whose Contexts should be listed. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * The maximum number of Contexts to return. The service may return fewer. - * Must be in range 1-1000, inclusive. Defaults to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous MetadataService.ListContexts google.cloud.aiplatform.v1.MetadataService.ListContexts - * call. Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters must match the call that - * provided the page token. (Otherwise the request will fail with - * INVALID_ARGUMENT error.) - */ - // const pageToken = 'abc123' - /** - * Filter specifying the boolean condition for the Contexts to satisfy in - * order to be part of the result set. - * The syntax to define filter query is based on https://google.aip.dev/160. - * Following are the supported set of filters: - * * **Attribute filtering**: - * For example: `display_name = "test"`. - * Supported fields include: `name`, `display_name`, `schema_title`, - * `create_time`, and `update_time`. - * Time fields, such as `create_time` and `update_time`, require values - * specified in RFC-3339 format. - * For example: `create_time = "2020-11-19T11:30:00-04:00"`. - * * **Metadata field**: - * To filter on metadata fields use traversal operation as follows: - * `metadata..`. - * For example: `metadata.field_1.number_value = 10.0`. - * * **Parent Child filtering**: - * To filter Contexts based on parent-child relationship use the HAS - * operator as follows: - * ``` - * parent_contexts: - * "projects//locations//metadataStores//contexts/" - * child_contexts: - * "projects//locations//metadataStores//contexts/" - * ``` - * Each of the above supported filters can be combined together using - * logical operators (`AND` & `OR`). - * For example: `display_name = "test" AND metadata.field1.bool_value = true`. - */ - // const filter = 'abc123' - /** - * How the list of messages is ordered. Specify the values to order by and an - * ordering operation. The default sorting order is ascending. To specify - * descending order for a field, users append a " desc" suffix; for example: - * "foo desc, bar". - * Subfields are specified with a `.` character, such as foo.bar. - * see https://google.aip.dev/132#ordering for more details. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callListContexts() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listContextsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListContexts(); - // [END aiplatform_v1_generated_MetadataService_ListContexts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.list_executions.js b/samples/generated/v1/metadata_service.list_executions.js deleted file mode 100644 index 721df98b..00000000 --- a/samples/generated/v1/metadata_service.list_executions.js +++ /dev/null @@ -1,114 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_MetadataService_ListExecutions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The MetadataStore whose Executions should be listed. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * The maximum number of Executions to return. The service may return fewer. - * Must be in range 1-1000, inclusive. Defaults to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous MetadataService.ListExecutions google.cloud.aiplatform.v1.MetadataService.ListExecutions - * call. Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters must match the call that - * provided the page token. (Otherwise the request will fail with an - * INVALID_ARGUMENT error.) - */ - // const pageToken = 'abc123' - /** - * Filter specifying the boolean condition for the Executions to satisfy in - * order to be part of the result set. - * The syntax to define filter query is based on https://google.aip.dev/160. - * Following are the supported set of filters: - * * **Attribute filtering**: - * For example: `display_name = "test"`. - * Supported fields include: `name`, `display_name`, `state`, - * `schema_title`, `create_time`, and `update_time`. - * Time fields, such as `create_time` and `update_time`, require values - * specified in RFC-3339 format. - * For example: `create_time = "2020-11-19T11:30:00-04:00"`. - * * **Metadata field**: - * To filter on metadata fields use traversal operation as follows: - * `metadata..` - * For example: `metadata.field_1.number_value = 10.0` - * * **Context based filtering**: - * To filter Executions based on the contexts to which they belong use - * the function operator with the full resource name: - * `in_context()`. - * For example: - * `in_context("projects//locations//metadataStores//contexts/")` - * Each of the above supported filters can be combined together using - * logical operators (`AND` & `OR`). - * For example: `display_name = "test" AND metadata.field1.bool_value = true`. - */ - // const filter = 'abc123' - /** - * How the list of messages is ordered. Specify the values to order by and an - * ordering operation. The default sorting order is ascending. To specify - * descending order for a field, users append a " desc" suffix; for example: - * "foo desc, bar". - * Subfields are specified with a `.` character, such as foo.bar. - * see https://google.aip.dev/132#ordering for more details. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callListExecutions() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listExecutionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListExecutions(); - // [END aiplatform_v1_generated_MetadataService_ListExecutions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.list_metadata_schemas.js b/samples/generated/v1/metadata_service.list_metadata_schemas.js deleted file mode 100644 index 9d3f9726..00000000 --- a/samples/generated/v1/metadata_service.list_metadata_schemas.js +++ /dev/null @@ -1,84 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_MetadataService_ListMetadataSchemas_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The MetadataStore whose MetadataSchemas should be listed. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * The maximum number of MetadataSchemas to return. The service may return - * fewer. - * Must be in range 1-1000, inclusive. Defaults to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * MetadataService.ListMetadataSchemas google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas call. Provide this to retrieve the - * next page. - * When paginating, all other provided parameters must match the call that - * provided the page token. (Otherwise the request will fail with - * INVALID_ARGUMENT error.) - */ - // const pageToken = 'abc123' - /** - * A query to filter available MetadataSchemas for matching results. - */ - // const filter = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callListMetadataSchemas() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listMetadataSchemasAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListMetadataSchemas(); - // [END aiplatform_v1_generated_MetadataService_ListMetadataSchemas_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.list_metadata_stores.js b/samples/generated/v1/metadata_service.list_metadata_stores.js deleted file mode 100644 index ad311f16..00000000 --- a/samples/generated/v1/metadata_service.list_metadata_stores.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_MetadataService_ListMetadataStores_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Location whose MetadataStores should be listed. - * Format: - * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The maximum number of Metadata Stores to return. The service may return - * fewer. - * Must be in range 1-1000, inclusive. Defaults to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * MetadataService.ListMetadataStores google.cloud.aiplatform.v1.MetadataService.ListMetadataStores call. Provide this to retrieve the - * subsequent page. - * When paginating, all other provided parameters must match the call that - * provided the page token. (Otherwise the request will fail with - * INVALID_ARGUMENT error.) - */ - // const pageToken = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callListMetadataStores() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listMetadataStoresAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListMetadataStores(); - // [END aiplatform_v1_generated_MetadataService_ListMetadataStores_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.purge_artifacts.js b/samples/generated/v1/metadata_service.purge_artifacts.js deleted file mode 100644 index 25744524..00000000 --- a/samples/generated/v1/metadata_service.purge_artifacts.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, filter) { - // [START aiplatform_v1_generated_MetadataService_PurgeArtifacts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The metadata store to purge Artifacts from. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. A required filter matching the Artifacts to be purged. - * E.g., `update_time <= 2020-11-19T11:30:00-04:00`. - */ - // const filter = 'abc123' - /** - * Optional. Flag to indicate to actually perform the purge. - * If `force` is set to false, the method will return a sample of - * Artifact names that would be deleted. - */ - // const force = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callPurgeArtifacts() { - // Construct request - const request = { - parent, - filter, - }; - - // Run request - const [operation] = await aiplatformClient.purgeArtifacts(request); - const [response] = await operation.promise(); - console.log(response); - } - - callPurgeArtifacts(); - // [END aiplatform_v1_generated_MetadataService_PurgeArtifacts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.purge_contexts.js b/samples/generated/v1/metadata_service.purge_contexts.js deleted file mode 100644 index 4ec1aef6..00000000 --- a/samples/generated/v1/metadata_service.purge_contexts.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, filter) { - // [START aiplatform_v1_generated_MetadataService_PurgeContexts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The metadata store to purge Contexts from. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. A required filter matching the Contexts to be purged. - * E.g., `update_time <= 2020-11-19T11:30:00-04:00`. - */ - // const filter = 'abc123' - /** - * Optional. Flag to indicate to actually perform the purge. - * If `force` is set to false, the method will return a sample of - * Context names that would be deleted. - */ - // const force = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callPurgeContexts() { - // Construct request - const request = { - parent, - filter, - }; - - // Run request - const [operation] = await aiplatformClient.purgeContexts(request); - const [response] = await operation.promise(); - console.log(response); - } - - callPurgeContexts(); - // [END aiplatform_v1_generated_MetadataService_PurgeContexts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.purge_executions.js b/samples/generated/v1/metadata_service.purge_executions.js deleted file mode 100644 index f33acefe..00000000 --- a/samples/generated/v1/metadata_service.purge_executions.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, filter) { - // [START aiplatform_v1_generated_MetadataService_PurgeExecutions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The metadata store to purge Executions from. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. A required filter matching the Executions to be purged. - * E.g., `update_time <= 2020-11-19T11:30:00-04:00`. - */ - // const filter = 'abc123' - /** - * Optional. Flag to indicate to actually perform the purge. - * If `force` is set to false, the method will return a sample of - * Execution names that would be deleted. - */ - // const force = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callPurgeExecutions() { - // Construct request - const request = { - parent, - filter, - }; - - // Run request - const [operation] = await aiplatformClient.purgeExecutions(request); - const [response] = await operation.promise(); - console.log(response); - } - - callPurgeExecutions(); - // [END aiplatform_v1_generated_MetadataService_PurgeExecutions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js b/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js deleted file mode 100644 index 267069f3..00000000 --- a/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js +++ /dev/null @@ -1,96 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(artifact) { - // [START aiplatform_v1_generated_MetadataService_QueryArtifactLineageSubgraph_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Artifact whose Lineage needs to be retrieved as a - * LineageSubgraph. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - * The request may error with FAILED_PRECONDITION if the number of Artifacts, - * the number of Executions, or the number of Events that would be returned - * for the Context exceeds 1000. - */ - // const artifact = 'abc123' - /** - * Specifies the size of the lineage graph in terms of number of hops from the - * specified artifact. - * Negative Value: INVALID_ARGUMENT error is returned - * 0: Only input artifact is returned. - * No value: Transitive closure is performed to return the complete graph. - */ - // const maxHops = 1234 - /** - * Filter specifying the boolean condition for the Artifacts to satisfy in - * order to be part of the Lineage Subgraph. - * The syntax to define filter query is based on https://google.aip.dev/160. - * The supported set of filters include the following: - * * **Attribute filtering**: - * For example: `display_name = "test"` - * Supported fields include: `name`, `display_name`, `uri`, `state`, - * `schema_title`, `create_time`, and `update_time`. - * Time fields, such as `create_time` and `update_time`, require values - * specified in RFC-3339 format. - * For example: `create_time = "2020-11-19T11:30:00-04:00"` - * * **Metadata field**: - * To filter on metadata fields use traversal operation as follows: - * `metadata..`. - * For example: `metadata.field_1.number_value = 10.0` - * Each of the above supported filter types can be combined together using - * logical operators (`AND` & `OR`). - * For example: `display_name = "test" AND metadata.field1.bool_value = true`. - */ - // const filter = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callQueryArtifactLineageSubgraph() { - // Construct request - const request = { - artifact, - }; - - // Run request - const response = await aiplatformClient.queryArtifactLineageSubgraph(request); - console.log(response); - } - - callQueryArtifactLineageSubgraph(); - // [END aiplatform_v1_generated_MetadataService_QueryArtifactLineageSubgraph_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.query_context_lineage_subgraph.js b/samples/generated/v1/metadata_service.query_context_lineage_subgraph.js deleted file mode 100644 index d220da30..00000000 --- a/samples/generated/v1/metadata_service.query_context_lineage_subgraph.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(context) { - // [START aiplatform_v1_generated_MetadataService_QueryContextLineageSubgraph_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Context whose Artifacts and Executions - * should be retrieved as a LineageSubgraph. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - * The request may error with FAILED_PRECONDITION if the number of Artifacts, - * the number of Executions, or the number of Events that would be returned - * for the Context exceeds 1000. - */ - // const context = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callQueryContextLineageSubgraph() { - // Construct request - const request = { - context, - }; - - // Run request - const response = await aiplatformClient.queryContextLineageSubgraph(request); - console.log(response); - } - - callQueryContextLineageSubgraph(); - // [END aiplatform_v1_generated_MetadataService_QueryContextLineageSubgraph_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.query_execution_inputs_and_outputs.js b/samples/generated/v1/metadata_service.query_execution_inputs_and_outputs.js deleted file mode 100644 index f26601d3..00000000 --- a/samples/generated/v1/metadata_service.query_execution_inputs_and_outputs.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(execution) { - // [START aiplatform_v1_generated_MetadataService_QueryExecutionInputsAndOutputs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Execution whose input and output Artifacts should - * be retrieved as a LineageSubgraph. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const execution = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callQueryExecutionInputsAndOutputs() { - // Construct request - const request = { - execution, - }; - - // Run request - const response = await aiplatformClient.queryExecutionInputsAndOutputs(request); - console.log(response); - } - - callQueryExecutionInputsAndOutputs(); - // [END aiplatform_v1_generated_MetadataService_QueryExecutionInputsAndOutputs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.remove_context_children.js b/samples/generated/v1/metadata_service.remove_context_children.js deleted file mode 100644 index be6ef239..00000000 --- a/samples/generated/v1/metadata_service.remove_context_children.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(context) { - // [START aiplatform_v1_generated_MetadataService_RemoveContextChildren_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent Context. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const context = 'abc123' - /** - * The resource names of the child Contexts. - */ - // const childContexts = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callRemoveContextChildren() { - // Construct request - const request = { - context, - }; - - // Run request - const response = await aiplatformClient.removeContextChildren(request); - console.log(response); - } - - callRemoveContextChildren(); - // [END aiplatform_v1_generated_MetadataService_RemoveContextChildren_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.update_artifact.js b/samples/generated/v1/metadata_service.update_artifact.js deleted file mode 100644 index b448b66b..00000000 --- a/samples/generated/v1/metadata_service.update_artifact.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(artifact) { - // [START aiplatform_v1_generated_MetadataService_UpdateArtifact_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Artifact containing updates. - * The Artifact's Artifact.name google.cloud.aiplatform.v1.Artifact.name field is used to identify the Artifact to - * be updated. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - */ - // const artifact = {} - /** - * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. - */ - // const updateMask = {} - /** - * If set to true, and the Artifact google.cloud.aiplatform.v1.Artifact is not found, a new Artifact google.cloud.aiplatform.v1.Artifact is - * created. - */ - // const allowMissing = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callUpdateArtifact() { - // Construct request - const request = { - artifact, - }; - - // Run request - const response = await aiplatformClient.updateArtifact(request); - console.log(response); - } - - callUpdateArtifact(); - // [END aiplatform_v1_generated_MetadataService_UpdateArtifact_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.update_context.js b/samples/generated/v1/metadata_service.update_context.js deleted file mode 100644 index d1f592fa..00000000 --- a/samples/generated/v1/metadata_service.update_context.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(context) { - // [START aiplatform_v1_generated_MetadataService_UpdateContext_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Context containing updates. - * The Context's Context.name google.cloud.aiplatform.v1.Context.name field is used to identify the Context to be - * updated. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const context = {} - /** - * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. - */ - // const updateMask = {} - /** - * If set to true, and the Context google.cloud.aiplatform.v1.Context is not found, a new Context google.cloud.aiplatform.v1.Context is - * created. - */ - // const allowMissing = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callUpdateContext() { - // Construct request - const request = { - context, - }; - - // Run request - const response = await aiplatformClient.updateContext(request); - console.log(response); - } - - callUpdateContext(); - // [END aiplatform_v1_generated_MetadataService_UpdateContext_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/metadata_service.update_execution.js b/samples/generated/v1/metadata_service.update_execution.js deleted file mode 100644 index be8ad363..00000000 --- a/samples/generated/v1/metadata_service.update_execution.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(execution) { - // [START aiplatform_v1_generated_MetadataService_UpdateExecution_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Execution containing updates. - * The Execution's Execution.name google.cloud.aiplatform.v1.Execution.name field is used to identify the Execution - * to be updated. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const execution = {} - /** - * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. - */ - // const updateMask = {} - /** - * If set to true, and the Execution google.cloud.aiplatform.v1.Execution is not found, a new Execution google.cloud.aiplatform.v1.Execution - * is created. - */ - // const allowMissing = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callUpdateExecution() { - // Construct request - const request = { - execution, - }; - - // Run request - const response = await aiplatformClient.updateExecution(request); - console.log(response); - } - - callUpdateExecution(); - // [END aiplatform_v1_generated_MetadataService_UpdateExecution_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/migration_service.batch_migrate_resources.js b/samples/generated/v1/migration_service.batch_migrate_resources.js deleted file mode 100644 index 54ae5c5d..00000000 --- a/samples/generated/v1/migration_service.batch_migrate_resources.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, migrateResourceRequests) { - // [START aiplatform_v1_generated_MigrationService_BatchMigrateResources_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The location of the migrated resource will live in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The request messages specifying the resources to migrate. - * They must be in the same location as the destination. - * Up to 50 resources can be migrated in one batch. - */ - // const migrateResourceRequests = 1234 - - // Imports the Aiplatform library - const {MigrationServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MigrationServiceClient(); - - async function callBatchMigrateResources() { - // Construct request - const request = { - parent, - migrateResourceRequests, - }; - - // Run request - const [operation] = await aiplatformClient.batchMigrateResources(request); - const [response] = await operation.promise(); - console.log(response); - } - - callBatchMigrateResources(); - // [END aiplatform_v1_generated_MigrationService_BatchMigrateResources_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/migration_service.search_migratable_resources.js b/samples/generated/v1/migration_service.search_migratable_resources.js deleted file mode 100644 index a00413f2..00000000 --- a/samples/generated/v1/migration_service.search_migratable_resources.js +++ /dev/null @@ -1,90 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_MigrationService_SearchMigratableResources_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The location that the migratable resources should be searched from. - * It's the Vertex AI location that the resources can be migrated to, not - * the resources' original location. - * Format: - * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard page size. - * The default and maximum value is 100. - */ - // const pageSize = 1234 - /** - * The standard page token. - */ - // const pageToken = 'abc123' - /** - * A filter for your search. You can use the following types of filters: - * * Resource type filters. The following strings filter for a specific type - * of MigratableResource google.cloud.aiplatform.v1.MigratableResource: - * * `ml_engine_model_version:*` - * * `automl_model:*` - * * `automl_dataset:*` - * * `data_labeling_dataset:*` - * * "Migrated or not" filters. The following strings filter for resources - * that either have or have not already been migrated: - * * `last_migrate_time:*` filters for migrated resources. - * * `NOT last_migrate_time:*` filters for not yet migrated resources. - */ - // const filter = 'abc123' - - // Imports the Aiplatform library - const {MigrationServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new MigrationServiceClient(); - - async function callSearchMigratableResources() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.searchMigratableResourcesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callSearchMigratableResources(); - // [END aiplatform_v1_generated_MigrationService_SearchMigratableResources_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.batch_import_model_evaluation_slices.js b/samples/generated/v1/model_service.batch_import_model_evaluation_slices.js deleted file mode 100644 index 9e174fdc..00000000 --- a/samples/generated/v1/model_service.batch_import_model_evaluation_slices.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, modelEvaluationSlices) { - // [START aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent ModelEvaluation resource. - * Format: - * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` - */ - // const parent = 'abc123' - /** - * Required. Model evaluation slice resource to be imported. - */ - // const modelEvaluationSlices = 1234 - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callBatchImportModelEvaluationSlices() { - // Construct request - const request = { - parent, - modelEvaluationSlices, - }; - - // Run request - const response = await aiplatformClient.batchImportModelEvaluationSlices(request); - console.log(response); - } - - callBatchImportModelEvaluationSlices(); - // [END aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.delete_model.js b/samples/generated/v1/model_service.delete_model.js deleted file mode 100644 index 15a3fd79..00000000 --- a/samples/generated/v1/model_service.delete_model.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_ModelService_DeleteModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Model resource to be deleted. - * Format: `projects/{project}/locations/{location}/models/{model}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callDeleteModel() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteModel(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteModel(); - // [END aiplatform_v1_generated_ModelService_DeleteModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.delete_model_version.js b/samples/generated/v1/model_service.delete_model_version.js deleted file mode 100644 index 333d8f96..00000000 --- a/samples/generated/v1/model_service.delete_model_version.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_ModelService_DeleteModelVersion_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the model version to be deleted, with a version ID explicitly - * included. - * Example: `projects/{project}/locations/{location}/models/{model}@1234` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callDeleteModelVersion() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteModelVersion(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteModelVersion(); - // [END aiplatform_v1_generated_ModelService_DeleteModelVersion_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.export_model.js b/samples/generated/v1/model_service.export_model.js deleted file mode 100644 index 41567d3b..00000000 --- a/samples/generated/v1/model_service.export_model.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, outputConfig) { - // [START aiplatform_v1_generated_ModelService_ExportModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Model to export. - * The resource name may contain version id or version alias to specify the - * version, if no version is specified, the default version will be exported. - */ - // const name = 'abc123' - /** - * Required. The desired output location and configuration. - */ - // const outputConfig = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callExportModel() { - // Construct request - const request = { - name, - outputConfig, - }; - - // Run request - const [operation] = await aiplatformClient.exportModel(request); - const [response] = await operation.promise(); - console.log(response); - } - - callExportModel(); - // [END aiplatform_v1_generated_ModelService_ExportModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.get_model.js b/samples/generated/v1/model_service.get_model.js deleted file mode 100644 index 1784f5e1..00000000 --- a/samples/generated/v1/model_service.get_model.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_ModelService_GetModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Model resource. - * Format: `projects/{project}/locations/{location}/models/{model}` - * In order to retrieve a specific version of the model, also provide - * the version ID or version alias. - * Example: `projects/{project}/locations/{location}/models/{model}@2` - * or - * `projects/{project}/locations/{location}/models/{model}@golden` - * If no version ID or alias is specified, the "default" version will be - * returned. The "default" version alias is created for the first version of - * the model, and can be moved to other versions later on. There will be - * exactly one default version. - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callGetModel() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getModel(request); - console.log(response); - } - - callGetModel(); - // [END aiplatform_v1_generated_ModelService_GetModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.get_model_evaluation.js b/samples/generated/v1/model_service.get_model_evaluation.js deleted file mode 100644 index 071ae0cf..00000000 --- a/samples/generated/v1/model_service.get_model_evaluation.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_ModelService_GetModelEvaluation_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the ModelEvaluation resource. - * Format: - * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callGetModelEvaluation() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getModelEvaluation(request); - console.log(response); - } - - callGetModelEvaluation(); - // [END aiplatform_v1_generated_ModelService_GetModelEvaluation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.get_model_evaluation_slice.js b/samples/generated/v1/model_service.get_model_evaluation_slice.js deleted file mode 100644 index 4c99c75e..00000000 --- a/samples/generated/v1/model_service.get_model_evaluation_slice.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_ModelService_GetModelEvaluationSlice_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the ModelEvaluationSlice resource. - * Format: - * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callGetModelEvaluationSlice() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getModelEvaluationSlice(request); - console.log(response); - } - - callGetModelEvaluationSlice(); - // [END aiplatform_v1_generated_ModelService_GetModelEvaluationSlice_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.import_model_evaluation.js b/samples/generated/v1/model_service.import_model_evaluation.js deleted file mode 100644 index 19d05d29..00000000 --- a/samples/generated/v1/model_service.import_model_evaluation.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, modelEvaluation) { - // [START aiplatform_v1_generated_ModelService_ImportModelEvaluation_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent model resource. - * Format: `projects/{project}/locations/{location}/models/{model}` - */ - // const parent = 'abc123' - /** - * Required. Model evaluation resource to be imported. - */ - // const modelEvaluation = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callImportModelEvaluation() { - // Construct request - const request = { - parent, - modelEvaluation, - }; - - // Run request - const response = await aiplatformClient.importModelEvaluation(request); - console.log(response); - } - - callImportModelEvaluation(); - // [END aiplatform_v1_generated_ModelService_ImportModelEvaluation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.list_model_evaluation_slices.js b/samples/generated/v1/model_service.list_model_evaluation_slices.js deleted file mode 100644 index d009365f..00000000 --- a/samples/generated/v1/model_service.list_model_evaluation_slices.js +++ /dev/null @@ -1,85 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_ModelService_ListModelEvaluationSlices_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices - * from. Format: - * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * * `slice.dimension` - for =. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListModelEvaluationSlicesResponse.next_page_token google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token of the previous - * ModelService.ListModelEvaluationSlices google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callListModelEvaluationSlices() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listModelEvaluationSlicesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListModelEvaluationSlices(); - // [END aiplatform_v1_generated_ModelService_ListModelEvaluationSlices_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.list_model_evaluations.js b/samples/generated/v1/model_service.list_model_evaluations.js deleted file mode 100644 index 32d43823..00000000 --- a/samples/generated/v1/model_service.list_model_evaluations.js +++ /dev/null @@ -1,83 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_ModelService_ListModelEvaluations_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Model to list the ModelEvaluations from. - * Format: `projects/{project}/locations/{location}/models/{model}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListModelEvaluationsResponse.next_page_token google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token of the previous - * ModelService.ListModelEvaluations google.cloud.aiplatform.v1.ModelService.ListModelEvaluations call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callListModelEvaluations() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listModelEvaluationsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListModelEvaluations(); - // [END aiplatform_v1_generated_ModelService_ListModelEvaluations_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.list_model_versions.js b/samples/generated/v1/model_service.list_model_versions.js deleted file mode 100644 index 487de862..00000000 --- a/samples/generated/v1/model_service.list_model_versions.js +++ /dev/null @@ -1,89 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_ModelService_ListModelVersions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the model to list versions for. - */ - // const name = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListModelVersionsResponse.next_page_token google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token of the previous - * ModelService.ListModelversions call. - */ - // const pageToken = 'abc123' - /** - * An expression for filtering the results of the request. For field names - * both snake_case and camelCase are supported. - * * `labels` supports general map functions that is: - * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence - * * A key including a space must be quoted. `labels."a key"`. - * Some examples: - * * `labels.myKey="myValue"` - */ - // const filter = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callListModelVersions() { - // Construct request - const request = { - name, - }; - - // Run request - const iterable = await aiplatformClient.listModelVersionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListModelVersions(); - // [END aiplatform_v1_generated_ModelService_ListModelVersions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.list_models.js b/samples/generated/v1/model_service.list_models.js deleted file mode 100644 index cf0a6ddb..00000000 --- a/samples/generated/v1/model_service.list_models.js +++ /dev/null @@ -1,105 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_ModelService_ListModels_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the Models from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * An expression for filtering the results of the request. For field names - * both snake_case and camelCase are supported. - * * `model` supports = and !=. `model` represents the Model ID, - * i.e. the last segment of the Model's resource name google.cloud.aiplatform.v1.Model.name. - * * `display_name` supports = and != - * * `labels` supports general map functions that is: - * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence - * * A key including a space must be quoted. `labels."a key"`. - * Some examples: - * * `model=1234` - * * `displayName="myDisplayName"` - * * `labels.myKey="myValue"` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListModelsResponse.next_page_token google.cloud.aiplatform.v1.ListModelsResponse.next_page_token of the previous - * ModelService.ListModels google.cloud.aiplatform.v1.ModelService.ListModels call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - * Supported fields: - * * `display_name` - * * `create_time` - * * `update_time` - * Example: `display_name, create_time desc`. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callListModels() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listModelsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListModels(); - // [END aiplatform_v1_generated_ModelService_ListModels_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.merge_version_aliases.js b/samples/generated/v1/model_service.merge_version_aliases.js deleted file mode 100644 index a2ea691a..00000000 --- a/samples/generated/v1/model_service.merge_version_aliases.js +++ /dev/null @@ -1,78 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, versionAliases) { - // [START aiplatform_v1_generated_ModelService_MergeVersionAliases_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the model version to merge aliases, with a version ID - * explicitly included. - * Example: `projects/{project}/locations/{location}/models/{model}@1234` - */ - // const name = 'abc123' - /** - * Required. The set of version aliases to merge. - * The alias should be at most 128 characters, and match - * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`. - * Add the `-` prefix to an alias means removing that alias from the version. - * `-` is NOT counted in the 128 characters. Example: `-golden` means removing - * the `golden` alias from the version. - * There is NO ordering in aliases, which means - * 1) The aliases returned from GetModel API might not have the exactly same - * order from this MergeVersionAliases API. 2) Adding and deleting the same - * alias in the request is not recommended, and the 2 operations will be - * cancelled out. - */ - // const versionAliases = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callMergeVersionAliases() { - // Construct request - const request = { - name, - versionAliases, - }; - - // Run request - const response = await aiplatformClient.mergeVersionAliases(request); - console.log(response); - } - - callMergeVersionAliases(); - // [END aiplatform_v1_generated_ModelService_MergeVersionAliases_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.update_model.js b/samples/generated/v1/model_service.update_model.js deleted file mode 100644 index 4e4c2721..00000000 --- a/samples/generated/v1/model_service.update_model.js +++ /dev/null @@ -1,84 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(model, updateMask) { - // [START aiplatform_v1_generated_ModelService_UpdateModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Model which replaces the resource on the server. - * When Model Versioning is enabled, the model.name will be used to determine - * whether to update the model or model version. - * 1. model.name with the @ value, e.g. models/123@1, refers to a version - * specific update. - * 2. model.name without the @ value, e.g. models/123, refers to a model - * update. - * 3. model.name with @-, e.g. models/123@-, refers to a model update. - * 4. Supported model fields: display_name, description; supported - * version-specific fields: version_description. Labels are supported in both - * scenarios. Both the model labels and the version labels are merged when a - * model is returned. When updating labels, if the request is for - * model-specific update, model label gets updated. Otherwise, version labels - * get updated. - * 5. A model name or model version name fields update mismatch will cause a - * precondition error. - * 6. One request cannot update both the model and the version fields. You - * must update them separately. - */ - // const model = {} - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see google.protobuf.FieldMask google.protobuf.FieldMask. - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callUpdateModel() { - // Construct request - const request = { - model, - updateMask, - }; - - // Run request - const response = await aiplatformClient.updateModel(request); - console.log(response); - } - - callUpdateModel(); - // [END aiplatform_v1_generated_ModelService_UpdateModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/model_service.upload_model.js b/samples/generated/v1/model_service.upload_model.js deleted file mode 100644 index d96da4f8..00000000 --- a/samples/generated/v1/model_service.upload_model.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, model) { - // [START aiplatform_v1_generated_ModelService_UploadModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location into which to upload the Model. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The resource name of the model into which to upload the version. Only - * specify this field when uploading a new version. - */ - // const parentModel = 'abc123' - /** - * Optional. The ID to use for the uploaded Model, which will become the final - * component of the model resource name. - * This value may be up to 63 characters, and valid characters are - * `[a-z0-9_-]`. The first character cannot be a number or hyphen. - */ - // const modelId = 'abc123' - /** - * Required. The Model to create. - */ - // const model = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callUploadModel() { - // Construct request - const request = { - parent, - model, - }; - - // Run request - const [operation] = await aiplatformClient.uploadModel(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUploadModel(); - // [END aiplatform_v1_generated_ModelService_UploadModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/pipeline_service.cancel_pipeline_job.js b/samples/generated/v1/pipeline_service.cancel_pipeline_job.js deleted file mode 100644 index 4b9560a9..00000000 --- a/samples/generated/v1/pipeline_service.cancel_pipeline_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_PipelineService_CancelPipelineJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the PipelineJob to cancel. - * Format: - * `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callCancelPipelineJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelPipelineJob(request); - console.log(response); - } - - callCancelPipelineJob(); - // [END aiplatform_v1_generated_PipelineService_CancelPipelineJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/pipeline_service.cancel_training_pipeline.js b/samples/generated/v1/pipeline_service.cancel_training_pipeline.js deleted file mode 100644 index 38ba30b5..00000000 --- a/samples/generated/v1/pipeline_service.cancel_training_pipeline.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_PipelineService_CancelTrainingPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TrainingPipeline to cancel. - * Format: - * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callCancelTrainingPipeline() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelTrainingPipeline(request); - console.log(response); - } - - callCancelTrainingPipeline(); - // [END aiplatform_v1_generated_PipelineService_CancelTrainingPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/pipeline_service.create_pipeline_job.js b/samples/generated/v1/pipeline_service.create_pipeline_job.js deleted file mode 100644 index 992d9784..00000000 --- a/samples/generated/v1/pipeline_service.create_pipeline_job.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, pipelineJob) { - // [START aiplatform_v1_generated_PipelineService_CreatePipelineJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the PipelineJob in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The PipelineJob to create. - */ - // const pipelineJob = {} - /** - * The ID to use for the PipelineJob, which will become the final component of - * the PipelineJob name. If not provided, an ID will be automatically - * generated. - * This value should be less than 128 characters, and valid characters - * are /[a-z][0-9]-/. - */ - // const pipelineJobId = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callCreatePipelineJob() { - // Construct request - const request = { - parent, - pipelineJob, - }; - - // Run request - const response = await aiplatformClient.createPipelineJob(request); - console.log(response); - } - - callCreatePipelineJob(); - // [END aiplatform_v1_generated_PipelineService_CreatePipelineJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/pipeline_service.create_training_pipeline.js b/samples/generated/v1/pipeline_service.create_training_pipeline.js deleted file mode 100644 index 644661d7..00000000 --- a/samples/generated/v1/pipeline_service.create_training_pipeline.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, trainingPipeline) { - // [START aiplatform_v1_generated_PipelineService_CreateTrainingPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the TrainingPipeline in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The TrainingPipeline to create. - */ - // const trainingPipeline = {} - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callCreateTrainingPipeline() { - // Construct request - const request = { - parent, - trainingPipeline, - }; - - // Run request - const response = await aiplatformClient.createTrainingPipeline(request); - console.log(response); - } - - callCreateTrainingPipeline(); - // [END aiplatform_v1_generated_PipelineService_CreateTrainingPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/pipeline_service.delete_pipeline_job.js b/samples/generated/v1/pipeline_service.delete_pipeline_job.js deleted file mode 100644 index a8a65dc2..00000000 --- a/samples/generated/v1/pipeline_service.delete_pipeline_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_PipelineService_DeletePipelineJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the PipelineJob resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callDeletePipelineJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deletePipelineJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeletePipelineJob(); - // [END aiplatform_v1_generated_PipelineService_DeletePipelineJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/pipeline_service.delete_training_pipeline.js b/samples/generated/v1/pipeline_service.delete_training_pipeline.js deleted file mode 100644 index adae4e51..00000000 --- a/samples/generated/v1/pipeline_service.delete_training_pipeline.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_PipelineService_DeleteTrainingPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TrainingPipeline resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callDeleteTrainingPipeline() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteTrainingPipeline(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTrainingPipeline(); - // [END aiplatform_v1_generated_PipelineService_DeleteTrainingPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/pipeline_service.get_pipeline_job.js b/samples/generated/v1/pipeline_service.get_pipeline_job.js deleted file mode 100644 index d73fb0d2..00000000 --- a/samples/generated/v1/pipeline_service.get_pipeline_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_PipelineService_GetPipelineJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the PipelineJob resource. - * Format: - * `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callGetPipelineJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getPipelineJob(request); - console.log(response); - } - - callGetPipelineJob(); - // [END aiplatform_v1_generated_PipelineService_GetPipelineJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/pipeline_service.get_training_pipeline.js b/samples/generated/v1/pipeline_service.get_training_pipeline.js deleted file mode 100644 index b39ea1e4..00000000 --- a/samples/generated/v1/pipeline_service.get_training_pipeline.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_PipelineService_GetTrainingPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TrainingPipeline resource. - * Format: - * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callGetTrainingPipeline() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTrainingPipeline(request); - console.log(response); - } - - callGetTrainingPipeline(); - // [END aiplatform_v1_generated_PipelineService_GetTrainingPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/pipeline_service.list_pipeline_jobs.js b/samples/generated/v1/pipeline_service.list_pipeline_jobs.js deleted file mode 100644 index 8aaef0f9..00000000 --- a/samples/generated/v1/pipeline_service.list_pipeline_jobs.js +++ /dev/null @@ -1,126 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_PipelineService_ListPipelineJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the PipelineJobs from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Lists the PipelineJobs that match the filter expression. The following - * fields are supported: - * * `pipeline_name`: Supports `=` and `!=` comparisons. - * * `display_name`: Supports `=`, `!=` comparisons, and `:` wildcard. - * * `pipeline_job_user_id`: Supports `=`, `!=` comparisons, and `:` wildcard. - * for example, can check if pipeline's display_name contains *step* by - * doing display_name:\"*step*\" - * * `state`: Supports `=` and `!=` comparisons. - * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. - * Values must be in RFC 3339 format. - * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. - * Values must be in RFC 3339 format. - * * `end_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. - * Values must be in RFC 3339 format. - * * `labels`: Supports key-value equality and key presence. - * * `template_uri`: Supports `=`, `!=` comparisons, and `:` wildcard. - * * `template_metadata.version`: Supports `=`, `!=` comparisons, and `:` - * wildcard. - * Filter expressions can be combined together using logical operators - * (`AND` & `OR`). - * For example: `pipeline_name="test" AND create_time>"2020-05-18T13:30:00Z"`. - * The syntax to define filter expression is based on - * https://google.aip.dev/160. - * Examples: - * * `create_time>"2021-05-18T00:00:00Z" OR - * update_time>"2020-05-18T00:00:00Z"` PipelineJobs created or updated - * after 2020-05-18 00:00:00 UTC. - * * `labels.env = "prod"` - * PipelineJobs with label "env" set to "prod". - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListPipelineJobsResponse.next_page_token google.cloud.aiplatform.v1.ListPipelineJobsResponse.next_page_token of the previous - * PipelineService.ListPipelineJobs google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs call. - */ - // const pageToken = 'abc123' - /** - * A comma-separated list of fields to order by. The default sort order is in - * ascending order. Use "desc" after a field name for descending. You can have - * multiple order_by fields provided e.g. "create_time desc, end_time", - * "end_time, start_time, update_time" For example, using "create_time desc, - * end_time" will order results by create time in descending order, and if - * there are multiple jobs having the same create time, order them by the end - * time in ascending order. if order_by is not specified, it will order by - * default order is create time in descending order. Supported fields: - * * `create_time` - * * `update_time` - * * `end_time` - * * `start_time` - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callListPipelineJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listPipelineJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPipelineJobs(); - // [END aiplatform_v1_generated_PipelineService_ListPipelineJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/pipeline_service.list_training_pipelines.js b/samples/generated/v1/pipeline_service.list_training_pipelines.js deleted file mode 100644 index d9eafc16..00000000 --- a/samples/generated/v1/pipeline_service.list_training_pipelines.js +++ /dev/null @@ -1,98 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_PipelineService_ListTrainingPipelines_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the TrainingPipelines from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `state` supports `=`, `!=` comparisons. - * * `training_task_definition` `=`, `!=` comparisons, and `:` wildcard. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="PIPELINE_STATE_SUCCEEDED" AND display_name:"my_pipeline_*"` - * * `state!="PIPELINE_STATE_FAILED" OR display_name="my_pipeline"` - * * `NOT display_name="my_pipeline"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `training_task_definition:"*automl_text_classification*"` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListTrainingPipelinesResponse.next_page_token google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token of the previous - * PipelineService.ListTrainingPipelines google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callListTrainingPipelines() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTrainingPipelinesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTrainingPipelines(); - // [END aiplatform_v1_generated_PipelineService_ListTrainingPipelines_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/prediction_service.explain.js b/samples/generated/v1/prediction_service.explain.js deleted file mode 100644 index b73994f7..00000000 --- a/samples/generated/v1/prediction_service.explain.js +++ /dev/null @@ -1,99 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint, instances) { - // [START aiplatform_v1_generated_PredictionService_Explain_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint requested to serve the explanation. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const endpoint = 'abc123' - /** - * Required. The instances that are the input to the explanation call. - * A DeployedModel may have an upper limit on the number of instances it - * supports per request, and when it is exceeded the explanation call errors - * in case of AutoML Models, or, in case of customer created Models, the - * behaviour is as documented by that Model. - * The schema of any single instance may be specified via Endpoint's - * DeployedModels' Model's google.cloud.aiplatform.v1.DeployedModel.model - * PredictSchemata's google.cloud.aiplatform.v1.Model.predict_schemata - * instance_schema_uri google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri. - */ - // const instances = 1234 - /** - * The parameters that govern the prediction. The schema of the parameters may - * be specified via Endpoint's DeployedModels' Model's google.cloud.aiplatform.v1.DeployedModel.model - * PredictSchemata's google.cloud.aiplatform.v1.Model.predict_schemata - * parameters_schema_uri google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri. - */ - // const parameters = {} - /** - * If specified, overrides the - * explanation_spec google.cloud.aiplatform.v1.DeployedModel.explanation_spec of the DeployedModel. - * Can be used for explaining prediction results with different - * configurations, such as: - * - Explaining top-5 predictions results as opposed to top-1; - * - Increasing path count or step count of the attribution methods to reduce - * approximate errors; - * - Using different baselines for explaining the prediction results. - */ - // const explanationSpecOverride = {} - /** - * If specified, this ExplainRequest will be served by the chosen - * DeployedModel, overriding Endpoint.traffic_split google.cloud.aiplatform.v1.Endpoint.traffic_split. - */ - // const deployedModelId = 'abc123' - - // Imports the Aiplatform library - const {PredictionServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PredictionServiceClient(); - - async function callExplain() { - // Construct request - const request = { - endpoint, - instances, - }; - - // Run request - const response = await aiplatformClient.explain(request); - console.log(response); - } - - callExplain(); - // [END aiplatform_v1_generated_PredictionService_Explain_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/prediction_service.predict.js b/samples/generated/v1/prediction_service.predict.js deleted file mode 100644 index 62de4f91..00000000 --- a/samples/generated/v1/prediction_service.predict.js +++ /dev/null @@ -1,83 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint, instances) { - // [START aiplatform_v1_generated_PredictionService_Predict_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint requested to serve the prediction. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const endpoint = 'abc123' - /** - * Required. The instances that are the input to the prediction call. - * A DeployedModel may have an upper limit on the number of instances it - * supports per request, and when it is exceeded the prediction call errors - * in case of AutoML Models, or, in case of customer created Models, the - * behaviour is as documented by that Model. - * The schema of any single instance may be specified via Endpoint's - * DeployedModels' Model's google.cloud.aiplatform.v1.DeployedModel.model - * PredictSchemata's google.cloud.aiplatform.v1.Model.predict_schemata - * instance_schema_uri google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri. - */ - // const instances = 1234 - /** - * The parameters that govern the prediction. The schema of the parameters may - * be specified via Endpoint's DeployedModels' Model's google.cloud.aiplatform.v1.DeployedModel.model - * PredictSchemata's google.cloud.aiplatform.v1.Model.predict_schemata - * parameters_schema_uri google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri. - */ - // const parameters = {} - - // Imports the Aiplatform library - const {PredictionServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PredictionServiceClient(); - - async function callPredict() { - // Construct request - const request = { - endpoint, - instances, - }; - - // Run request - const response = await aiplatformClient.predict(request); - console.log(response); - } - - callPredict(); - // [END aiplatform_v1_generated_PredictionService_Predict_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/prediction_service.raw_predict.js b/samples/generated/v1/prediction_service.raw_predict.js deleted file mode 100644 index b7ffd239..00000000 --- a/samples/generated/v1/prediction_service.raw_predict.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint) { - // [START aiplatform_v1_generated_PredictionService_RawPredict_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint requested to serve the prediction. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const endpoint = 'abc123' - /** - * The prediction input. Supports HTTP headers and arbitrary data payload. - * A DeployedModel google.cloud.aiplatform.v1.DeployedModel may have an upper limit on the number of instances it - * supports per request. When this limit it is exceeded for an AutoML model, - * the RawPredict google.cloud.aiplatform.v1.PredictionService.RawPredict method returns an error. - * When this limit is exceeded for a custom-trained model, the behavior varies - * depending on the model. - * You can specify the schema for each instance in the - * predict_schemata.instance_schema_uri google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri - * field when you create a Model google.cloud.aiplatform.v1.Model. This schema applies when you deploy the - * `Model` as a `DeployedModel` to an Endpoint google.cloud.aiplatform.v1.Endpoint and use the `RawPredict` - * method. - */ - // const httpBody = {} - - // Imports the Aiplatform library - const {PredictionServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new PredictionServiceClient(); - - async function callRawPredict() { - // Construct request - const request = { - endpoint, - }; - - // Run request - const response = await aiplatformClient.rawPredict(request); - console.log(response); - } - - callRawPredict(); - // [END aiplatform_v1_generated_PredictionService_RawPredict_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json deleted file mode 100644 index a314edf6..00000000 --- a/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ /dev/null @@ -1,8955 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-aiplatform", - "version": "2.3.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.aiplatform.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "aiplatform_v1_generated_DatasetService_CreateDataset_async", - "title": "DatasetService createDataset Sample", - "origin": "API_DEFINITION", - "description": " Creates a Dataset.", - "canonical": true, - "file": "dataset_service.create_dataset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDataset", - "fullName": "google.cloud.aiplatform.v1.DatasetService.CreateDataset", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "dataset", - "type": ".google.cloud.aiplatform.v1.Dataset" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "CreateDataset", - "fullName": "google.cloud.aiplatform.v1.DatasetService.CreateDataset", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_DatasetService_GetDataset_async", - "title": "DatasetService getDataset Sample", - "origin": "API_DEFINITION", - "description": " Gets a Dataset.", - "canonical": true, - "file": "dataset_service.get_dataset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataset", - "fullName": "google.cloud.aiplatform.v1.DatasetService.GetDataset", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Dataset", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "GetDataset", - "fullName": "google.cloud.aiplatform.v1.DatasetService.GetDataset", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_DatasetService_UpdateDataset_async", - "title": "DatasetService updateDataset Sample", - "origin": "API_DEFINITION", - "description": " Updates a Dataset.", - "canonical": true, - "file": "dataset_service.update_dataset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDataset", - "fullName": "google.cloud.aiplatform.v1.DatasetService.UpdateDataset", - "async": true, - "parameters": [ - { - "name": "dataset", - "type": ".google.cloud.aiplatform.v1.Dataset" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Dataset", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "UpdateDataset", - "fullName": "google.cloud.aiplatform.v1.DatasetService.UpdateDataset", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_DatasetService_ListDatasets_async", - "title": "DatasetService listDatasets Sample", - "origin": "API_DEFINITION", - "description": " Lists Datasets in a Location.", - "canonical": true, - "file": "dataset_service.list_datasets.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 91, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDatasets", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ListDatasets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListDatasetsResponse", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "ListDatasets", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ListDatasets", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_DatasetService_DeleteDataset_async", - "title": "DatasetService deleteDataset Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Dataset.", - "canonical": true, - "file": "dataset_service.delete_dataset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDataset", - "fullName": "google.cloud.aiplatform.v1.DatasetService.DeleteDataset", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "DeleteDataset", - "fullName": "google.cloud.aiplatform.v1.DatasetService.DeleteDataset", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_DatasetService_ImportData_async", - "title": "DatasetService importData Sample", - "origin": "API_DEFINITION", - "description": " Imports data into a Dataset.", - "canonical": true, - "file": "dataset_service.import_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportData", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ImportData", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "import_configs", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "ImportData", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ImportData", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_DatasetService_ExportData_async", - "title": "DatasetService exportData Sample", - "origin": "API_DEFINITION", - "description": " Exports data from a Dataset.", - "canonical": true, - "file": "dataset_service.export_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportData", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ExportData", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "export_config", - "type": ".google.cloud.aiplatform.v1.ExportDataConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "ExportData", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ExportData", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_DatasetService_ListDataItems_async", - "title": "DatasetService listDataItems Sample", - "origin": "API_DEFINITION", - "description": " Lists DataItems in a Dataset.", - "canonical": true, - "file": "dataset_service.list_data_items.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataItems", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ListDataItems", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListDataItemsResponse", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "ListDataItems", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ListDataItems", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_DatasetService_ListSavedQueries_async", - "title": "DatasetService listSavedQueries Sample", - "origin": "API_DEFINITION", - "description": " Lists SavedQueries in a Dataset.", - "canonical": true, - "file": "dataset_service.list_saved_queries.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSavedQueries", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ListSavedQueries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListSavedQueriesResponse", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "ListSavedQueries", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ListSavedQueries", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_DatasetService_GetAnnotationSpec_async", - "title": "DatasetService getAnnotationSpec Sample", - "origin": "API_DEFINITION", - "description": " Gets an AnnotationSpec.", - "canonical": true, - "file": "dataset_service.get_annotation_spec.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAnnotationSpec", - "fullName": "google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.AnnotationSpec", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "GetAnnotationSpec", - "fullName": "google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_DatasetService_ListAnnotations_async", - "title": "DatasetService listAnnotations Sample", - "origin": "API_DEFINITION", - "description": " Lists Annotations belongs to a dataitem", - "canonical": true, - "file": "dataset_service.list_annotations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAnnotations", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ListAnnotations", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListAnnotationsResponse", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" - }, - "method": { - "shortName": "ListAnnotations", - "fullName": "google.cloud.aiplatform.v1.DatasetService.ListAnnotations", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_EndpointService_CreateEndpoint_async", - "title": "DatasetService createEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Creates an Endpoint.", - "canonical": true, - "file": "endpoint_service.create_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEndpoint", - "fullName": "google.cloud.aiplatform.v1.EndpointService.CreateEndpoint", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "endpoint", - "type": ".google.cloud.aiplatform.v1.Endpoint" - }, - { - "name": "endpoint_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.EndpointServiceClient" - }, - "method": { - "shortName": "CreateEndpoint", - "fullName": "google.cloud.aiplatform.v1.EndpointService.CreateEndpoint", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_EndpointService_GetEndpoint_async", - "title": "DatasetService getEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Gets an Endpoint.", - "canonical": true, - "file": "endpoint_service.get_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEndpoint", - "fullName": "google.cloud.aiplatform.v1.EndpointService.GetEndpoint", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Endpoint", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.EndpointServiceClient" - }, - "method": { - "shortName": "GetEndpoint", - "fullName": "google.cloud.aiplatform.v1.EndpointService.GetEndpoint", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_EndpointService_ListEndpoints_async", - "title": "DatasetService listEndpoints Sample", - "origin": "API_DEFINITION", - "description": " Lists Endpoints in a Location.", - "canonical": true, - "file": "endpoint_service.list_endpoints.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 97, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEndpoints", - "fullName": "google.cloud.aiplatform.v1.EndpointService.ListEndpoints", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListEndpointsResponse", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.EndpointServiceClient" - }, - "method": { - "shortName": "ListEndpoints", - "fullName": "google.cloud.aiplatform.v1.EndpointService.ListEndpoints", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_EndpointService_UpdateEndpoint_async", - "title": "DatasetService updateEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Updates an Endpoint.", - "canonical": true, - "file": "endpoint_service.update_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEndpoint", - "fullName": "google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": ".google.cloud.aiplatform.v1.Endpoint" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Endpoint", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.EndpointServiceClient" - }, - "method": { - "shortName": "UpdateEndpoint", - "fullName": "google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_EndpointService_DeleteEndpoint_async", - "title": "DatasetService deleteEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Deletes an Endpoint.", - "canonical": true, - "file": "endpoint_service.delete_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEndpoint", - "fullName": "google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.EndpointServiceClient" - }, - "method": { - "shortName": "DeleteEndpoint", - "fullName": "google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_EndpointService_DeployModel_async", - "title": "DatasetService deployModel Sample", - "origin": "API_DEFINITION", - "description": " Deploys a Model into this Endpoint, creating a DeployedModel within it.", - "canonical": true, - "file": "endpoint_service.deploy_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeployModel", - "fullName": "google.cloud.aiplatform.v1.EndpointService.DeployModel", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": "TYPE_STRING" - }, - { - "name": "deployed_model", - "type": ".google.cloud.aiplatform.v1.DeployedModel" - }, - { - "name": "traffic_split", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.EndpointServiceClient" - }, - "method": { - "shortName": "DeployModel", - "fullName": "google.cloud.aiplatform.v1.EndpointService.DeployModel", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_EndpointService_UndeployModel_async", - "title": "DatasetService undeployModel Sample", - "origin": "API_DEFINITION", - "description": " Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.", - "canonical": true, - "file": "endpoint_service.undeploy_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UndeployModel", - "fullName": "google.cloud.aiplatform.v1.EndpointService.UndeployModel", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": "TYPE_STRING" - }, - { - "name": "deployed_model_id", - "type": "TYPE_STRING" - }, - { - "name": "traffic_split", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.EndpointServiceClient" - }, - "method": { - "shortName": "UndeployModel", - "fullName": "google.cloud.aiplatform.v1.EndpointService.UndeployModel", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreOnlineServingService_ReadFeatureValues_async", - "title": "DatasetService readFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Reads Feature values of a specific entity of an EntityType. For reading feature values of multiple entities of an EntityType, please use StreamingReadFeatureValues.", - "canonical": true, - "file": "featurestore_online_serving_service.read_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.ReadFeatureValues", - "async": true, - "parameters": [ - { - "name": "entity_type", - "type": "TYPE_STRING" - }, - { - "name": "entity_id", - "type": "TYPE_STRING" - }, - { - "name": "feature_selector", - "type": ".google.cloud.aiplatform.v1.FeatureSelector" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ReadFeatureValuesResponse", - "client": { - "shortName": "FeaturestoreOnlineServingServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreOnlineServingServiceClient" - }, - "method": { - "shortName": "ReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.ReadFeatureValues", - "service": { - "shortName": "FeaturestoreOnlineServingService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreOnlineServingService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreOnlineServingService_StreamingReadFeatureValues_async", - "title": "DatasetService streamingReadFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Reads Feature values for multiple entities. Depending on their size, data for different entities may be broken up across multiple responses.", - "canonical": true, - "file": "featurestore_online_serving_service.streaming_read_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StreamingReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.StreamingReadFeatureValues", - "async": true, - "parameters": [ - { - "name": "entity_type", - "type": "TYPE_STRING" - }, - { - "name": "entity_ids", - "type": "TYPE_STRING[]" - }, - { - "name": "feature_selector", - "type": ".google.cloud.aiplatform.v1.FeatureSelector" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ReadFeatureValuesResponse", - "client": { - "shortName": "FeaturestoreOnlineServingServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreOnlineServingServiceClient" - }, - "method": { - "shortName": "StreamingReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.StreamingReadFeatureValues", - "service": { - "shortName": "FeaturestoreOnlineServingService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreOnlineServingService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_CreateFeaturestore_async", - "title": "DatasetService createFeaturestore Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Featurestore in a given project and location.", - "canonical": true, - "file": "featurestore_service.create_featurestore.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateFeaturestore", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.CreateFeaturestore", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "featurestore", - "type": ".google.cloud.aiplatform.v1.Featurestore" - }, - { - "name": "featurestore_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "CreateFeaturestore", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.CreateFeaturestore", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_GetFeaturestore_async", - "title": "DatasetService getFeaturestore Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Featurestore.", - "canonical": true, - "file": "featurestore_service.get_featurestore.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetFeaturestore", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.GetFeaturestore", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Featurestore", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "GetFeaturestore", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.GetFeaturestore", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_ListFeaturestores_async", - "title": "DatasetService listFeaturestores Sample", - "origin": "API_DEFINITION", - "description": " Lists Featurestores in a given project and location.", - "canonical": true, - "file": "featurestore_service.list_featurestores.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 105, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListFeaturestores", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListFeaturestoresResponse", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "ListFeaturestores", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_UpdateFeaturestore_async", - "title": "DatasetService updateFeaturestore Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single Featurestore.", - "canonical": true, - "file": "featurestore_service.update_featurestore.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateFeaturestore", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeaturestore", - "async": true, - "parameters": [ - { - "name": "featurestore", - "type": ".google.cloud.aiplatform.v1.Featurestore" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "UpdateFeaturestore", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeaturestore", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_DeleteFeaturestore_async", - "title": "DatasetService deleteFeaturestore Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single Featurestore. The Featurestore must not contain any EntityTypes or `force` must be set to true for the request to succeed.", - "canonical": true, - "file": "featurestore_service.delete_featurestore.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteFeaturestore", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeaturestore", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "DeleteFeaturestore", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeaturestore", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_CreateEntityType_async", - "title": "DatasetService createEntityType Sample", - "origin": "API_DEFINITION", - "description": " Creates a new EntityType in a given Featurestore.", - "canonical": true, - "file": "featurestore_service.create_entity_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntityType", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.CreateEntityType", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entity_type", - "type": ".google.cloud.aiplatform.v1.EntityType" - }, - { - "name": "entity_type_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "CreateEntityType", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.CreateEntityType", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_GetEntityType_async", - "title": "DatasetService getEntityType Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single EntityType.", - "canonical": true, - "file": "featurestore_service.get_entity_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntityType", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.GetEntityType", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.EntityType", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "GetEntityType", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.GetEntityType", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_ListEntityTypes_async", - "title": "DatasetService listEntityTypes Sample", - "origin": "API_DEFINITION", - "description": " Lists EntityTypes in a given Featurestore.", - "canonical": true, - "file": "featurestore_service.list_entity_types.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 104, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntityTypes", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListEntityTypesResponse", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "ListEntityTypes", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_UpdateEntityType_async", - "title": "DatasetService updateEntityType Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single EntityType.", - "canonical": true, - "file": "featurestore_service.update_entity_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntityType", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.UpdateEntityType", - "async": true, - "parameters": [ - { - "name": "entity_type", - "type": ".google.cloud.aiplatform.v1.EntityType" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.EntityType", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "UpdateEntityType", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.UpdateEntityType", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_DeleteEntityType_async", - "title": "DatasetService deleteEntityType Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single EntityType. The EntityType must not have any Features or `force` must be set to true for the request to succeed.", - "canonical": true, - "file": "featurestore_service.delete_entity_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntityType", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.DeleteEntityType", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "DeleteEntityType", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.DeleteEntityType", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_CreateFeature_async", - "title": "DatasetService createFeature Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Feature in a given EntityType.", - "canonical": true, - "file": "featurestore_service.create_feature.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateFeature", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.CreateFeature", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "feature", - "type": ".google.cloud.aiplatform.v1.Feature" - }, - { - "name": "feature_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "CreateFeature", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.CreateFeature", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_BatchCreateFeatures_async", - "title": "DatasetService batchCreateFeatures Sample", - "origin": "API_DEFINITION", - "description": " Creates a batch of Features in a given EntityType.", - "canonical": true, - "file": "featurestore_service.batch_create_features.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchCreateFeatures", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.BatchCreateFeatures", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "BatchCreateFeatures", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.BatchCreateFeatures", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_GetFeature_async", - "title": "DatasetService getFeature Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Feature.", - "canonical": true, - "file": "featurestore_service.get_feature.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetFeature", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.GetFeature", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Feature", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "GetFeature", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.GetFeature", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_ListFeatures_async", - "title": "DatasetService listFeatures Sample", - "origin": "API_DEFINITION", - "description": " Lists Features in a given EntityType.", - "canonical": true, - "file": "featurestore_service.list_features.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 114, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListFeatures", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "latest_stats_count", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListFeaturesResponse", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "ListFeatures", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_UpdateFeature_async", - "title": "DatasetService updateFeature Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single Feature.", - "canonical": true, - "file": "featurestore_service.update_feature.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateFeature", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeature", - "async": true, - "parameters": [ - { - "name": "feature", - "type": ".google.cloud.aiplatform.v1.Feature" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Feature", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "UpdateFeature", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeature", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_DeleteFeature_async", - "title": "DatasetService deleteFeature Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single Feature.", - "canonical": true, - "file": "featurestore_service.delete_feature.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteFeature", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeature", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "DeleteFeature", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeature", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_ImportFeatureValues_async", - "title": "DatasetService importFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Imports Feature values into the Featurestore from a source storage. The progress of the import is tracked by the returned operation. The imported features are guaranteed to be visible to subsequent read operations after the operation is marked as successfully done. If an import operation fails, the Feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same import request again and wait till the new operation returned is marked as successfully done. There are also scenarios where the caller can cause inconsistency. - Source data for import contains multiple distinct Feature values for the same entity ID and timestamp. - Source is modified during an import. This includes adding, updating, or removing source data and/or metadata. Examples of updating metadata include but are not limited to changing storage location, storage class, or retention policy. - Online serving cluster is under-provisioned.", - "canonical": true, - "file": "featurestore_service.import_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 106, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportFeatureValues", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues", - "async": true, - "parameters": [ - { - "name": "avro_source", - "type": ".google.cloud.aiplatform.v1.AvroSource" - }, - { - "name": "bigquery_source", - "type": ".google.cloud.aiplatform.v1.BigQuerySource" - }, - { - "name": "csv_source", - "type": ".google.cloud.aiplatform.v1.CsvSource" - }, - { - "name": "feature_time_field", - "type": "TYPE_STRING" - }, - { - "name": "feature_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "entity_type", - "type": "TYPE_STRING" - }, - { - "name": "entity_id_field", - "type": "TYPE_STRING" - }, - { - "name": "feature_specs", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "disable_online_serving", - "type": "TYPE_BOOL" - }, - { - "name": "worker_count", - "type": "TYPE_INT32" - }, - { - "name": "disable_ingestion_analysis", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "ImportFeatureValues", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_BatchReadFeatureValues_async", - "title": "DatasetService batchReadFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Batch reads Feature values from a Featurestore. This API enables batch reading Feature values, where each read instance in the batch may read Feature values of entities from one or more EntityTypes. Point-in-time correctness is guaranteed for Feature values of each read instance as of each instance's read timestamp.", - "canonical": true, - "file": "featurestore_service.batch_read_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 103, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.BatchReadFeatureValues", - "async": true, - "parameters": [ - { - "name": "csv_read_instances", - "type": ".google.cloud.aiplatform.v1.CsvSource" - }, - { - "name": "bigquery_read_instances", - "type": ".google.cloud.aiplatform.v1.BigQuerySource" - }, - { - "name": "featurestore", - "type": "TYPE_STRING" - }, - { - "name": "destination", - "type": ".google.cloud.aiplatform.v1.FeatureValueDestination" - }, - { - "name": "pass_through_fields", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "entity_type_specs", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "BatchReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.BatchReadFeatureValues", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_ExportFeatureValues_async", - "title": "DatasetService exportFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Exports Feature values from all the entities of a target EntityType.", - "canonical": true, - "file": "featurestore_service.export_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportFeatureValues", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.ExportFeatureValues", - "async": true, - "parameters": [ - { - "name": "snapshot_export", - "type": ".google.cloud.aiplatform.v1.ExportFeatureValuesRequest.SnapshotExport" - }, - { - "name": "full_export", - "type": ".google.cloud.aiplatform.v1.ExportFeatureValuesRequest.FullExport" - }, - { - "name": "entity_type", - "type": "TYPE_STRING" - }, - { - "name": "destination", - "type": ".google.cloud.aiplatform.v1.FeatureValueDestination" - }, - { - "name": "feature_selector", - "type": ".google.cloud.aiplatform.v1.FeatureSelector" - }, - { - "name": "settings", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "ExportFeatureValues", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.ExportFeatureValues", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_FeaturestoreService_SearchFeatures_async", - "title": "DatasetService searchFeatures Sample", - "origin": "API_DEFINITION", - "description": " Searches Features matching a query in a given project.", - "canonical": true, - "file": "featurestore_service.search_features.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 124, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchFeatures", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures", - "async": true, - "parameters": [ - { - "name": "location", - "type": "TYPE_STRING" - }, - { - "name": "query", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.SearchFeaturesResponse", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "SearchFeatures", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexEndpointService_CreateIndexEndpoint_async", - "title": "DatasetService createIndexEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Creates an IndexEndpoint.", - "canonical": true, - "file": "index_endpoint_service.create_index_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.CreateIndexEndpoint", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "index_endpoint", - "type": ".google.cloud.aiplatform.v1.IndexEndpoint" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "CreateIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.CreateIndexEndpoint", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexEndpointService_GetIndexEndpoint_async", - "title": "DatasetService getIndexEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Gets an IndexEndpoint.", - "canonical": true, - "file": "index_endpoint_service.get_index_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.GetIndexEndpoint", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.IndexEndpoint", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "GetIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.GetIndexEndpoint", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexEndpointService_ListIndexEndpoints_async", - "title": "DatasetService listIndexEndpoints Sample", - "origin": "API_DEFINITION", - "description": " Lists IndexEndpoints in a Location.", - "canonical": true, - "file": "index_endpoint_service.list_index_endpoints.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListIndexEndpoints", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListIndexEndpointsResponse", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "ListIndexEndpoints", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexEndpointService_UpdateIndexEndpoint_async", - "title": "DatasetService updateIndexEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Updates an IndexEndpoint.", - "canonical": true, - "file": "index_endpoint_service.update_index_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.UpdateIndexEndpoint", - "async": true, - "parameters": [ - { - "name": "index_endpoint", - "type": ".google.cloud.aiplatform.v1.IndexEndpoint" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.IndexEndpoint", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "UpdateIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.UpdateIndexEndpoint", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexEndpointService_DeleteIndexEndpoint_async", - "title": "DatasetService deleteIndexEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Deletes an IndexEndpoint.", - "canonical": true, - "file": "index_endpoint_service.delete_index_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.DeleteIndexEndpoint", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "DeleteIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.DeleteIndexEndpoint", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexEndpointService_DeployIndex_async", - "title": "DatasetService deployIndex Sample", - "origin": "API_DEFINITION", - "description": " Deploys an Index into this IndexEndpoint, creating a DeployedIndex within it. Only non-empty Indexes can be deployed.", - "canonical": true, - "file": "index_endpoint_service.deploy_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeployIndex", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex", - "async": true, - "parameters": [ - { - "name": "index_endpoint", - "type": "TYPE_STRING" - }, - { - "name": "deployed_index", - "type": ".google.cloud.aiplatform.v1.DeployedIndex" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "DeployIndex", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexEndpointService_UndeployIndex_async", - "title": "DatasetService undeployIndex Sample", - "origin": "API_DEFINITION", - "description": " Undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it, and freeing all resources it's using.", - "canonical": true, - "file": "index_endpoint_service.undeploy_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UndeployIndex", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex", - "async": true, - "parameters": [ - { - "name": "index_endpoint", - "type": "TYPE_STRING" - }, - { - "name": "deployed_index_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "UndeployIndex", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexEndpointService_MutateDeployedIndex_async", - "title": "DatasetService mutateDeployedIndex Sample", - "origin": "API_DEFINITION", - "description": " Update an existing DeployedIndex under an IndexEndpoint.", - "canonical": true, - "file": "index_endpoint_service.mutate_deployed_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "MutateDeployedIndex", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex", - "async": true, - "parameters": [ - { - "name": "index_endpoint", - "type": "TYPE_STRING" - }, - { - "name": "deployed_index", - "type": ".google.cloud.aiplatform.v1.DeployedIndex" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "MutateDeployedIndex", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexService_CreateIndex_async", - "title": "DatasetService createIndex Sample", - "origin": "API_DEFINITION", - "description": " Creates an Index.", - "canonical": true, - "file": "index_service.create_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateIndex", - "fullName": "google.cloud.aiplatform.v1.IndexService.CreateIndex", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "index", - "type": ".google.cloud.aiplatform.v1.Index" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexServiceClient" - }, - "method": { - "shortName": "CreateIndex", - "fullName": "google.cloud.aiplatform.v1.IndexService.CreateIndex", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexService_GetIndex_async", - "title": "DatasetService getIndex Sample", - "origin": "API_DEFINITION", - "description": " Gets an Index.", - "canonical": true, - "file": "index_service.get_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIndex", - "fullName": "google.cloud.aiplatform.v1.IndexService.GetIndex", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Index", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexServiceClient" - }, - "method": { - "shortName": "GetIndex", - "fullName": "google.cloud.aiplatform.v1.IndexService.GetIndex", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexService_ListIndexes_async", - "title": "DatasetService listIndexes Sample", - "origin": "API_DEFINITION", - "description": " Lists Indexes in a Location.", - "canonical": true, - "file": "index_service.list_indexes.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListIndexes", - "fullName": "google.cloud.aiplatform.v1.IndexService.ListIndexes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListIndexesResponse", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexServiceClient" - }, - "method": { - "shortName": "ListIndexes", - "fullName": "google.cloud.aiplatform.v1.IndexService.ListIndexes", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexService_UpdateIndex_async", - "title": "DatasetService updateIndex Sample", - "origin": "API_DEFINITION", - "description": " Updates an Index.", - "canonical": true, - "file": "index_service.update_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateIndex", - "fullName": "google.cloud.aiplatform.v1.IndexService.UpdateIndex", - "async": true, - "parameters": [ - { - "name": "index", - "type": ".google.cloud.aiplatform.v1.Index" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexServiceClient" - }, - "method": { - "shortName": "UpdateIndex", - "fullName": "google.cloud.aiplatform.v1.IndexService.UpdateIndex", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexService_DeleteIndex_async", - "title": "DatasetService deleteIndex Sample", - "origin": "API_DEFINITION", - "description": " Deletes an Index. An Index can only be deleted when all its [DeployedIndexes][google.cloud.aiplatform.v1.Index.deployed_indexes] had been undeployed.", - "canonical": true, - "file": "index_service.delete_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteIndex", - "fullName": "google.cloud.aiplatform.v1.IndexService.DeleteIndex", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexServiceClient" - }, - "method": { - "shortName": "DeleteIndex", - "fullName": "google.cloud.aiplatform.v1.IndexService.DeleteIndex", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexService_UpsertDatapoints_async", - "title": "DatasetService upsertDatapoints Sample", - "origin": "API_DEFINITION", - "description": " Add/update Datapoints into an Index.", - "canonical": true, - "file": "index_service.upsert_datapoints.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpsertDatapoints", - "fullName": "google.cloud.aiplatform.v1.IndexService.UpsertDatapoints", - "async": true, - "parameters": [ - { - "name": "index", - "type": "TYPE_STRING" - }, - { - "name": "datapoints", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.UpsertDatapointsResponse", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexServiceClient" - }, - "method": { - "shortName": "UpsertDatapoints", - "fullName": "google.cloud.aiplatform.v1.IndexService.UpsertDatapoints", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_IndexService_RemoveDatapoints_async", - "title": "DatasetService removeDatapoints Sample", - "origin": "API_DEFINITION", - "description": " Remove Datapoints from an Index.", - "canonical": true, - "file": "index_service.remove_datapoints.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RemoveDatapoints", - "fullName": "google.cloud.aiplatform.v1.IndexService.RemoveDatapoints", - "async": true, - "parameters": [ - { - "name": "index", - "type": "TYPE_STRING" - }, - { - "name": "datapoint_ids", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.RemoveDatapointsResponse", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1.IndexServiceClient" - }, - "method": { - "shortName": "RemoveDatapoints", - "fullName": "google.cloud.aiplatform.v1.IndexService.RemoveDatapoints", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_CreateCustomJob_async", - "title": "DatasetService createCustomJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a CustomJob. A created CustomJob right away will be attempted to be run.", - "canonical": true, - "file": "job_service.create_custom_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCustomJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CreateCustomJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "custom_job", - "type": ".google.cloud.aiplatform.v1.CustomJob" - } - ], - "resultType": ".google.cloud.aiplatform.v1.CustomJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "CreateCustomJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CreateCustomJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_GetCustomJob_async", - "title": "DatasetService getCustomJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a CustomJob.", - "canonical": true, - "file": "job_service.get_custom_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCustomJob", - "fullName": "google.cloud.aiplatform.v1.JobService.GetCustomJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.CustomJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "GetCustomJob", - "fullName": "google.cloud.aiplatform.v1.JobService.GetCustomJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_ListCustomJobs_async", - "title": "DatasetService listCustomJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists CustomJobs in a Location.", - "canonical": true, - "file": "job_service.list_custom_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCustomJobs", - "fullName": "google.cloud.aiplatform.v1.JobService.ListCustomJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListCustomJobsResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "ListCustomJobs", - "fullName": "google.cloud.aiplatform.v1.JobService.ListCustomJobs", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_DeleteCustomJob_async", - "title": "DatasetService deleteCustomJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a CustomJob.", - "canonical": true, - "file": "job_service.delete_custom_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCustomJob", - "fullName": "google.cloud.aiplatform.v1.JobService.DeleteCustomJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "DeleteCustomJob", - "fullName": "google.cloud.aiplatform.v1.JobService.DeleteCustomJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_CancelCustomJob_async", - "title": "DatasetService cancelCustomJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`.", - "canonical": true, - "file": "job_service.cancel_custom_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelCustomJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CancelCustomJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "CancelCustomJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CancelCustomJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_CreateDataLabelingJob_async", - "title": "DatasetService createDataLabelingJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a DataLabelingJob.", - "canonical": true, - "file": "job_service.create_data_labeling_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CreateDataLabelingJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "data_labeling_job", - "type": ".google.cloud.aiplatform.v1.DataLabelingJob" - } - ], - "resultType": ".google.cloud.aiplatform.v1.DataLabelingJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "CreateDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CreateDataLabelingJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_GetDataLabelingJob_async", - "title": "DatasetService getDataLabelingJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a DataLabelingJob.", - "canonical": true, - "file": "job_service.get_data_labeling_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1.JobService.GetDataLabelingJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.DataLabelingJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "GetDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1.JobService.GetDataLabelingJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_ListDataLabelingJobs_async", - "title": "DatasetService listDataLabelingJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists DataLabelingJobs in a Location.", - "canonical": true, - "file": "job_service.list_data_labeling_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 96, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataLabelingJobs", - "fullName": "google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListDataLabelingJobsResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "ListDataLabelingJobs", - "fullName": "google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_DeleteDataLabelingJob_async", - "title": "DatasetService deleteDataLabelingJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a DataLabelingJob.", - "canonical": true, - "file": "job_service.delete_data_labeling_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "DeleteDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_CancelDataLabelingJob_async", - "title": "DatasetService cancelDataLabelingJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a DataLabelingJob. Success of cancellation is not guaranteed.", - "canonical": true, - "file": "job_service.cancel_data_labeling_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CancelDataLabelingJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "CancelDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CancelDataLabelingJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_CreateHyperparameterTuningJob_async", - "title": "DatasetService createHyperparameterTuningJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a HyperparameterTuningJob", - "canonical": true, - "file": "job_service.create_hyperparameter_tuning_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "hyperparameter_tuning_job", - "type": ".google.cloud.aiplatform.v1.HyperparameterTuningJob" - } - ], - "resultType": ".google.cloud.aiplatform.v1.HyperparameterTuningJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "CreateHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_GetHyperparameterTuningJob_async", - "title": "DatasetService getHyperparameterTuningJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a HyperparameterTuningJob", - "canonical": true, - "file": "job_service.get_hyperparameter_tuning_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.HyperparameterTuningJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "GetHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_ListHyperparameterTuningJobs_async", - "title": "DatasetService listHyperparameterTuningJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists HyperparameterTuningJobs in a Location.", - "canonical": true, - "file": "job_service.list_hyperparameter_tuning_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListHyperparameterTuningJobs", - "fullName": "google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "ListHyperparameterTuningJobs", - "fullName": "google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_DeleteHyperparameterTuningJob_async", - "title": "DatasetService deleteHyperparameterTuningJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a HyperparameterTuningJob.", - "canonical": true, - "file": "job_service.delete_hyperparameter_tuning_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "DeleteHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_CancelHyperparameterTuningJob_async", - "title": "DatasetService cancelHyperparameterTuningJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`.", - "canonical": true, - "file": "job_service.cancel_hyperparameter_tuning_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "CancelHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_CreateBatchPredictionJob_async", - "title": "DatasetService createBatchPredictionJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.", - "canonical": true, - "file": "job_service.create_batch_prediction_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "batch_prediction_job", - "type": ".google.cloud.aiplatform.v1.BatchPredictionJob" - } - ], - "resultType": ".google.cloud.aiplatform.v1.BatchPredictionJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "CreateBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_GetBatchPredictionJob_async", - "title": "DatasetService getBatchPredictionJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a BatchPredictionJob", - "canonical": true, - "file": "job_service.get_batch_prediction_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.BatchPredictionJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "GetBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_ListBatchPredictionJobs_async", - "title": "DatasetService listBatchPredictionJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists BatchPredictionJobs in a Location.", - "canonical": true, - "file": "job_service.list_batch_prediction_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 91, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBatchPredictionJobs", - "fullName": "google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "ListBatchPredictionJobs", - "fullName": "google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_DeleteBatchPredictionJob_async", - "title": "DatasetService deleteBatchPredictionJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a BatchPredictionJob. Can only be called on jobs that already finished.", - "canonical": true, - "file": "job_service.delete_batch_prediction_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "DeleteBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_CancelBatchPredictionJob_async", - "title": "DatasetService cancelBatchPredictionJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a BatchPredictionJob. Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already outputted by the job are not deleted.", - "canonical": true, - "file": "job_service.cancel_batch_prediction_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "CancelBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_CreateModelDeploymentMonitoringJob_async", - "title": "DatasetService createModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.", - "canonical": true, - "file": "job_service.create_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "model_deployment_monitoring_job", - "type": ".google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "CreateModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_SearchModelDeploymentMonitoringStatsAnomalies_async", - "title": "DatasetService searchModelDeploymentMonitoringStatsAnomalies Sample", - "origin": "API_DEFINITION", - "description": " Searches Model Monitoring Statistics generated within a given time window.", - "canonical": true, - "file": "job_service.search_model_deployment_monitoring_stats_anomalies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 95, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchModelDeploymentMonitoringStatsAnomalies", - "fullName": "google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies", - "async": true, - "parameters": [ - { - "name": "model_deployment_monitoring_job", - "type": "TYPE_STRING" - }, - { - "name": "deployed_model_id", - "type": "TYPE_STRING" - }, - { - "name": "feature_display_name", - "type": "TYPE_STRING" - }, - { - "name": "objectives", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "end_time", - "type": ".google.protobuf.Timestamp" - } - ], - "resultType": ".google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "SearchModelDeploymentMonitoringStatsAnomalies", - "fullName": "google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_GetModelDeploymentMonitoringJob_async", - "title": "DatasetService getModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a ModelDeploymentMonitoringJob.", - "canonical": true, - "file": "job_service.get_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.GetModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "GetModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.GetModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_ListModelDeploymentMonitoringJobs_async", - "title": "DatasetService listModelDeploymentMonitoringJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists ModelDeploymentMonitoringJobs in a Location.", - "canonical": true, - "file": "job_service.list_model_deployment_monitoring_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListModelDeploymentMonitoringJobs", - "fullName": "google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListModelDeploymentMonitoringJobsResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "ListModelDeploymentMonitoringJobs", - "fullName": "google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_UpdateModelDeploymentMonitoringJob_async", - "title": "DatasetService updateModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Updates a ModelDeploymentMonitoringJob.", - "canonical": true, - "file": "job_service.update_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "model_deployment_monitoring_job", - "type": ".google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "UpdateModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_DeleteModelDeploymentMonitoringJob_async", - "title": "DatasetService deleteModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a ModelDeploymentMonitoringJob.", - "canonical": true, - "file": "job_service.delete_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.DeleteModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "DeleteModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.DeleteModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_PauseModelDeploymentMonitoringJob_async", - "title": "DatasetService pauseModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state] to 'PAUSED'.", - "canonical": true, - "file": "job_service.pause_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PauseModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.PauseModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "PauseModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.PauseModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_JobService_ResumeModelDeploymentMonitoringJob_async", - "title": "DatasetService resumeModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.", - "canonical": true, - "file": "job_service.resume_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ResumeModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.ResumeModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1.JobServiceClient" - }, - "method": { - "shortName": "ResumeModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1.JobService.ResumeModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_CreateMetadataStore_async", - "title": "DatasetService createMetadataStore Sample", - "origin": "API_DEFINITION", - "description": " Initializes a MetadataStore, including allocation of resources.", - "canonical": true, - "file": "metadata_service.create_metadata_store.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateMetadataStore", - "fullName": "google.cloud.aiplatform.v1.MetadataService.CreateMetadataStore", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "metadata_store", - "type": ".google.cloud.aiplatform.v1.MetadataStore" - }, - { - "name": "metadata_store_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateMetadataStore", - "fullName": "google.cloud.aiplatform.v1.MetadataService.CreateMetadataStore", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_GetMetadataStore_async", - "title": "DatasetService getMetadataStore Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a specific MetadataStore.", - "canonical": true, - "file": "metadata_service.get_metadata_store.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMetadataStore", - "fullName": "google.cloud.aiplatform.v1.MetadataService.GetMetadataStore", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.MetadataStore", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "GetMetadataStore", - "fullName": "google.cloud.aiplatform.v1.MetadataService.GetMetadataStore", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_ListMetadataStores_async", - "title": "DatasetService listMetadataStores Sample", - "origin": "API_DEFINITION", - "description": " Lists MetadataStores for a Location.", - "canonical": true, - "file": "metadata_service.list_metadata_stores.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMetadataStores", - "fullName": "google.cloud.aiplatform.v1.MetadataService.ListMetadataStores", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListMetadataStoresResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "ListMetadataStores", - "fullName": "google.cloud.aiplatform.v1.MetadataService.ListMetadataStores", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_DeleteMetadataStore_async", - "title": "DatasetService deleteMetadataStore Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and Contexts).", - "canonical": true, - "file": "metadata_service.delete_metadata_store.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteMetadataStore", - "fullName": "google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStore", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "DeleteMetadataStore", - "fullName": "google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStore", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_CreateArtifact_async", - "title": "DatasetService createArtifact Sample", - "origin": "API_DEFINITION", - "description": " Creates an Artifact associated with a MetadataStore.", - "canonical": true, - "file": "metadata_service.create_artifact.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateArtifact", - "fullName": "google.cloud.aiplatform.v1.MetadataService.CreateArtifact", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "artifact", - "type": ".google.cloud.aiplatform.v1.Artifact" - }, - { - "name": "artifact_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Artifact", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateArtifact", - "fullName": "google.cloud.aiplatform.v1.MetadataService.CreateArtifact", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_GetArtifact_async", - "title": "DatasetService getArtifact Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a specific Artifact.", - "canonical": true, - "file": "metadata_service.get_artifact.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetArtifact", - "fullName": "google.cloud.aiplatform.v1.MetadataService.GetArtifact", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Artifact", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "GetArtifact", - "fullName": "google.cloud.aiplatform.v1.MetadataService.GetArtifact", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_ListArtifacts_async", - "title": "DatasetService listArtifacts Sample", - "origin": "API_DEFINITION", - "description": " Lists Artifacts in the MetadataStore.", - "canonical": true, - "file": "metadata_service.list_artifacts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 106, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListArtifacts", - "fullName": "google.cloud.aiplatform.v1.MetadataService.ListArtifacts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListArtifactsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "ListArtifacts", - "fullName": "google.cloud.aiplatform.v1.MetadataService.ListArtifacts", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_UpdateArtifact_async", - "title": "DatasetService updateArtifact Sample", - "origin": "API_DEFINITION", - "description": " Updates a stored Artifact.", - "canonical": true, - "file": "metadata_service.update_artifact.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateArtifact", - "fullName": "google.cloud.aiplatform.v1.MetadataService.UpdateArtifact", - "async": true, - "parameters": [ - { - "name": "artifact", - "type": ".google.cloud.aiplatform.v1.Artifact" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Artifact", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "UpdateArtifact", - "fullName": "google.cloud.aiplatform.v1.MetadataService.UpdateArtifact", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_DeleteArtifact_async", - "title": "DatasetService deleteArtifact Sample", - "origin": "API_DEFINITION", - "description": " Deletes an Artifact.", - "canonical": true, - "file": "metadata_service.delete_artifact.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteArtifact", - "fullName": "google.cloud.aiplatform.v1.MetadataService.DeleteArtifact", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "DeleteArtifact", - "fullName": "google.cloud.aiplatform.v1.MetadataService.DeleteArtifact", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_PurgeArtifacts_async", - "title": "DatasetService purgeArtifacts Sample", - "origin": "API_DEFINITION", - "description": " Purges Artifacts.", - "canonical": true, - "file": "metadata_service.purge_artifacts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PurgeArtifacts", - "fullName": "google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "PurgeArtifacts", - "fullName": "google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_CreateContext_async", - "title": "DatasetService createContext Sample", - "origin": "API_DEFINITION", - "description": " Creates a Context associated with a MetadataStore.", - "canonical": true, - "file": "metadata_service.create_context.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateContext", - "fullName": "google.cloud.aiplatform.v1.MetadataService.CreateContext", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "context", - "type": ".google.cloud.aiplatform.v1.Context" - }, - { - "name": "context_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Context", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateContext", - "fullName": "google.cloud.aiplatform.v1.MetadataService.CreateContext", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_GetContext_async", - "title": "DatasetService getContext Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a specific Context.", - "canonical": true, - "file": "metadata_service.get_context.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetContext", - "fullName": "google.cloud.aiplatform.v1.MetadataService.GetContext", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Context", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "GetContext", - "fullName": "google.cloud.aiplatform.v1.MetadataService.GetContext", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_ListContexts_async", - "title": "DatasetService listContexts Sample", - "origin": "API_DEFINITION", - "description": " Lists Contexts on the MetadataStore.", - "canonical": true, - "file": "metadata_service.list_contexts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 109, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListContexts", - "fullName": "google.cloud.aiplatform.v1.MetadataService.ListContexts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListContextsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "ListContexts", - "fullName": "google.cloud.aiplatform.v1.MetadataService.ListContexts", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_UpdateContext_async", - "title": "DatasetService updateContext Sample", - "origin": "API_DEFINITION", - "description": " Updates a stored Context.", - "canonical": true, - "file": "metadata_service.update_context.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateContext", - "fullName": "google.cloud.aiplatform.v1.MetadataService.UpdateContext", - "async": true, - "parameters": [ - { - "name": "context", - "type": ".google.cloud.aiplatform.v1.Context" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Context", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "UpdateContext", - "fullName": "google.cloud.aiplatform.v1.MetadataService.UpdateContext", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_DeleteContext_async", - "title": "DatasetService deleteContext Sample", - "origin": "API_DEFINITION", - "description": " Deletes a stored Context.", - "canonical": true, - "file": "metadata_service.delete_context.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteContext", - "fullName": "google.cloud.aiplatform.v1.MetadataService.DeleteContext", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "DeleteContext", - "fullName": "google.cloud.aiplatform.v1.MetadataService.DeleteContext", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_PurgeContexts_async", - "title": "DatasetService purgeContexts Sample", - "origin": "API_DEFINITION", - "description": " Purges Contexts.", - "canonical": true, - "file": "metadata_service.purge_contexts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PurgeContexts", - "fullName": "google.cloud.aiplatform.v1.MetadataService.PurgeContexts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "PurgeContexts", - "fullName": "google.cloud.aiplatform.v1.MetadataService.PurgeContexts", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_AddContextArtifactsAndExecutions_async", - "title": "DatasetService addContextArtifactsAndExecutions Sample", - "origin": "API_DEFINITION", - "description": " Adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have already been added to a Context, they are simply skipped.", - "canonical": true, - "file": "metadata_service.add_context_artifacts_and_executions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AddContextArtifactsAndExecutions", - "fullName": "google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions", - "async": true, - "parameters": [ - { - "name": "context", - "type": "TYPE_STRING" - }, - { - "name": "artifacts", - "type": "TYPE_STRING[]" - }, - { - "name": "executions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.AddContextArtifactsAndExecutionsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "AddContextArtifactsAndExecutions", - "fullName": "google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_AddContextChildren_async", - "title": "DatasetService addContextChildren Sample", - "origin": "API_DEFINITION", - "description": " Adds a set of Contexts as children to a parent Context. If any of the child Contexts have already been added to the parent Context, they are simply skipped. If this call would create a cycle or cause any Context to have more than 10 parents, the request will fail with an INVALID_ARGUMENT error.", - "canonical": true, - "file": "metadata_service.add_context_children.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AddContextChildren", - "fullName": "google.cloud.aiplatform.v1.MetadataService.AddContextChildren", - "async": true, - "parameters": [ - { - "name": "context", - "type": "TYPE_STRING" - }, - { - "name": "child_contexts", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.AddContextChildrenResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "AddContextChildren", - "fullName": "google.cloud.aiplatform.v1.MetadataService.AddContextChildren", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_RemoveContextChildren_async", - "title": "DatasetService removeContextChildren Sample", - "origin": "API_DEFINITION", - "description": " Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT added to the parent Context, they are simply skipped.", - "canonical": true, - "file": "metadata_service.remove_context_children.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RemoveContextChildren", - "fullName": "google.cloud.aiplatform.v1.MetadataService.RemoveContextChildren", - "async": true, - "parameters": [ - { - "name": "context", - "type": "TYPE_STRING" - }, - { - "name": "child_contexts", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.RemoveContextChildrenResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "RemoveContextChildren", - "fullName": "google.cloud.aiplatform.v1.MetadataService.RemoveContextChildren", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_QueryContextLineageSubgraph_async", - "title": "DatasetService queryContextLineageSubgraph Sample", - "origin": "API_DEFINITION", - "description": " Retrieves Artifacts and Executions within the specified Context, connected by Event edges and returned as a LineageSubgraph.", - "canonical": true, - "file": "metadata_service.query_context_lineage_subgraph.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "QueryContextLineageSubgraph", - "fullName": "google.cloud.aiplatform.v1.MetadataService.QueryContextLineageSubgraph", - "async": true, - "parameters": [ - { - "name": "context", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.LineageSubgraph", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "QueryContextLineageSubgraph", - "fullName": "google.cloud.aiplatform.v1.MetadataService.QueryContextLineageSubgraph", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_CreateExecution_async", - "title": "DatasetService createExecution Sample", - "origin": "API_DEFINITION", - "description": " Creates an Execution associated with a MetadataStore.", - "canonical": true, - "file": "metadata_service.create_execution.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateExecution", - "fullName": "google.cloud.aiplatform.v1.MetadataService.CreateExecution", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "execution", - "type": ".google.cloud.aiplatform.v1.Execution" - }, - { - "name": "execution_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Execution", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateExecution", - "fullName": "google.cloud.aiplatform.v1.MetadataService.CreateExecution", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_GetExecution_async", - "title": "DatasetService getExecution Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a specific Execution.", - "canonical": true, - "file": "metadata_service.get_execution.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetExecution", - "fullName": "google.cloud.aiplatform.v1.MetadataService.GetExecution", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Execution", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "GetExecution", - "fullName": "google.cloud.aiplatform.v1.MetadataService.GetExecution", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_ListExecutions_async", - "title": "DatasetService listExecutions Sample", - "origin": "API_DEFINITION", - "description": " Lists Executions in the MetadataStore.", - "canonical": true, - "file": "metadata_service.list_executions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 106, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListExecutions", - "fullName": "google.cloud.aiplatform.v1.MetadataService.ListExecutions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListExecutionsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "ListExecutions", - "fullName": "google.cloud.aiplatform.v1.MetadataService.ListExecutions", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_UpdateExecution_async", - "title": "DatasetService updateExecution Sample", - "origin": "API_DEFINITION", - "description": " Updates a stored Execution.", - "canonical": true, - "file": "metadata_service.update_execution.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateExecution", - "fullName": "google.cloud.aiplatform.v1.MetadataService.UpdateExecution", - "async": true, - "parameters": [ - { - "name": "execution", - "type": ".google.cloud.aiplatform.v1.Execution" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Execution", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "UpdateExecution", - "fullName": "google.cloud.aiplatform.v1.MetadataService.UpdateExecution", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_DeleteExecution_async", - "title": "DatasetService deleteExecution Sample", - "origin": "API_DEFINITION", - "description": " Deletes an Execution.", - "canonical": true, - "file": "metadata_service.delete_execution.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteExecution", - "fullName": "google.cloud.aiplatform.v1.MetadataService.DeleteExecution", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "DeleteExecution", - "fullName": "google.cloud.aiplatform.v1.MetadataService.DeleteExecution", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_PurgeExecutions_async", - "title": "DatasetService purgeExecutions Sample", - "origin": "API_DEFINITION", - "description": " Purges Executions.", - "canonical": true, - "file": "metadata_service.purge_executions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PurgeExecutions", - "fullName": "google.cloud.aiplatform.v1.MetadataService.PurgeExecutions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "PurgeExecutions", - "fullName": "google.cloud.aiplatform.v1.MetadataService.PurgeExecutions", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_AddExecutionEvents_async", - "title": "DatasetService addExecutionEvents Sample", - "origin": "API_DEFINITION", - "description": " Adds Events to the specified Execution. An Event indicates whether an Artifact was used as an input or output for an Execution. If an Event already exists between the Execution and the Artifact, the Event is skipped.", - "canonical": true, - "file": "metadata_service.add_execution_events.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AddExecutionEvents", - "fullName": "google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents", - "async": true, - "parameters": [ - { - "name": "execution", - "type": "TYPE_STRING" - }, - { - "name": "events", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.AddExecutionEventsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "AddExecutionEvents", - "fullName": "google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_QueryExecutionInputsAndOutputs_async", - "title": "DatasetService queryExecutionInputsAndOutputs Sample", - "origin": "API_DEFINITION", - "description": " Obtains the set of input and output Artifacts for this Execution, in the form of LineageSubgraph that also contains the Execution and connecting Events.", - "canonical": true, - "file": "metadata_service.query_execution_inputs_and_outputs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "QueryExecutionInputsAndOutputs", - "fullName": "google.cloud.aiplatform.v1.MetadataService.QueryExecutionInputsAndOutputs", - "async": true, - "parameters": [ - { - "name": "execution", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.LineageSubgraph", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "QueryExecutionInputsAndOutputs", - "fullName": "google.cloud.aiplatform.v1.MetadataService.QueryExecutionInputsAndOutputs", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_CreateMetadataSchema_async", - "title": "DatasetService createMetadataSchema Sample", - "origin": "API_DEFINITION", - "description": " Creates a MetadataSchema.", - "canonical": true, - "file": "metadata_service.create_metadata_schema.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateMetadataSchema", - "fullName": "google.cloud.aiplatform.v1.MetadataService.CreateMetadataSchema", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "metadata_schema", - "type": ".google.cloud.aiplatform.v1.MetadataSchema" - }, - { - "name": "metadata_schema_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.MetadataSchema", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateMetadataSchema", - "fullName": "google.cloud.aiplatform.v1.MetadataService.CreateMetadataSchema", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_GetMetadataSchema_async", - "title": "DatasetService getMetadataSchema Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a specific MetadataSchema.", - "canonical": true, - "file": "metadata_service.get_metadata_schema.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMetadataSchema", - "fullName": "google.cloud.aiplatform.v1.MetadataService.GetMetadataSchema", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.MetadataSchema", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "GetMetadataSchema", - "fullName": "google.cloud.aiplatform.v1.MetadataService.GetMetadataSchema", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_ListMetadataSchemas_async", - "title": "DatasetService listMetadataSchemas Sample", - "origin": "API_DEFINITION", - "description": " Lists MetadataSchemas.", - "canonical": true, - "file": "metadata_service.list_metadata_schemas.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMetadataSchemas", - "fullName": "google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListMetadataSchemasResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "ListMetadataSchemas", - "fullName": "google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MetadataService_QueryArtifactLineageSubgraph_async", - "title": "DatasetService queryArtifactLineageSubgraph Sample", - "origin": "API_DEFINITION", - "description": " Retrieves lineage of an Artifact represented through Artifacts and Executions connected by Event edges and returned as a LineageSubgraph.", - "canonical": true, - "file": "metadata_service.query_artifact_lineage_subgraph.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 88, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "QueryArtifactLineageSubgraph", - "fullName": "google.cloud.aiplatform.v1.MetadataService.QueryArtifactLineageSubgraph", - "async": true, - "parameters": [ - { - "name": "artifact", - "type": "TYPE_STRING" - }, - { - "name": "max_hops", - "type": "TYPE_INT32" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.LineageSubgraph", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1.MetadataServiceClient" - }, - "method": { - "shortName": "QueryArtifactLineageSubgraph", - "fullName": "google.cloud.aiplatform.v1.MetadataService.QueryArtifactLineageSubgraph", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MigrationService_SearchMigratableResources_async", - "title": "DatasetService searchMigratableResources Sample", - "origin": "API_DEFINITION", - "description": " Searches all of the resources in automl.googleapis.com, datalabeling.googleapis.com and ml.googleapis.com that can be migrated to Vertex AI's given location.", - "canonical": true, - "file": "migration_service.search_migratable_resources.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchMigratableResources", - "fullName": "google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.SearchMigratableResourcesResponse", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.aiplatform.v1.MigrationServiceClient" - }, - "method": { - "shortName": "SearchMigratableResources", - "fullName": "google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.aiplatform.v1.MigrationService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_MigrationService_BatchMigrateResources_async", - "title": "DatasetService batchMigrateResources Sample", - "origin": "API_DEFINITION", - "description": " Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and datalabeling.googleapis.com to Vertex AI.", - "canonical": true, - "file": "migration_service.batch_migrate_resources.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchMigrateResources", - "fullName": "google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "migrate_resource_requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.aiplatform.v1.MigrationServiceClient" - }, - "method": { - "shortName": "BatchMigrateResources", - "fullName": "google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.aiplatform.v1.MigrationService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_UploadModel_async", - "title": "DatasetService uploadModel Sample", - "origin": "API_DEFINITION", - "description": " Uploads a Model artifact into Vertex AI.", - "canonical": true, - "file": "model_service.upload_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UploadModel", - "fullName": "google.cloud.aiplatform.v1.ModelService.UploadModel", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "parent_model", - "type": "TYPE_STRING" - }, - { - "name": "model_id", - "type": "TYPE_STRING" - }, - { - "name": "model", - "type": ".google.cloud.aiplatform.v1.Model" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "UploadModel", - "fullName": "google.cloud.aiplatform.v1.ModelService.UploadModel", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_GetModel_async", - "title": "DatasetService getModel Sample", - "origin": "API_DEFINITION", - "description": " Gets a Model.", - "canonical": true, - "file": "model_service.get_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetModel", - "fullName": "google.cloud.aiplatform.v1.ModelService.GetModel", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Model", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "GetModel", - "fullName": "google.cloud.aiplatform.v1.ModelService.GetModel", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_ListModels_async", - "title": "DatasetService listModels Sample", - "origin": "API_DEFINITION", - "description": " Lists Models in a Location.", - "canonical": true, - "file": "model_service.list_models.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 97, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListModels", - "fullName": "google.cloud.aiplatform.v1.ModelService.ListModels", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListModelsResponse", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "ListModels", - "fullName": "google.cloud.aiplatform.v1.ModelService.ListModels", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_ListModelVersions_async", - "title": "DatasetService listModelVersions Sample", - "origin": "API_DEFINITION", - "description": " Lists versions of the specified model.", - "canonical": true, - "file": "model_service.list_model_versions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListModelVersions", - "fullName": "google.cloud.aiplatform.v1.ModelService.ListModelVersions", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListModelVersionsResponse", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "ListModelVersions", - "fullName": "google.cloud.aiplatform.v1.ModelService.ListModelVersions", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_UpdateModel_async", - "title": "DatasetService updateModel Sample", - "origin": "API_DEFINITION", - "description": " Updates a Model.", - "canonical": true, - "file": "model_service.update_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateModel", - "fullName": "google.cloud.aiplatform.v1.ModelService.UpdateModel", - "async": true, - "parameters": [ - { - "name": "model", - "type": ".google.cloud.aiplatform.v1.Model" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Model", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "UpdateModel", - "fullName": "google.cloud.aiplatform.v1.ModelService.UpdateModel", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_DeleteModel_async", - "title": "DatasetService deleteModel Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Model. A model cannot be deleted if any [Endpoint][google.cloud.aiplatform.v1.Endpoint] resource has a [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] based on the model in its [deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] field.", - "canonical": true, - "file": "model_service.delete_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteModel", - "fullName": "google.cloud.aiplatform.v1.ModelService.DeleteModel", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "DeleteModel", - "fullName": "google.cloud.aiplatform.v1.ModelService.DeleteModel", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_DeleteModelVersion_async", - "title": "DatasetService deleteModelVersion Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Model version. Model version can only be deleted if there are no [DeployedModels][] created from it. Deleting the only version in the Model is not allowed. Use [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for deleting the Model instead.", - "canonical": true, - "file": "model_service.delete_model_version.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteModelVersion", - "fullName": "google.cloud.aiplatform.v1.ModelService.DeleteModelVersion", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "DeleteModelVersion", - "fullName": "google.cloud.aiplatform.v1.ModelService.DeleteModelVersion", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_MergeVersionAliases_async", - "title": "DatasetService mergeVersionAliases Sample", - "origin": "API_DEFINITION", - "description": " Merges a set of aliases for a Model version.", - "canonical": true, - "file": "model_service.merge_version_aliases.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "MergeVersionAliases", - "fullName": "google.cloud.aiplatform.v1.ModelService.MergeVersionAliases", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "version_aliases", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Model", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "MergeVersionAliases", - "fullName": "google.cloud.aiplatform.v1.ModelService.MergeVersionAliases", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_ExportModel_async", - "title": "DatasetService exportModel Sample", - "origin": "API_DEFINITION", - "description": " Exports a trained, exportable Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].", - "canonical": true, - "file": "model_service.export_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportModel", - "fullName": "google.cloud.aiplatform.v1.ModelService.ExportModel", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "output_config", - "type": ".google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "ExportModel", - "fullName": "google.cloud.aiplatform.v1.ModelService.ExportModel", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_ImportModelEvaluation_async", - "title": "DatasetService importModelEvaluation Sample", - "origin": "API_DEFINITION", - "description": " Imports an externally generated ModelEvaluation.", - "canonical": true, - "file": "model_service.import_model_evaluation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportModelEvaluation", - "fullName": "google.cloud.aiplatform.v1.ModelService.ImportModelEvaluation", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "model_evaluation", - "type": ".google.cloud.aiplatform.v1.ModelEvaluation" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ModelEvaluation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "ImportModelEvaluation", - "fullName": "google.cloud.aiplatform.v1.ModelService.ImportModelEvaluation", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_async", - "title": "DatasetService batchImportModelEvaluationSlices Sample", - "origin": "API_DEFINITION", - "description": " Imports a list of externally generated ModelEvaluationSlice.", - "canonical": true, - "file": "model_service.batch_import_model_evaluation_slices.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchImportModelEvaluationSlices", - "fullName": "google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "model_evaluation_slices", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "BatchImportModelEvaluationSlices", - "fullName": "google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_GetModelEvaluation_async", - "title": "DatasetService getModelEvaluation Sample", - "origin": "API_DEFINITION", - "description": " Gets a ModelEvaluation.", - "canonical": true, - "file": "model_service.get_model_evaluation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetModelEvaluation", - "fullName": "google.cloud.aiplatform.v1.ModelService.GetModelEvaluation", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ModelEvaluation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "GetModelEvaluation", - "fullName": "google.cloud.aiplatform.v1.ModelService.GetModelEvaluation", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_ListModelEvaluations_async", - "title": "DatasetService listModelEvaluations Sample", - "origin": "API_DEFINITION", - "description": " Lists ModelEvaluations in a Model.", - "canonical": true, - "file": "model_service.list_model_evaluations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListModelEvaluations", - "fullName": "google.cloud.aiplatform.v1.ModelService.ListModelEvaluations", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListModelEvaluationsResponse", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "ListModelEvaluations", - "fullName": "google.cloud.aiplatform.v1.ModelService.ListModelEvaluations", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_GetModelEvaluationSlice_async", - "title": "DatasetService getModelEvaluationSlice Sample", - "origin": "API_DEFINITION", - "description": " Gets a ModelEvaluationSlice.", - "canonical": true, - "file": "model_service.get_model_evaluation_slice.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetModelEvaluationSlice", - "fullName": "google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ModelEvaluationSlice", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "GetModelEvaluationSlice", - "fullName": "google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_ModelService_ListModelEvaluationSlices_async", - "title": "DatasetService listModelEvaluationSlices Sample", - "origin": "API_DEFINITION", - "description": " Lists ModelEvaluationSlices in a ModelEvaluation.", - "canonical": true, - "file": "model_service.list_model_evaluation_slices.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListModelEvaluationSlices", - "fullName": "google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" - }, - "method": { - "shortName": "ListModelEvaluationSlices", - "fullName": "google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PipelineService_CreateTrainingPipeline_async", - "title": "DatasetService createTrainingPipeline Sample", - "origin": "API_DEFINITION", - "description": " Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run.", - "canonical": true, - "file": "pipeline_service.create_training_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1.PipelineService.CreateTrainingPipeline", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "training_pipeline", - "type": ".google.cloud.aiplatform.v1.TrainingPipeline" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TrainingPipeline", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1.PipelineServiceClient" - }, - "method": { - "shortName": "CreateTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1.PipelineService.CreateTrainingPipeline", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PipelineService_GetTrainingPipeline_async", - "title": "DatasetService getTrainingPipeline Sample", - "origin": "API_DEFINITION", - "description": " Gets a TrainingPipeline.", - "canonical": true, - "file": "pipeline_service.get_training_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TrainingPipeline", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1.PipelineServiceClient" - }, - "method": { - "shortName": "GetTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PipelineService_ListTrainingPipelines_async", - "title": "DatasetService listTrainingPipelines Sample", - "origin": "API_DEFINITION", - "description": " Lists TrainingPipelines in a Location.", - "canonical": true, - "file": "pipeline_service.list_training_pipelines.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTrainingPipelines", - "fullName": "google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListTrainingPipelinesResponse", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1.PipelineServiceClient" - }, - "method": { - "shortName": "ListTrainingPipelines", - "fullName": "google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PipelineService_DeleteTrainingPipeline_async", - "title": "DatasetService deleteTrainingPipeline Sample", - "origin": "API_DEFINITION", - "description": " Deletes a TrainingPipeline.", - "canonical": true, - "file": "pipeline_service.delete_training_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1.PipelineService.DeleteTrainingPipeline", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1.PipelineServiceClient" - }, - "method": { - "shortName": "DeleteTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1.PipelineService.DeleteTrainingPipeline", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PipelineService_CancelTrainingPipeline_async", - "title": "DatasetService cancelTrainingPipeline Sample", - "origin": "API_DEFINITION", - "description": " Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead it becomes a pipeline with a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to `CANCELLED`.", - "canonical": true, - "file": "pipeline_service.cancel_training_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1.PipelineService.CancelTrainingPipeline", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1.PipelineServiceClient" - }, - "method": { - "shortName": "CancelTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1.PipelineService.CancelTrainingPipeline", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PipelineService_CreatePipelineJob_async", - "title": "DatasetService createPipelineJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a PipelineJob. A PipelineJob will run immediately when created.", - "canonical": true, - "file": "pipeline_service.create_pipeline_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePipelineJob", - "fullName": "google.cloud.aiplatform.v1.PipelineService.CreatePipelineJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "pipeline_job", - "type": ".google.cloud.aiplatform.v1.PipelineJob" - }, - { - "name": "pipeline_job_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.PipelineJob", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1.PipelineServiceClient" - }, - "method": { - "shortName": "CreatePipelineJob", - "fullName": "google.cloud.aiplatform.v1.PipelineService.CreatePipelineJob", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PipelineService_GetPipelineJob_async", - "title": "DatasetService getPipelineJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a PipelineJob.", - "canonical": true, - "file": "pipeline_service.get_pipeline_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPipelineJob", - "fullName": "google.cloud.aiplatform.v1.PipelineService.GetPipelineJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.PipelineJob", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1.PipelineServiceClient" - }, - "method": { - "shortName": "GetPipelineJob", - "fullName": "google.cloud.aiplatform.v1.PipelineService.GetPipelineJob", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PipelineService_ListPipelineJobs_async", - "title": "DatasetService listPipelineJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists PipelineJobs in a Location.", - "canonical": true, - "file": "pipeline_service.list_pipeline_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 118, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPipelineJobs", - "fullName": "google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListPipelineJobsResponse", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1.PipelineServiceClient" - }, - "method": { - "shortName": "ListPipelineJobs", - "fullName": "google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PipelineService_DeletePipelineJob_async", - "title": "DatasetService deletePipelineJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a PipelineJob.", - "canonical": true, - "file": "pipeline_service.delete_pipeline_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePipelineJob", - "fullName": "google.cloud.aiplatform.v1.PipelineService.DeletePipelineJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1.PipelineServiceClient" - }, - "method": { - "shortName": "DeletePipelineJob", - "fullName": "google.cloud.aiplatform.v1.PipelineService.DeletePipelineJob", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PipelineService_CancelPipelineJob_async", - "title": "DatasetService cancelPipelineJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a PipelineJob. Starts asynchronous cancellation on the PipelineJob. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1.PipelineService.GetPipelineJob] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the PipelineJob is not deleted; instead it becomes a pipeline with a [PipelineJob.error][google.cloud.aiplatform.v1.PipelineJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [PipelineJob.state][google.cloud.aiplatform.v1.PipelineJob.state] is set to `CANCELLED`.", - "canonical": true, - "file": "pipeline_service.cancel_pipeline_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelPipelineJob", - "fullName": "google.cloud.aiplatform.v1.PipelineService.CancelPipelineJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1.PipelineServiceClient" - }, - "method": { - "shortName": "CancelPipelineJob", - "fullName": "google.cloud.aiplatform.v1.PipelineService.CancelPipelineJob", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PredictionService_Predict_async", - "title": "DatasetService predict Sample", - "origin": "API_DEFINITION", - "description": " Perform an online prediction.", - "canonical": true, - "file": "prediction_service.predict.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "Predict", - "fullName": "google.cloud.aiplatform.v1.PredictionService.Predict", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": "TYPE_STRING" - }, - { - "name": "instances", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "parameters", - "type": ".google.protobuf.Value" - } - ], - "resultType": ".google.cloud.aiplatform.v1.PredictResponse", - "client": { - "shortName": "PredictionServiceClient", - "fullName": "google.cloud.aiplatform.v1.PredictionServiceClient" - }, - "method": { - "shortName": "Predict", - "fullName": "google.cloud.aiplatform.v1.PredictionService.Predict", - "service": { - "shortName": "PredictionService", - "fullName": "google.cloud.aiplatform.v1.PredictionService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PredictionService_RawPredict_async", - "title": "DatasetService rawPredict Sample", - "origin": "API_DEFINITION", - "description": " Perform an online prediction with an arbitrary HTTP payload. The response includes the following HTTP headers: * `X-Vertex-AI-Endpoint-Id`: ID of the [Endpoint][google.cloud.aiplatform.v1.Endpoint] that served this prediction. * `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this prediction.", - "canonical": true, - "file": "prediction_service.raw_predict.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RawPredict", - "fullName": "google.cloud.aiplatform.v1.PredictionService.RawPredict", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": "TYPE_STRING" - }, - { - "name": "http_body", - "type": ".google.api.HttpBody" - } - ], - "resultType": ".google.api.HttpBody", - "client": { - "shortName": "PredictionServiceClient", - "fullName": "google.cloud.aiplatform.v1.PredictionServiceClient" - }, - "method": { - "shortName": "RawPredict", - "fullName": "google.cloud.aiplatform.v1.PredictionService.RawPredict", - "service": { - "shortName": "PredictionService", - "fullName": "google.cloud.aiplatform.v1.PredictionService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_PredictionService_Explain_async", - "title": "DatasetService explain Sample", - "origin": "API_DEFINITION", - "description": " Perform an online explanation. If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. Only deployed AutoML tabular Models have explanation_spec.", - "canonical": true, - "file": "prediction_service.explain.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 91, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "Explain", - "fullName": "google.cloud.aiplatform.v1.PredictionService.Explain", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": "TYPE_STRING" - }, - { - "name": "instances", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "parameters", - "type": ".google.protobuf.Value" - }, - { - "name": "explanation_spec_override", - "type": ".google.cloud.aiplatform.v1.ExplanationSpecOverride" - }, - { - "name": "deployed_model_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ExplainResponse", - "client": { - "shortName": "PredictionServiceClient", - "fullName": "google.cloud.aiplatform.v1.PredictionServiceClient" - }, - "method": { - "shortName": "Explain", - "fullName": "google.cloud.aiplatform.v1.PredictionService.Explain", - "service": { - "shortName": "PredictionService", - "fullName": "google.cloud.aiplatform.v1.PredictionService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_SpecialistPoolService_CreateSpecialistPool_async", - "title": "DatasetService createSpecialistPool Sample", - "origin": "API_DEFINITION", - "description": " Creates a SpecialistPool.", - "canonical": true, - "file": "specialist_pool_service.create_specialist_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateSpecialistPool", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "specialist_pool", - "type": ".google.cloud.aiplatform.v1.SpecialistPool" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "SpecialistPoolServiceClient", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolServiceClient" - }, - "method": { - "shortName": "CreateSpecialistPool", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool", - "service": { - "shortName": "SpecialistPoolService", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_SpecialistPoolService_GetSpecialistPool_async", - "title": "DatasetService getSpecialistPool Sample", - "origin": "API_DEFINITION", - "description": " Gets a SpecialistPool.", - "canonical": true, - "file": "specialist_pool_service.get_specialist_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetSpecialistPool", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService.GetSpecialistPool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.SpecialistPool", - "client": { - "shortName": "SpecialistPoolServiceClient", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolServiceClient" - }, - "method": { - "shortName": "GetSpecialistPool", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService.GetSpecialistPool", - "service": { - "shortName": "SpecialistPoolService", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_SpecialistPoolService_ListSpecialistPools_async", - "title": "DatasetService listSpecialistPools Sample", - "origin": "API_DEFINITION", - "description": " Lists SpecialistPools in a Location.", - "canonical": true, - "file": "specialist_pool_service.list_specialist_pools.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSpecialistPools", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListSpecialistPoolsResponse", - "client": { - "shortName": "SpecialistPoolServiceClient", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolServiceClient" - }, - "method": { - "shortName": "ListSpecialistPools", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools", - "service": { - "shortName": "SpecialistPoolService", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_SpecialistPoolService_DeleteSpecialistPool_async", - "title": "DatasetService deleteSpecialistPool Sample", - "origin": "API_DEFINITION", - "description": " Deletes a SpecialistPool as well as all Specialists in the pool.", - "canonical": true, - "file": "specialist_pool_service.delete_specialist_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteSpecialistPool", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService.DeleteSpecialistPool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "SpecialistPoolServiceClient", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolServiceClient" - }, - "method": { - "shortName": "DeleteSpecialistPool", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService.DeleteSpecialistPool", - "service": { - "shortName": "SpecialistPoolService", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_SpecialistPoolService_UpdateSpecialistPool_async", - "title": "DatasetService updateSpecialistPool Sample", - "origin": "API_DEFINITION", - "description": " Updates a SpecialistPool.", - "canonical": true, - "file": "specialist_pool_service.update_specialist_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateSpecialistPool", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool", - "async": true, - "parameters": [ - { - "name": "specialist_pool", - "type": ".google.cloud.aiplatform.v1.SpecialistPool" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "SpecialistPoolServiceClient", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolServiceClient" - }, - "method": { - "shortName": "UpdateSpecialistPool", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool", - "service": { - "shortName": "SpecialistPoolService", - "fullName": "google.cloud.aiplatform.v1.SpecialistPoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_CreateTensorboard_async", - "title": "DatasetService createTensorboard Sample", - "origin": "API_DEFINITION", - "description": " Creates a Tensorboard.", - "canonical": true, - "file": "tensorboard_service.create_tensorboard.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTensorboard", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.CreateTensorboard", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tensorboard", - "type": ".google.cloud.aiplatform.v1.Tensorboard" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "CreateTensorboard", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.CreateTensorboard", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_GetTensorboard_async", - "title": "DatasetService getTensorboard Sample", - "origin": "API_DEFINITION", - "description": " Gets a Tensorboard.", - "canonical": true, - "file": "tensorboard_service.get_tensorboard.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTensorboard", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.GetTensorboard", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Tensorboard", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "GetTensorboard", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.GetTensorboard", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_UpdateTensorboard_async", - "title": "DatasetService updateTensorboard Sample", - "origin": "API_DEFINITION", - "description": " Updates a Tensorboard.", - "canonical": true, - "file": "tensorboard_service.update_tensorboard.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTensorboard", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboard", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "tensorboard", - "type": ".google.cloud.aiplatform.v1.Tensorboard" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "UpdateTensorboard", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboard", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_ListTensorboards_async", - "title": "DatasetService listTensorboards Sample", - "origin": "API_DEFINITION", - "description": " Lists Tensorboards in a Location.", - "canonical": true, - "file": "tensorboard_service.list_tensorboards.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTensorboards", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ListTensorboards", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListTensorboardsResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "ListTensorboards", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ListTensorboards", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_DeleteTensorboard_async", - "title": "DatasetService deleteTensorboard Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Tensorboard.", - "canonical": true, - "file": "tensorboard_service.delete_tensorboard.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTensorboard", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboard", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "DeleteTensorboard", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboard", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_CreateTensorboardExperiment_async", - "title": "DatasetService createTensorboardExperiment Sample", - "origin": "API_DEFINITION", - "description": " Creates a TensorboardExperiment.", - "canonical": true, - "file": "tensorboard_service.create_tensorboard_experiment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardExperiment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tensorboard_experiment", - "type": ".google.cloud.aiplatform.v1.TensorboardExperiment" - }, - { - "name": "tensorboard_experiment_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TensorboardExperiment", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "CreateTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardExperiment", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_GetTensorboardExperiment_async", - "title": "DatasetService getTensorboardExperiment Sample", - "origin": "API_DEFINITION", - "description": " Gets a TensorboardExperiment.", - "canonical": true, - "file": "tensorboard_service.get_tensorboard_experiment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.GetTensorboardExperiment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TensorboardExperiment", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "GetTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.GetTensorboardExperiment", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_UpdateTensorboardExperiment_async", - "title": "DatasetService updateTensorboardExperiment Sample", - "origin": "API_DEFINITION", - "description": " Updates a TensorboardExperiment.", - "canonical": true, - "file": "tensorboard_service.update_tensorboard_experiment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardExperiment", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "tensorboard_experiment", - "type": ".google.cloud.aiplatform.v1.TensorboardExperiment" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TensorboardExperiment", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "UpdateTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardExperiment", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_ListTensorboardExperiments_async", - "title": "DatasetService listTensorboardExperiments Sample", - "origin": "API_DEFINITION", - "description": " Lists TensorboardExperiments in a Location.", - "canonical": true, - "file": "tensorboard_service.list_tensorboard_experiments.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTensorboardExperiments", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListTensorboardExperimentsResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "ListTensorboardExperiments", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_DeleteTensorboardExperiment_async", - "title": "DatasetService deleteTensorboardExperiment Sample", - "origin": "API_DEFINITION", - "description": " Deletes a TensorboardExperiment.", - "canonical": true, - "file": "tensorboard_service.delete_tensorboard_experiment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardExperiment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "DeleteTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardExperiment", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_CreateTensorboardRun_async", - "title": "DatasetService createTensorboardRun Sample", - "origin": "API_DEFINITION", - "description": " Creates a TensorboardRun.", - "canonical": true, - "file": "tensorboard_service.create_tensorboard_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTensorboardRun", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardRun", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tensorboard_run", - "type": ".google.cloud.aiplatform.v1.TensorboardRun" - }, - { - "name": "tensorboard_run_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TensorboardRun", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "CreateTensorboardRun", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardRun", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_BatchCreateTensorboardRuns_async", - "title": "DatasetService batchCreateTensorboardRuns Sample", - "origin": "API_DEFINITION", - "description": " Batch create TensorboardRuns.", - "canonical": true, - "file": "tensorboard_service.batch_create_tensorboard_runs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchCreateTensorboardRuns", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardRuns", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.BatchCreateTensorboardRunsResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "BatchCreateTensorboardRuns", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardRuns", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_GetTensorboardRun_async", - "title": "DatasetService getTensorboardRun Sample", - "origin": "API_DEFINITION", - "description": " Gets a TensorboardRun.", - "canonical": true, - "file": "tensorboard_service.get_tensorboard_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTensorboardRun", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.GetTensorboardRun", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TensorboardRun", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "GetTensorboardRun", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.GetTensorboardRun", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_UpdateTensorboardRun_async", - "title": "DatasetService updateTensorboardRun Sample", - "origin": "API_DEFINITION", - "description": " Updates a TensorboardRun.", - "canonical": true, - "file": "tensorboard_service.update_tensorboard_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTensorboardRun", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardRun", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "tensorboard_run", - "type": ".google.cloud.aiplatform.v1.TensorboardRun" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TensorboardRun", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "UpdateTensorboardRun", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardRun", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_ListTensorboardRuns_async", - "title": "DatasetService listTensorboardRuns Sample", - "origin": "API_DEFINITION", - "description": " Lists TensorboardRuns in a Location.", - "canonical": true, - "file": "tensorboard_service.list_tensorboard_runs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTensorboardRuns", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListTensorboardRunsResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "ListTensorboardRuns", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_DeleteTensorboardRun_async", - "title": "DatasetService deleteTensorboardRun Sample", - "origin": "API_DEFINITION", - "description": " Deletes a TensorboardRun.", - "canonical": true, - "file": "tensorboard_service.delete_tensorboard_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTensorboardRun", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardRun", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "DeleteTensorboardRun", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardRun", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_BatchCreateTensorboardTimeSeries_async", - "title": "DatasetService batchCreateTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.", - "canonical": true, - "file": "tensorboard_service.batch_create_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchCreateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.BatchCreateTensorboardTimeSeriesResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "BatchCreateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_CreateTensorboardTimeSeries_async", - "title": "DatasetService createTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Creates a TensorboardTimeSeries.", - "canonical": true, - "file": "tensorboard_service.create_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tensorboard_time_series_id", - "type": "TYPE_STRING" - }, - { - "name": "tensorboard_time_series", - "type": ".google.cloud.aiplatform.v1.TensorboardTimeSeries" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TensorboardTimeSeries", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "CreateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_GetTensorboardTimeSeries_async", - "title": "DatasetService getTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Gets a TensorboardTimeSeries.", - "canonical": true, - "file": "tensorboard_service.get_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.GetTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TensorboardTimeSeries", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "GetTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.GetTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_UpdateTensorboardTimeSeries_async", - "title": "DatasetService updateTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Updates a TensorboardTimeSeries.", - "canonical": true, - "file": "tensorboard_service.update_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "tensorboard_time_series", - "type": ".google.cloud.aiplatform.v1.TensorboardTimeSeries" - } - ], - "resultType": ".google.cloud.aiplatform.v1.TensorboardTimeSeries", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "UpdateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_ListTensorboardTimeSeries_async", - "title": "DatasetService listTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Lists TensorboardTimeSeries in a Location.", - "canonical": true, - "file": "tensorboard_service.list_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListTensorboardTimeSeriesResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "ListTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_DeleteTensorboardTimeSeries_async", - "title": "DatasetService deleteTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Deletes a TensorboardTimeSeries.", - "canonical": true, - "file": "tensorboard_service.delete_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "DeleteTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_BatchReadTensorboardTimeSeriesData_async", - "title": "DatasetService batchReadTensorboardTimeSeriesData Sample", - "origin": "API_DEFINITION", - "description": " Reads multiple TensorboardTimeSeries' data. The data point number limit is 1000 for scalars, 100 for tensors and blob references. If the number of data points stored is less than the limit, all data will be returned. Otherwise, that limit number of data points will be randomly selected from this time series and returned.", - "canonical": true, - "file": "tensorboard_service.batch_read_tensorboard_time_series_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchReadTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.BatchReadTensorboardTimeSeriesData", - "async": true, - "parameters": [ - { - "name": "tensorboard", - "type": "TYPE_STRING" - }, - { - "name": "time_series", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.BatchReadTensorboardTimeSeriesDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "BatchReadTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.BatchReadTensorboardTimeSeriesData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_ReadTensorboardTimeSeriesData_async", - "title": "DatasetService readTensorboardTimeSeriesData Sample", - "origin": "API_DEFINITION", - "description": " Reads a TensorboardTimeSeries' data. By default, if the number of data points stored is less than 1000, all data will be returned. Otherwise, 1000 data points will be randomly selected from this time series and returned. This value can be changed by changing max_data_points, which can't be greater than 10k.", - "canonical": true, - "file": "tensorboard_service.read_tensorboard_time_series_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardTimeSeriesData", - "async": true, - "parameters": [ - { - "name": "tensorboard_time_series", - "type": "TYPE_STRING" - }, - { - "name": "max_data_points", - "type": "TYPE_INT32" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ReadTensorboardTimeSeriesDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "ReadTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardTimeSeriesData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_ReadTensorboardBlobData_async", - "title": "DatasetService readTensorboardBlobData Sample", - "origin": "API_DEFINITION", - "description": " Gets bytes of TensorboardBlobs. This is to allow reading blob data stored in consumer project's Cloud Storage bucket without users having to obtain Cloud Storage access permission.", - "canonical": true, - "file": "tensorboard_service.read_tensorboard_blob_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadTensorboardBlobData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardBlobData", - "async": true, - "parameters": [ - { - "name": "time_series", - "type": "TYPE_STRING" - }, - { - "name": "blob_ids", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ReadTensorboardBlobDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "ReadTensorboardBlobData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardBlobData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_WriteTensorboardExperimentData_async", - "title": "DatasetService writeTensorboardExperimentData Sample", - "origin": "API_DEFINITION", - "description": " Write time series data points of multiple TensorboardTimeSeries in multiple TensorboardRun's. If any data fail to be ingested, an error will be returned.", - "canonical": true, - "file": "tensorboard_service.write_tensorboard_experiment_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "WriteTensorboardExperimentData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardExperimentData", - "async": true, - "parameters": [ - { - "name": "tensorboard_experiment", - "type": "TYPE_STRING" - }, - { - "name": "write_run_data_requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.WriteTensorboardExperimentDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "WriteTensorboardExperimentData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardExperimentData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_WriteTensorboardRunData_async", - "title": "DatasetService writeTensorboardRunData Sample", - "origin": "API_DEFINITION", - "description": " Write time series data points into multiple TensorboardTimeSeries under a TensorboardRun. If any data fail to be ingested, an error will be returned.", - "canonical": true, - "file": "tensorboard_service.write_tensorboard_run_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "WriteTensorboardRunData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardRunData", - "async": true, - "parameters": [ - { - "name": "tensorboard_run", - "type": "TYPE_STRING" - }, - { - "name": "time_series_data", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1.WriteTensorboardRunDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "WriteTensorboardRunData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardRunData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_ExportTensorboardTimeSeriesData_async", - "title": "DatasetService exportTensorboardTimeSeriesData Sample", - "origin": "API_DEFINITION", - "description": " Exports a TensorboardTimeSeries' data. Data is returned in paginated responses.", - "canonical": true, - "file": "tensorboard_service.export_tensorboard_time_series_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData", - "async": true, - "parameters": [ - { - "name": "tensorboard_time_series", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ExportTensorboardTimeSeriesDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "ExportTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_CreateStudy_async", - "title": "DatasetService createStudy Sample", - "origin": "API_DEFINITION", - "description": " Creates a Study. A resource name will be generated after creation of the Study.", - "canonical": true, - "file": "vizier_service.create_study.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateStudy", - "fullName": "google.cloud.aiplatform.v1.VizierService.CreateStudy", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "study", - "type": ".google.cloud.aiplatform.v1.Study" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Study", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "CreateStudy", - "fullName": "google.cloud.aiplatform.v1.VizierService.CreateStudy", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_GetStudy_async", - "title": "DatasetService getStudy Sample", - "origin": "API_DEFINITION", - "description": " Gets a Study by name.", - "canonical": true, - "file": "vizier_service.get_study.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetStudy", - "fullName": "google.cloud.aiplatform.v1.VizierService.GetStudy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Study", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "GetStudy", - "fullName": "google.cloud.aiplatform.v1.VizierService.GetStudy", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_ListStudies_async", - "title": "DatasetService listStudies Sample", - "origin": "API_DEFINITION", - "description": " Lists all the studies in a region for an associated project.", - "canonical": true, - "file": "vizier_service.list_studies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListStudies", - "fullName": "google.cloud.aiplatform.v1.VizierService.ListStudies", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListStudiesResponse", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "ListStudies", - "fullName": "google.cloud.aiplatform.v1.VizierService.ListStudies", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_DeleteStudy_async", - "title": "DatasetService deleteStudy Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Study.", - "canonical": true, - "file": "vizier_service.delete_study.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteStudy", - "fullName": "google.cloud.aiplatform.v1.VizierService.DeleteStudy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "DeleteStudy", - "fullName": "google.cloud.aiplatform.v1.VizierService.DeleteStudy", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_LookupStudy_async", - "title": "DatasetService lookupStudy Sample", - "origin": "API_DEFINITION", - "description": " Looks a study up using the user-defined display_name field instead of the fully qualified resource name.", - "canonical": true, - "file": "vizier_service.lookup_study.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "LookupStudy", - "fullName": "google.cloud.aiplatform.v1.VizierService.LookupStudy", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "display_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Study", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "LookupStudy", - "fullName": "google.cloud.aiplatform.v1.VizierService.LookupStudy", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_SuggestTrials_async", - "title": "DatasetService suggestTrials Sample", - "origin": "API_DEFINITION", - "description": " Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier. Returns a long-running operation associated with the generation of Trial suggestions. When this long-running operation succeeds, it will contain a [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].", - "canonical": true, - "file": "vizier_service.suggest_trials.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SuggestTrials", - "fullName": "google.cloud.aiplatform.v1.VizierService.SuggestTrials", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "suggestion_count", - "type": "TYPE_INT32" - }, - { - "name": "client_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "SuggestTrials", - "fullName": "google.cloud.aiplatform.v1.VizierService.SuggestTrials", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_CreateTrial_async", - "title": "DatasetService createTrial Sample", - "origin": "API_DEFINITION", - "description": " Adds a user provided Trial to a Study.", - "canonical": true, - "file": "vizier_service.create_trial.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTrial", - "fullName": "google.cloud.aiplatform.v1.VizierService.CreateTrial", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "trial", - "type": ".google.cloud.aiplatform.v1.Trial" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Trial", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "CreateTrial", - "fullName": "google.cloud.aiplatform.v1.VizierService.CreateTrial", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_GetTrial_async", - "title": "DatasetService getTrial Sample", - "origin": "API_DEFINITION", - "description": " Gets a Trial.", - "canonical": true, - "file": "vizier_service.get_trial.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTrial", - "fullName": "google.cloud.aiplatform.v1.VizierService.GetTrial", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Trial", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "GetTrial", - "fullName": "google.cloud.aiplatform.v1.VizierService.GetTrial", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_ListTrials_async", - "title": "DatasetService listTrials Sample", - "origin": "API_DEFINITION", - "description": " Lists the Trials associated with a Study.", - "canonical": true, - "file": "vizier_service.list_trials.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTrials", - "fullName": "google.cloud.aiplatform.v1.VizierService.ListTrials", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListTrialsResponse", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "ListTrials", - "fullName": "google.cloud.aiplatform.v1.VizierService.ListTrials", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_AddTrialMeasurement_async", - "title": "DatasetService addTrialMeasurement Sample", - "origin": "API_DEFINITION", - "description": " Adds a measurement of the objective metrics to a Trial. This measurement is assumed to have been taken before the Trial is complete.", - "canonical": true, - "file": "vizier_service.add_trial_measurement.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AddTrialMeasurement", - "fullName": "google.cloud.aiplatform.v1.VizierService.AddTrialMeasurement", - "async": true, - "parameters": [ - { - "name": "trial_name", - "type": "TYPE_STRING" - }, - { - "name": "measurement", - "type": ".google.cloud.aiplatform.v1.Measurement" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Trial", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "AddTrialMeasurement", - "fullName": "google.cloud.aiplatform.v1.VizierService.AddTrialMeasurement", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_CompleteTrial_async", - "title": "DatasetService completeTrial Sample", - "origin": "API_DEFINITION", - "description": " Marks a Trial as complete.", - "canonical": true, - "file": "vizier_service.complete_trial.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CompleteTrial", - "fullName": "google.cloud.aiplatform.v1.VizierService.CompleteTrial", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "final_measurement", - "type": ".google.cloud.aiplatform.v1.Measurement" - }, - { - "name": "trial_infeasible", - "type": "TYPE_BOOL" - }, - { - "name": "infeasible_reason", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Trial", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "CompleteTrial", - "fullName": "google.cloud.aiplatform.v1.VizierService.CompleteTrial", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_DeleteTrial_async", - "title": "DatasetService deleteTrial Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Trial.", - "canonical": true, - "file": "vizier_service.delete_trial.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTrial", - "fullName": "google.cloud.aiplatform.v1.VizierService.DeleteTrial", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "DeleteTrial", - "fullName": "google.cloud.aiplatform.v1.VizierService.DeleteTrial", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_CheckTrialEarlyStoppingState_async", - "title": "DatasetService checkTrialEarlyStoppingState Sample", - "origin": "API_DEFINITION", - "description": " Checks whether a Trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse].", - "canonical": true, - "file": "vizier_service.check_trial_early_stopping_state.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckTrialEarlyStoppingState", - "fullName": "google.cloud.aiplatform.v1.VizierService.CheckTrialEarlyStoppingState", - "async": true, - "parameters": [ - { - "name": "trial_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "CheckTrialEarlyStoppingState", - "fullName": "google.cloud.aiplatform.v1.VizierService.CheckTrialEarlyStoppingState", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_StopTrial_async", - "title": "DatasetService stopTrial Sample", - "origin": "API_DEFINITION", - "description": " Stops a Trial.", - "canonical": true, - "file": "vizier_service.stop_trial.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StopTrial", - "fullName": "google.cloud.aiplatform.v1.VizierService.StopTrial", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.Trial", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "StopTrial", - "fullName": "google.cloud.aiplatform.v1.VizierService.StopTrial", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1_generated_VizierService_ListOptimalTrials_async", - "title": "DatasetService listOptimalTrials Sample", - "origin": "API_DEFINITION", - "description": " Lists the pareto-optimal Trials for multi-objective Study or the optimal Trials for single-objective Study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency", - "canonical": true, - "file": "vizier_service.list_optimal_trials.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListOptimalTrials", - "fullName": "google.cloud.aiplatform.v1.VizierService.ListOptimalTrials", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ListOptimalTrialsResponse", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1.VizierServiceClient" - }, - "method": { - "shortName": "ListOptimalTrials", - "fullName": "google.cloud.aiplatform.v1.VizierService.ListOptimalTrials", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1.VizierService" - } - } - } - } - ] -} \ No newline at end of file diff --git a/samples/generated/v1/specialist_pool_service.create_specialist_pool.js b/samples/generated/v1/specialist_pool_service.create_specialist_pool.js deleted file mode 100644 index 7293b20e..00000000 --- a/samples/generated/v1/specialist_pool_service.create_specialist_pool.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, specialistPool) { - // [START aiplatform_v1_generated_SpecialistPoolService_CreateSpecialistPool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent Project name for the new SpecialistPool. - * The form is `projects/{project}/locations/{location}`. - */ - // const parent = 'abc123' - /** - * Required. The SpecialistPool to create. - */ - // const specialistPool = {} - - // Imports the Aiplatform library - const {SpecialistPoolServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new SpecialistPoolServiceClient(); - - async function callCreateSpecialistPool() { - // Construct request - const request = { - parent, - specialistPool, - }; - - // Run request - const [operation] = await aiplatformClient.createSpecialistPool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateSpecialistPool(); - // [END aiplatform_v1_generated_SpecialistPoolService_CreateSpecialistPool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/specialist_pool_service.delete_specialist_pool.js b/samples/generated/v1/specialist_pool_service.delete_specialist_pool.js deleted file mode 100644 index af0dbcc5..00000000 --- a/samples/generated/v1/specialist_pool_service.delete_specialist_pool.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_SpecialistPoolService_DeleteSpecialistPool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the SpecialistPool to delete. Format: - * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}` - */ - // const name = 'abc123' - /** - * If set to true, any specialist managers in this SpecialistPool will also be - * deleted. (Otherwise, the request will only work if the SpecialistPool has - * no specialist managers.) - */ - // const force = true - - // Imports the Aiplatform library - const {SpecialistPoolServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new SpecialistPoolServiceClient(); - - async function callDeleteSpecialistPool() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteSpecialistPool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteSpecialistPool(); - // [END aiplatform_v1_generated_SpecialistPoolService_DeleteSpecialistPool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/specialist_pool_service.get_specialist_pool.js b/samples/generated/v1/specialist_pool_service.get_specialist_pool.js deleted file mode 100644 index 686df681..00000000 --- a/samples/generated/v1/specialist_pool_service.get_specialist_pool.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_SpecialistPoolService_GetSpecialistPool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the SpecialistPool resource. - * The form is - * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`. - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {SpecialistPoolServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new SpecialistPoolServiceClient(); - - async function callGetSpecialistPool() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getSpecialistPool(request); - console.log(response); - } - - callGetSpecialistPool(); - // [END aiplatform_v1_generated_SpecialistPoolService_GetSpecialistPool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/specialist_pool_service.list_specialist_pools.js b/samples/generated/v1/specialist_pool_service.list_specialist_pools.js deleted file mode 100644 index e240a9bb..00000000 --- a/samples/generated/v1/specialist_pool_service.list_specialist_pools.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_SpecialistPoolService_ListSpecialistPools_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the SpecialistPool's parent resource. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained by ListSpecialistPoolsResponse.next_page_token google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token of - * the previous SpecialistPoolService.ListSpecialistPools google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools call. Return - * first page if empty. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. FieldMask represents a set of - */ - // const readMask = {} - - // Imports the Aiplatform library - const {SpecialistPoolServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new SpecialistPoolServiceClient(); - - async function callListSpecialistPools() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listSpecialistPoolsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListSpecialistPools(); - // [END aiplatform_v1_generated_SpecialistPoolService_ListSpecialistPools_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/specialist_pool_service.update_specialist_pool.js b/samples/generated/v1/specialist_pool_service.update_specialist_pool.js deleted file mode 100644 index 6cb64c32..00000000 --- a/samples/generated/v1/specialist_pool_service.update_specialist_pool.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(specialistPool, updateMask) { - // [START aiplatform_v1_generated_SpecialistPoolService_UpdateSpecialistPool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The SpecialistPool which replaces the resource on the server. - */ - // const specialistPool = {} - /** - * Required. The update mask applies to the resource. - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {SpecialistPoolServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new SpecialistPoolServiceClient(); - - async function callUpdateSpecialistPool() { - // Construct request - const request = { - specialistPool, - updateMask, - }; - - // Run request - const [operation] = await aiplatformClient.updateSpecialistPool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateSpecialistPool(); - // [END aiplatform_v1_generated_SpecialistPoolService_UpdateSpecialistPool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.batch_create_tensorboard_runs.js b/samples/generated/v1/tensorboard_service.batch_create_tensorboard_runs.js deleted file mode 100644 index 799d7654..00000000 --- a/samples/generated/v1/tensorboard_service.batch_create_tensorboard_runs.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, requests) { - // [START aiplatform_v1_generated_TensorboardService_BatchCreateTensorboardRuns_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardExperiment to create the - * TensorboardRuns in. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - * The parent field in the CreateTensorboardRunRequest messages must match - * this field. - */ - // const parent = 'abc123' - /** - * Required. The request message specifying the TensorboardRuns to create. - * A maximum of 1000 TensorboardRuns can be created in a batch. - */ - // const requests = 1234 - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callBatchCreateTensorboardRuns() { - // Construct request - const request = { - parent, - requests, - }; - - // Run request - const response = await aiplatformClient.batchCreateTensorboardRuns(request); - console.log(response); - } - - callBatchCreateTensorboardRuns(); - // [END aiplatform_v1_generated_TensorboardService_BatchCreateTensorboardRuns_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.batch_create_tensorboard_time_series.js b/samples/generated/v1/tensorboard_service.batch_create_tensorboard_time_series.js deleted file mode 100644 index b2ec7764..00000000 --- a/samples/generated/v1/tensorboard_service.batch_create_tensorboard_time_series.js +++ /dev/null @@ -1,73 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, requests) { - // [START aiplatform_v1_generated_TensorboardService_BatchCreateTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardExperiment to create the - * TensorboardTimeSeries in. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - * The TensorboardRuns referenced by the parent fields in the - * CreateTensorboardTimeSeriesRequest messages must be sub resources of this - * TensorboardExperiment. - */ - // const parent = 'abc123' - /** - * Required. The request message specifying the TensorboardTimeSeries to create. - * A maximum of 1000 TensorboardTimeSeries can be created in a batch. - */ - // const requests = 1234 - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callBatchCreateTensorboardTimeSeries() { - // Construct request - const request = { - parent, - requests, - }; - - // Run request - const response = await aiplatformClient.batchCreateTensorboardTimeSeries(request); - console.log(response); - } - - callBatchCreateTensorboardTimeSeries(); - // [END aiplatform_v1_generated_TensorboardService_BatchCreateTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.batch_read_tensorboard_time_series_data.js b/samples/generated/v1/tensorboard_service.batch_read_tensorboard_time_series_data.js deleted file mode 100644 index 3eee1e7e..00000000 --- a/samples/generated/v1/tensorboard_service.batch_read_tensorboard_time_series_data.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tensorboard, timeSeries) { - // [START aiplatform_v1_generated_TensorboardService_BatchReadTensorboardTimeSeriesData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Tensorboard containing TensorboardTimeSeries to - * read data from. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`. - * The TensorboardTimeSeries referenced by time_series google.cloud.aiplatform.v1.BatchReadTensorboardTimeSeriesDataRequest.time_series must be sub - * resources of this Tensorboard. - */ - // const tensorboard = 'abc123' - /** - * Required. The resource names of the TensorboardTimeSeries to read data from. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const timeSeries = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callBatchReadTensorboardTimeSeriesData() { - // Construct request - const request = { - tensorboard, - timeSeries, - }; - - // Run request - const response = await aiplatformClient.batchReadTensorboardTimeSeriesData(request); - console.log(response); - } - - callBatchReadTensorboardTimeSeriesData(); - // [END aiplatform_v1_generated_TensorboardService_BatchReadTensorboardTimeSeriesData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.create_tensorboard.js b/samples/generated/v1/tensorboard_service.create_tensorboard.js deleted file mode 100644 index 24c676a3..00000000 --- a/samples/generated/v1/tensorboard_service.create_tensorboard.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, tensorboard) { - // [START aiplatform_v1_generated_TensorboardService_CreateTensorboard_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the Tensorboard in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The Tensorboard to create. - */ - // const tensorboard = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callCreateTensorboard() { - // Construct request - const request = { - parent, - tensorboard, - }; - - // Run request - const [operation] = await aiplatformClient.createTensorboard(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateTensorboard(); - // [END aiplatform_v1_generated_TensorboardService_CreateTensorboard_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.create_tensorboard_experiment.js b/samples/generated/v1/tensorboard_service.create_tensorboard_experiment.js deleted file mode 100644 index 7f5eb4fb..00000000 --- a/samples/generated/v1/tensorboard_service.create_tensorboard_experiment.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, tensorboardExperimentId) { - // [START aiplatform_v1_generated_TensorboardService_CreateTensorboardExperiment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Tensorboard to create the TensorboardExperiment - * in. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - */ - // const parent = 'abc123' - /** - * The TensorboardExperiment to create. - */ - // const tensorboardExperiment = {} - /** - * Required. The ID to use for the Tensorboard experiment, which will become the final - * component of the Tensorboard experiment's resource name. - * This value should be 1-128 characters, and valid characters - * are /[a-z][0-9]-/. - */ - // const tensorboardExperimentId = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callCreateTensorboardExperiment() { - // Construct request - const request = { - parent, - tensorboardExperimentId, - }; - - // Run request - const response = await aiplatformClient.createTensorboardExperiment(request); - console.log(response); - } - - callCreateTensorboardExperiment(); - // [END aiplatform_v1_generated_TensorboardService_CreateTensorboardExperiment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.create_tensorboard_run.js b/samples/generated/v1/tensorboard_service.create_tensorboard_run.js deleted file mode 100644 index 3b871b13..00000000 --- a/samples/generated/v1/tensorboard_service.create_tensorboard_run.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, tensorboardRun, tensorboardRunId) { - // [START aiplatform_v1_generated_TensorboardService_CreateTensorboardRun_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardExperiment to create the TensorboardRun - * in. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - */ - // const parent = 'abc123' - /** - * Required. The TensorboardRun to create. - */ - // const tensorboardRun = {} - /** - * Required. The ID to use for the Tensorboard run, which will become the final - * component of the Tensorboard run's resource name. - * This value should be 1-128 characters, and valid characters - * are /[a-z][0-9]-/. - */ - // const tensorboardRunId = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callCreateTensorboardRun() { - // Construct request - const request = { - parent, - tensorboardRun, - tensorboardRunId, - }; - - // Run request - const response = await aiplatformClient.createTensorboardRun(request); - console.log(response); - } - - callCreateTensorboardRun(); - // [END aiplatform_v1_generated_TensorboardService_CreateTensorboardRun_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.create_tensorboard_time_series.js b/samples/generated/v1/tensorboard_service.create_tensorboard_time_series.js deleted file mode 100644 index ab5ce78a..00000000 --- a/samples/generated/v1/tensorboard_service.create_tensorboard_time_series.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, tensorboardTimeSeries) { - // [START aiplatform_v1_generated_TensorboardService_CreateTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardRun to create the - * TensorboardTimeSeries in. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` - */ - // const parent = 'abc123' - /** - * Optional. The user specified unique ID to use for the TensorboardTimeSeries, which - * will become the final component of the TensorboardTimeSeries's resource - * name. - * This value should match "[a-z0-9][a-z0-9-]{0, 127}" - */ - // const tensorboardTimeSeriesId = 'abc123' - /** - * Required. The TensorboardTimeSeries to create. - */ - // const tensorboardTimeSeries = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callCreateTensorboardTimeSeries() { - // Construct request - const request = { - parent, - tensorboardTimeSeries, - }; - - // Run request - const response = await aiplatformClient.createTensorboardTimeSeries(request); - console.log(response); - } - - callCreateTensorboardTimeSeries(); - // [END aiplatform_v1_generated_TensorboardService_CreateTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.delete_tensorboard.js b/samples/generated/v1/tensorboard_service.delete_tensorboard.js deleted file mode 100644 index 15f6a1a5..00000000 --- a/samples/generated/v1/tensorboard_service.delete_tensorboard.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_TensorboardService_DeleteTensorboard_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Tensorboard to be deleted. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callDeleteTensorboard() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteTensorboard(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTensorboard(); - // [END aiplatform_v1_generated_TensorboardService_DeleteTensorboard_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.delete_tensorboard_experiment.js b/samples/generated/v1/tensorboard_service.delete_tensorboard_experiment.js deleted file mode 100644 index 8a5210aa..00000000 --- a/samples/generated/v1/tensorboard_service.delete_tensorboard_experiment.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_TensorboardService_DeleteTensorboardExperiment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardExperiment to be deleted. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callDeleteTensorboardExperiment() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteTensorboardExperiment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTensorboardExperiment(); - // [END aiplatform_v1_generated_TensorboardService_DeleteTensorboardExperiment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.delete_tensorboard_run.js b/samples/generated/v1/tensorboard_service.delete_tensorboard_run.js deleted file mode 100644 index 59eff3b2..00000000 --- a/samples/generated/v1/tensorboard_service.delete_tensorboard_run.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_TensorboardService_DeleteTensorboardRun_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardRun to be deleted. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callDeleteTensorboardRun() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteTensorboardRun(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTensorboardRun(); - // [END aiplatform_v1_generated_TensorboardService_DeleteTensorboardRun_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.delete_tensorboard_time_series.js b/samples/generated/v1/tensorboard_service.delete_tensorboard_time_series.js deleted file mode 100644 index c826a7c2..00000000 --- a/samples/generated/v1/tensorboard_service.delete_tensorboard_time_series.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_TensorboardService_DeleteTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardTimeSeries to be deleted. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callDeleteTensorboardTimeSeries() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteTensorboardTimeSeries(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTensorboardTimeSeries(); - // [END aiplatform_v1_generated_TensorboardService_DeleteTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js b/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js deleted file mode 100644 index cab15668..00000000 --- a/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js +++ /dev/null @@ -1,90 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tensorboardTimeSeries) { - // [START aiplatform_v1_generated_TensorboardService_ExportTensorboardTimeSeriesData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardTimeSeries to export data from. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const tensorboardTimeSeries = 'abc123' - /** - * Exports the TensorboardTimeSeries' data that match the filter expression. - */ - // const filter = 'abc123' - /** - * The maximum number of data points to return per page. - * The default page_size will be 1000. Values must be between 1 and 10000. - * Values above 10000 will be coerced to 10000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * TensorboardService.ExportTensorboardTimeSeries call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * TensorboardService.ExportTensorboardTimeSeries must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Field to use to sort the TensorboardTimeSeries' data. - * By default, TensorboardTimeSeries' data will be returned in a pseudo random - * order. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callExportTensorboardTimeSeriesData() { - // Construct request - const request = { - tensorboardTimeSeries, - }; - - // Run request - const iterable = await aiplatformClient.exportTensorboardTimeSeriesDataAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callExportTensorboardTimeSeriesData(); - // [END aiplatform_v1_generated_TensorboardService_ExportTensorboardTimeSeriesData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.get_tensorboard.js b/samples/generated/v1/tensorboard_service.get_tensorboard.js deleted file mode 100644 index 64941c8c..00000000 --- a/samples/generated/v1/tensorboard_service.get_tensorboard.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_TensorboardService_GetTensorboard_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Tensorboard resource. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callGetTensorboard() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTensorboard(request); - console.log(response); - } - - callGetTensorboard(); - // [END aiplatform_v1_generated_TensorboardService_GetTensorboard_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.get_tensorboard_experiment.js b/samples/generated/v1/tensorboard_service.get_tensorboard_experiment.js deleted file mode 100644 index 8e15bba4..00000000 --- a/samples/generated/v1/tensorboard_service.get_tensorboard_experiment.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_TensorboardService_GetTensorboardExperiment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardExperiment resource. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callGetTensorboardExperiment() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTensorboardExperiment(request); - console.log(response); - } - - callGetTensorboardExperiment(); - // [END aiplatform_v1_generated_TensorboardService_GetTensorboardExperiment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.get_tensorboard_run.js b/samples/generated/v1/tensorboard_service.get_tensorboard_run.js deleted file mode 100644 index 73c3a736..00000000 --- a/samples/generated/v1/tensorboard_service.get_tensorboard_run.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_TensorboardService_GetTensorboardRun_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardRun resource. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callGetTensorboardRun() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTensorboardRun(request); - console.log(response); - } - - callGetTensorboardRun(); - // [END aiplatform_v1_generated_TensorboardService_GetTensorboardRun_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.get_tensorboard_time_series.js b/samples/generated/v1/tensorboard_service.get_tensorboard_time_series.js deleted file mode 100644 index a184731d..00000000 --- a/samples/generated/v1/tensorboard_service.get_tensorboard_time_series.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_TensorboardService_GetTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardTimeSeries resource. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callGetTensorboardTimeSeries() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTensorboardTimeSeries(request); - console.log(response); - } - - callGetTensorboardTimeSeries(); - // [END aiplatform_v1_generated_TensorboardService_GetTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.list_tensorboard_experiments.js b/samples/generated/v1/tensorboard_service.list_tensorboard_experiments.js deleted file mode 100644 index 18ba1611..00000000 --- a/samples/generated/v1/tensorboard_service.list_tensorboard_experiments.js +++ /dev/null @@ -1,93 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_TensorboardService_ListTensorboardExperiments_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Tensorboard to list TensorboardExperiments. - * Format: - * 'projects/{project}/locations/{location}/tensorboards/{tensorboard}' - */ - // const parent = 'abc123' - /** - * Lists the TensorboardExperiments that match the filter expression. - */ - // const filter = 'abc123' - /** - * The maximum number of TensorboardExperiments to return. The service may - * return fewer than this value. If unspecified, at most 50 - * TensorboardExperiments will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * TensorboardService.ListTensorboardExperiments google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * TensorboardService.ListTensorboardExperiments google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callListTensorboardExperiments() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTensorboardExperimentsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTensorboardExperiments(); - // [END aiplatform_v1_generated_TensorboardService_ListTensorboardExperiments_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.list_tensorboard_runs.js b/samples/generated/v1/tensorboard_service.list_tensorboard_runs.js deleted file mode 100644 index a23885eb..00000000 --- a/samples/generated/v1/tensorboard_service.list_tensorboard_runs.js +++ /dev/null @@ -1,93 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_TensorboardService_ListTensorboardRuns_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardExperiment to list TensorboardRuns. - * Format: - * 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}' - */ - // const parent = 'abc123' - /** - * Lists the TensorboardRuns that match the filter expression. - */ - // const filter = 'abc123' - /** - * The maximum number of TensorboardRuns to return. The service may return - * fewer than this value. If unspecified, at most 50 TensorboardRuns will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * TensorboardService.ListTensorboardRuns google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * TensorboardService.ListTensorboardRuns google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callListTensorboardRuns() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTensorboardRunsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTensorboardRuns(); - // [END aiplatform_v1_generated_TensorboardService_ListTensorboardRuns_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.list_tensorboard_time_series.js b/samples/generated/v1/tensorboard_service.list_tensorboard_time_series.js deleted file mode 100644 index 42d7cf63..00000000 --- a/samples/generated/v1/tensorboard_service.list_tensorboard_time_series.js +++ /dev/null @@ -1,93 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_TensorboardService_ListTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardRun to list TensorboardTimeSeries. - * Format: - * 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}' - */ - // const parent = 'abc123' - /** - * Lists the TensorboardTimeSeries that match the filter expression. - */ - // const filter = 'abc123' - /** - * The maximum number of TensorboardTimeSeries to return. The service may - * return fewer than this value. If unspecified, at most 50 - * TensorboardTimeSeries will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * TensorboardService.ListTensorboardTimeSeries google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * TensorboardService.ListTensorboardTimeSeries google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callListTensorboardTimeSeries() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTensorboardTimeSeriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTensorboardTimeSeries(); - // [END aiplatform_v1_generated_TensorboardService_ListTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.list_tensorboards.js b/samples/generated/v1/tensorboard_service.list_tensorboards.js deleted file mode 100644 index 382c9563..00000000 --- a/samples/generated/v1/tensorboard_service.list_tensorboards.js +++ /dev/null @@ -1,93 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_TensorboardService_ListTensorboards_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list Tensorboards. - * Format: - * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Lists the Tensorboards that match the filter expression. - */ - // const filter = 'abc123' - /** - * The maximum number of Tensorboards to return. The service may return - * fewer than this value. If unspecified, at most 100 Tensorboards will be - * returned. The maximum value is 100; values above 100 will be coerced to - * 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * TensorboardService.ListTensorboards google.cloud.aiplatform.v1.TensorboardService.ListTensorboards call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * TensorboardService.ListTensorboards google.cloud.aiplatform.v1.TensorboardService.ListTensorboards must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callListTensorboards() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTensorboardsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTensorboards(); - // [END aiplatform_v1_generated_TensorboardService_ListTensorboards_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.read_tensorboard_blob_data.js b/samples/generated/v1/tensorboard_service.read_tensorboard_blob_data.js deleted file mode 100644 index 80de1a94..00000000 --- a/samples/generated/v1/tensorboard_service.read_tensorboard_blob_data.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(timeSeries) { - // [START aiplatform_v1_generated_TensorboardService_ReadTensorboardBlobData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardTimeSeries to list Blobs. - * Format: - * 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}' - */ - // const timeSeries = 'abc123' - /** - * IDs of the blobs to read. - */ - // const blobIds = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callReadTensorboardBlobData() { - // Construct request - const request = { - timeSeries, - }; - - // Run request - const stream = await aiplatformClient.readTensorboardBlobData(request); - stream.on('data', (response) => { console.log(response) }); - stream.on('error', (err) => { throw(err) }); - stream.on('end', () => { /* API call completed */ }); - } - - callReadTensorboardBlobData(); - // [END aiplatform_v1_generated_TensorboardService_ReadTensorboardBlobData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.read_tensorboard_time_series_data.js b/samples/generated/v1/tensorboard_service.read_tensorboard_time_series_data.js deleted file mode 100644 index 78c9fe0d..00000000 --- a/samples/generated/v1/tensorboard_service.read_tensorboard_time_series_data.js +++ /dev/null @@ -1,73 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tensorboardTimeSeries) { - // [START aiplatform_v1_generated_TensorboardService_ReadTensorboardTimeSeriesData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardTimeSeries to read data from. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const tensorboardTimeSeries = 'abc123' - /** - * The maximum number of TensorboardTimeSeries' data to return. - * This value should be a positive integer. - * This value can be set to -1 to return all data. - */ - // const maxDataPoints = 1234 - /** - * Reads the TensorboardTimeSeries' data that match the filter expression. - */ - // const filter = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callReadTensorboardTimeSeriesData() { - // Construct request - const request = { - tensorboardTimeSeries, - }; - - // Run request - const response = await aiplatformClient.readTensorboardTimeSeriesData(request); - console.log(response); - } - - callReadTensorboardTimeSeriesData(); - // [END aiplatform_v1_generated_TensorboardService_ReadTensorboardTimeSeriesData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.update_tensorboard.js b/samples/generated/v1/tensorboard_service.update_tensorboard.js deleted file mode 100644 index a7e18a29..00000000 --- a/samples/generated/v1/tensorboard_service.update_tensorboard.js +++ /dev/null @@ -1,74 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, tensorboard) { - // [START aiplatform_v1_generated_TensorboardService_UpdateTensorboard_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Tensorboard resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten if new - * values are specified. - */ - // const updateMask = {} - /** - * Required. The Tensorboard's `name` field is used to identify the - * Tensorboard to be updated. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - */ - // const tensorboard = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callUpdateTensorboard() { - // Construct request - const request = { - updateMask, - tensorboard, - }; - - // Run request - const [operation] = await aiplatformClient.updateTensorboard(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateTensorboard(); - // [END aiplatform_v1_generated_TensorboardService_UpdateTensorboard_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.update_tensorboard_experiment.js b/samples/generated/v1/tensorboard_service.update_tensorboard_experiment.js deleted file mode 100644 index a7d2f468..00000000 --- a/samples/generated/v1/tensorboard_service.update_tensorboard_experiment.js +++ /dev/null @@ -1,73 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, tensorboardExperiment) { - // [START aiplatform_v1_generated_TensorboardService_UpdateTensorboardExperiment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * TensorboardExperiment resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten if new - * values are specified. - */ - // const updateMask = {} - /** - * Required. The TensorboardExperiment's `name` field is used to identify the - * TensorboardExperiment to be updated. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - */ - // const tensorboardExperiment = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callUpdateTensorboardExperiment() { - // Construct request - const request = { - updateMask, - tensorboardExperiment, - }; - - // Run request - const response = await aiplatformClient.updateTensorboardExperiment(request); - console.log(response); - } - - callUpdateTensorboardExperiment(); - // [END aiplatform_v1_generated_TensorboardService_UpdateTensorboardExperiment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.update_tensorboard_run.js b/samples/generated/v1/tensorboard_service.update_tensorboard_run.js deleted file mode 100644 index bb39cc2f..00000000 --- a/samples/generated/v1/tensorboard_service.update_tensorboard_run.js +++ /dev/null @@ -1,73 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, tensorboardRun) { - // [START aiplatform_v1_generated_TensorboardService_UpdateTensorboardRun_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * TensorboardRun resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten if new - * values are specified. - */ - // const updateMask = {} - /** - * Required. The TensorboardRun's `name` field is used to identify the TensorboardRun to - * be updated. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` - */ - // const tensorboardRun = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callUpdateTensorboardRun() { - // Construct request - const request = { - updateMask, - tensorboardRun, - }; - - // Run request - const response = await aiplatformClient.updateTensorboardRun(request); - console.log(response); - } - - callUpdateTensorboardRun(); - // [END aiplatform_v1_generated_TensorboardService_UpdateTensorboardRun_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.update_tensorboard_time_series.js b/samples/generated/v1/tensorboard_service.update_tensorboard_time_series.js deleted file mode 100644 index e088739b..00000000 --- a/samples/generated/v1/tensorboard_service.update_tensorboard_time_series.js +++ /dev/null @@ -1,74 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, tensorboardTimeSeries) { - // [START aiplatform_v1_generated_TensorboardService_UpdateTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * TensorboardTimeSeries resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten if new - * values are specified. - */ - // const updateMask = {} - /** - * Required. The TensorboardTimeSeries' `name` field is used to identify the - * TensorboardTimeSeries to be updated. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const tensorboardTimeSeries = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callUpdateTensorboardTimeSeries() { - // Construct request - const request = { - updateMask, - tensorboardTimeSeries, - }; - - // Run request - const response = await aiplatformClient.updateTensorboardTimeSeries(request); - console.log(response); - } - - callUpdateTensorboardTimeSeries(); - // [END aiplatform_v1_generated_TensorboardService_UpdateTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.write_tensorboard_experiment_data.js b/samples/generated/v1/tensorboard_service.write_tensorboard_experiment_data.js deleted file mode 100644 index 1d4b1f72..00000000 --- a/samples/generated/v1/tensorboard_service.write_tensorboard_experiment_data.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tensorboardExperiment, writeRunDataRequests) { - // [START aiplatform_v1_generated_TensorboardService_WriteTensorboardExperimentData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardExperiment to write data to. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - */ - // const tensorboardExperiment = 'abc123' - /** - * Required. Requests containing per-run TensorboardTimeSeries data to write. - */ - // const writeRunDataRequests = 1234 - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callWriteTensorboardExperimentData() { - // Construct request - const request = { - tensorboardExperiment, - writeRunDataRequests, - }; - - // Run request - const response = await aiplatformClient.writeTensorboardExperimentData(request); - console.log(response); - } - - callWriteTensorboardExperimentData(); - // [END aiplatform_v1_generated_TensorboardService_WriteTensorboardExperimentData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/tensorboard_service.write_tensorboard_run_data.js b/samples/generated/v1/tensorboard_service.write_tensorboard_run_data.js deleted file mode 100644 index 3832a834..00000000 --- a/samples/generated/v1/tensorboard_service.write_tensorboard_run_data.js +++ /dev/null @@ -1,72 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tensorboardRun, timeSeriesData) { - // [START aiplatform_v1_generated_TensorboardService_WriteTensorboardRunData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardRun to write data to. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` - */ - // const tensorboardRun = 'abc123' - /** - * Required. The TensorboardTimeSeries data to write. - * Values with in a time series are indexed by their step value. - * Repeated writes to the same step will overwrite the existing value for that - * step. - * The upper limit of data points per write request is 5000. - */ - // const timeSeriesData = 1234 - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callWriteTensorboardRunData() { - // Construct request - const request = { - tensorboardRun, - timeSeriesData, - }; - - // Run request - const response = await aiplatformClient.writeTensorboardRunData(request); - console.log(response); - } - - callWriteTensorboardRunData(); - // [END aiplatform_v1_generated_TensorboardService_WriteTensorboardRunData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.add_trial_measurement.js b/samples/generated/v1/vizier_service.add_trial_measurement.js deleted file mode 100644 index 4f82bef7..00000000 --- a/samples/generated/v1/vizier_service.add_trial_measurement.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(trialName, measurement) { - // [START aiplatform_v1_generated_VizierService_AddTrialMeasurement_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the trial to add measurement. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const trialName = 'abc123' - /** - * Required. The measurement to be added to a Trial. - */ - // const measurement = {} - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callAddTrialMeasurement() { - // Construct request - const request = { - trialName, - measurement, - }; - - // Run request - const response = await aiplatformClient.addTrialMeasurement(request); - console.log(response); - } - - callAddTrialMeasurement(); - // [END aiplatform_v1_generated_VizierService_AddTrialMeasurement_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.check_trial_early_stopping_state.js b/samples/generated/v1/vizier_service.check_trial_early_stopping_state.js deleted file mode 100644 index 3e2a0bee..00000000 --- a/samples/generated/v1/vizier_service.check_trial_early_stopping_state.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(trialName) { - // [START aiplatform_v1_generated_VizierService_CheckTrialEarlyStoppingState_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Trial's name. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const trialName = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callCheckTrialEarlyStoppingState() { - // Construct request - const request = { - trialName, - }; - - // Run request - const [operation] = await aiplatformClient.checkTrialEarlyStoppingState(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCheckTrialEarlyStoppingState(); - // [END aiplatform_v1_generated_VizierService_CheckTrialEarlyStoppingState_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.complete_trial.js b/samples/generated/v1/vizier_service.complete_trial.js deleted file mode 100644 index 7959a784..00000000 --- a/samples/generated/v1/vizier_service.complete_trial.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_VizierService_CompleteTrial_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Trial's name. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const name = 'abc123' - /** - * Optional. If provided, it will be used as the completed Trial's - * final_measurement; Otherwise, the service will auto-select a - * previously reported measurement as the final-measurement - */ - // const finalMeasurement = {} - /** - * Optional. True if the Trial cannot be run with the given Parameter, and - * final_measurement will be ignored. - */ - // const trialInfeasible = true - /** - * Optional. A human readable reason why the trial was infeasible. This should - * only be provided if `trial_infeasible` is true. - */ - // const infeasibleReason = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callCompleteTrial() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.completeTrial(request); - console.log(response); - } - - callCompleteTrial(); - // [END aiplatform_v1_generated_VizierService_CompleteTrial_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.create_study.js b/samples/generated/v1/vizier_service.create_study.js deleted file mode 100644 index 9ba62741..00000000 --- a/samples/generated/v1/vizier_service.create_study.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, study) { - // [START aiplatform_v1_generated_VizierService_CreateStudy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the CustomJob in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The Study configuration used to create the Study. - */ - // const study = {} - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callCreateStudy() { - // Construct request - const request = { - parent, - study, - }; - - // Run request - const response = await aiplatformClient.createStudy(request); - console.log(response); - } - - callCreateStudy(); - // [END aiplatform_v1_generated_VizierService_CreateStudy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.create_trial.js b/samples/generated/v1/vizier_service.create_trial.js deleted file mode 100644 index 22234d93..00000000 --- a/samples/generated/v1/vizier_service.create_trial.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, trial) { - // [START aiplatform_v1_generated_VizierService_CreateTrial_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Study to create the Trial in. - * Format: `projects/{project}/locations/{location}/studies/{study}` - */ - // const parent = 'abc123' - /** - * Required. The Trial to create. - */ - // const trial = {} - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callCreateTrial() { - // Construct request - const request = { - parent, - trial, - }; - - // Run request - const response = await aiplatformClient.createTrial(request); - console.log(response); - } - - callCreateTrial(); - // [END aiplatform_v1_generated_VizierService_CreateTrial_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.delete_study.js b/samples/generated/v1/vizier_service.delete_study.js deleted file mode 100644 index f02d7776..00000000 --- a/samples/generated/v1/vizier_service.delete_study.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_VizierService_DeleteStudy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Study resource to be deleted. - * Format: `projects/{project}/locations/{location}/studies/{study}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callDeleteStudy() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.deleteStudy(request); - console.log(response); - } - - callDeleteStudy(); - // [END aiplatform_v1_generated_VizierService_DeleteStudy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.delete_trial.js b/samples/generated/v1/vizier_service.delete_trial.js deleted file mode 100644 index cea002eb..00000000 --- a/samples/generated/v1/vizier_service.delete_trial.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_VizierService_DeleteTrial_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Trial's name. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callDeleteTrial() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.deleteTrial(request); - console.log(response); - } - - callDeleteTrial(); - // [END aiplatform_v1_generated_VizierService_DeleteTrial_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.get_study.js b/samples/generated/v1/vizier_service.get_study.js deleted file mode 100644 index 9433a10e..00000000 --- a/samples/generated/v1/vizier_service.get_study.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_VizierService_GetStudy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Study resource. - * Format: `projects/{project}/locations/{location}/studies/{study}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callGetStudy() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getStudy(request); - console.log(response); - } - - callGetStudy(); - // [END aiplatform_v1_generated_VizierService_GetStudy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.get_trial.js b/samples/generated/v1/vizier_service.get_trial.js deleted file mode 100644 index 12cf8b9a..00000000 --- a/samples/generated/v1/vizier_service.get_trial.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_VizierService_GetTrial_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Trial resource. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callGetTrial() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTrial(request); - console.log(response); - } - - callGetTrial(); - // [END aiplatform_v1_generated_VizierService_GetTrial_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.list_optimal_trials.js b/samples/generated/v1/vizier_service.list_optimal_trials.js deleted file mode 100644 index beb5b901..00000000 --- a/samples/generated/v1/vizier_service.list_optimal_trials.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_VizierService_ListOptimalTrials_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Study that the optimal Trial belongs to. - */ - // const parent = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callListOptimalTrials() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await aiplatformClient.listOptimalTrials(request); - console.log(response); - } - - callListOptimalTrials(); - // [END aiplatform_v1_generated_VizierService_ListOptimalTrials_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.list_studies.js b/samples/generated/v1/vizier_service.list_studies.js deleted file mode 100644 index d1cc9b92..00000000 --- a/samples/generated/v1/vizier_service.list_studies.js +++ /dev/null @@ -1,74 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_VizierService_ListStudies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the Study from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. A page token to request the next page of results. - * If unspecified, there are no subsequent pages. - */ - // const pageToken = 'abc123' - /** - * Optional. The maximum number of studies to return per "page" of results. - * If unspecified, service will pick an appropriate default. - */ - // const pageSize = 1234 - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callListStudies() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listStudiesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListStudies(); - // [END aiplatform_v1_generated_VizierService_ListStudies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.list_trials.js b/samples/generated/v1/vizier_service.list_trials.js deleted file mode 100644 index 8d98e211..00000000 --- a/samples/generated/v1/vizier_service.list_trials.js +++ /dev/null @@ -1,74 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1_generated_VizierService_ListTrials_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Study to list the Trial from. - * Format: `projects/{project}/locations/{location}/studies/{study}` - */ - // const parent = 'abc123' - /** - * Optional. A page token to request the next page of results. - * If unspecified, there are no subsequent pages. - */ - // const pageToken = 'abc123' - /** - * Optional. The number of Trials to retrieve per "page" of results. - * If unspecified, the service will pick an appropriate default. - */ - // const pageSize = 1234 - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callListTrials() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTrialsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTrials(); - // [END aiplatform_v1_generated_VizierService_ListTrials_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.lookup_study.js b/samples/generated/v1/vizier_service.lookup_study.js deleted file mode 100644 index 7d346802..00000000 --- a/samples/generated/v1/vizier_service.lookup_study.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, displayName) { - // [START aiplatform_v1_generated_VizierService_LookupStudy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to get the Study from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The user-defined display name of the Study - */ - // const displayName = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callLookupStudy() { - // Construct request - const request = { - parent, - displayName, - }; - - // Run request - const response = await aiplatformClient.lookupStudy(request); - console.log(response); - } - - callLookupStudy(); - // [END aiplatform_v1_generated_VizierService_LookupStudy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.stop_trial.js b/samples/generated/v1/vizier_service.stop_trial.js deleted file mode 100644 index 06c84064..00000000 --- a/samples/generated/v1/vizier_service.stop_trial.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1_generated_VizierService_StopTrial_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Trial's name. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callStopTrial() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.stopTrial(request); - console.log(response); - } - - callStopTrial(); - // [END aiplatform_v1_generated_VizierService_StopTrial_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/vizier_service.suggest_trials.js b/samples/generated/v1/vizier_service.suggest_trials.js deleted file mode 100644 index de1c3454..00000000 --- a/samples/generated/v1/vizier_service.suggest_trials.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, suggestionCount, clientId) { - // [START aiplatform_v1_generated_VizierService_SuggestTrials_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location that the Study belongs to. - * Format: `projects/{project}/locations/{location}/studies/{study}` - */ - // const parent = 'abc123' - /** - * Required. The number of suggestions requested. It must be positive. - */ - // const suggestionCount = 1234 - /** - * Required. The identifier of the client that is requesting the suggestion. - * If multiple SuggestTrialsRequests have the same `client_id`, - * the service will return the identical suggested Trial if the Trial is - * pending, and provide a new Trial if the last suggested Trial was completed. - */ - // const clientId = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callSuggestTrials() { - // Construct request - const request = { - parent, - suggestionCount, - clientId, - }; - - // Run request - const [operation] = await aiplatformClient.suggestTrials(request); - const [response] = await operation.promise(); - console.log(response); - } - - callSuggestTrials(); - // [END aiplatform_v1_generated_VizierService_SuggestTrials_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.create_dataset.js b/samples/generated/v1beta1/dataset_service.create_dataset.js deleted file mode 100644 index b0c64681..00000000 --- a/samples/generated/v1beta1/dataset_service.create_dataset.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, dataset) { - // [START aiplatform_v1beta1_generated_DatasetService_CreateDataset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the Dataset in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The Dataset to create. - */ - // const dataset = {} - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callCreateDataset() { - // Construct request - const request = { - parent, - dataset, - }; - - // Run request - const [operation] = await aiplatformClient.createDataset(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateDataset(); - // [END aiplatform_v1beta1_generated_DatasetService_CreateDataset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.delete_dataset.js b/samples/generated/v1beta1/dataset_service.delete_dataset.js deleted file mode 100644 index 6432c8d6..00000000 --- a/samples/generated/v1beta1/dataset_service.delete_dataset.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_DatasetService_DeleteDataset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Dataset to delete. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callDeleteDataset() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteDataset(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDataset(); - // [END aiplatform_v1beta1_generated_DatasetService_DeleteDataset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.export_data.js b/samples/generated/v1beta1/dataset_service.export_data.js deleted file mode 100644 index 63939a79..00000000 --- a/samples/generated/v1beta1/dataset_service.export_data.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, exportConfig) { - // [START aiplatform_v1beta1_generated_DatasetService_ExportData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Dataset resource. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}` - */ - // const name = 'abc123' - /** - * Required. The desired output location. - */ - // const exportConfig = {} - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callExportData() { - // Construct request - const request = { - name, - exportConfig, - }; - - // Run request - const [operation] = await aiplatformClient.exportData(request); - const [response] = await operation.promise(); - console.log(response); - } - - callExportData(); - // [END aiplatform_v1beta1_generated_DatasetService_ExportData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.get_annotation_spec.js b/samples/generated/v1beta1/dataset_service.get_annotation_spec.js deleted file mode 100644 index a7fc64fe..00000000 --- a/samples/generated/v1beta1/dataset_service.get_annotation_spec.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_DatasetService_GetAnnotationSpec_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the AnnotationSpec resource. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` - */ - // const name = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callGetAnnotationSpec() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getAnnotationSpec(request); - console.log(response); - } - - callGetAnnotationSpec(); - // [END aiplatform_v1beta1_generated_DatasetService_GetAnnotationSpec_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.get_dataset.js b/samples/generated/v1beta1/dataset_service.get_dataset.js deleted file mode 100644 index 71879dc8..00000000 --- a/samples/generated/v1beta1/dataset_service.get_dataset.js +++ /dev/null @@ -1,65 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_DatasetService_GetDataset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Dataset resource. - */ - // const name = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callGetDataset() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getDataset(request); - console.log(response); - } - - callGetDataset(); - // [END aiplatform_v1beta1_generated_DatasetService_GetDataset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.import_data.js b/samples/generated/v1beta1/dataset_service.import_data.js deleted file mode 100644 index 0cb8aa08..00000000 --- a/samples/generated/v1beta1/dataset_service.import_data.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, importConfigs) { - // [START aiplatform_v1beta1_generated_DatasetService_ImportData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Dataset resource. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}` - */ - // const name = 'abc123' - /** - * Required. The desired input locations. The contents of all input locations will be - * imported in one batch. - */ - // const importConfigs = 1234 - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callImportData() { - // Construct request - const request = { - name, - importConfigs, - }; - - // Run request - const [operation] = await aiplatformClient.importData(request); - const [response] = await operation.promise(); - console.log(response); - } - - callImportData(); - // [END aiplatform_v1beta1_generated_DatasetService_ImportData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.list_annotations.js b/samples/generated/v1beta1/dataset_service.list_annotations.js deleted file mode 100644 index 9fc64663..00000000 --- a/samples/generated/v1beta1/dataset_service.list_annotations.js +++ /dev/null @@ -1,86 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_DatasetService_ListAnnotations_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataItem to list Annotations from. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callListAnnotations() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listAnnotationsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAnnotations(); - // [END aiplatform_v1beta1_generated_DatasetService_ListAnnotations_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.list_data_items.js b/samples/generated/v1beta1/dataset_service.list_data_items.js deleted file mode 100644 index a4d6f655..00000000 --- a/samples/generated/v1beta1/dataset_service.list_data_items.js +++ /dev/null @@ -1,86 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_DatasetService_ListDataItems_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Dataset to list DataItems from. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callListDataItems() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listDataItemsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDataItems(); - // [END aiplatform_v1beta1_generated_DatasetService_ListDataItems_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.list_datasets.js b/samples/generated/v1beta1/dataset_service.list_datasets.js deleted file mode 100644 index e63d0d90..00000000 --- a/samples/generated/v1beta1/dataset_service.list_datasets.js +++ /dev/null @@ -1,99 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_DatasetService_ListDatasets_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Dataset's parent resource. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * An expression for filtering the results of the request. For field names - * both snake_case and camelCase are supported. - * * `display_name`: supports = and != - * * `metadata_schema_uri`: supports = and != - * * `labels` supports general map functions that is: - * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence - * * A key including a space must be quoted. `labels."a key"`. - * Some examples: - * * `displayName="myDisplayName"` - * * `labels.myKey="myValue"` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - * Supported fields: - * * `display_name` - * * `create_time` - * * `update_time` - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callListDatasets() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listDatasetsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDatasets(); - // [END aiplatform_v1beta1_generated_DatasetService_ListDatasets_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.list_saved_queries.js b/samples/generated/v1beta1/dataset_service.list_saved_queries.js deleted file mode 100644 index 642b10d8..00000000 --- a/samples/generated/v1beta1/dataset_service.list_saved_queries.js +++ /dev/null @@ -1,86 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_DatasetService_ListSavedQueries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Dataset to list SavedQueries from. - * Format: - * `projects/{project}/locations/{location}/datasets/{dataset}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callListSavedQueries() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listSavedQueriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListSavedQueries(); - // [END aiplatform_v1beta1_generated_DatasetService_ListSavedQueries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataset_service.update_dataset.js b/samples/generated/v1beta1/dataset_service.update_dataset.js deleted file mode 100644 index 554a1882..00000000 --- a/samples/generated/v1beta1/dataset_service.update_dataset.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(dataset, updateMask) { - // [START aiplatform_v1beta1_generated_DatasetService_UpdateDataset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Dataset which replaces the resource on the server. - */ - // const dataset = {} - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see google.protobuf.FieldMask google.protobuf.FieldMask. - * Updatable fields: - * * `display_name` - * * `description` - * * `labels` - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DatasetServiceClient(); - - async function callUpdateDataset() { - // Construct request - const request = { - dataset, - updateMask, - }; - - // Run request - const response = await aiplatformClient.updateDataset(request); - console.log(response); - } - - callUpdateDataset(); - // [END aiplatform_v1beta1_generated_DatasetService_UpdateDataset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/deployment_resource_pool_service.create_deployment_resource_pool.js b/samples/generated/v1beta1/deployment_resource_pool_service.create_deployment_resource_pool.js deleted file mode 100644 index 7d4e8f3a..00000000 --- a/samples/generated/v1beta1/deployment_resource_pool_service.create_deployment_resource_pool.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, deploymentResourcePool, deploymentResourcePoolId) { - // [START aiplatform_v1beta1_generated_DeploymentResourcePoolService_CreateDeploymentResourcePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent location resource where this DeploymentResourcePool will be - * created. Format: projects/{project}/locations/{location} - */ - // const parent = 'abc123' - /** - * Required. The DeploymentResourcePool to create. - */ - // const deploymentResourcePool = {} - /** - * Required. The ID to use for the DeploymentResourcePool, which - * will become the final component of the DeploymentResourcePool's resource - * name. - * The maximum length is 63 characters, and valid characters - * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. - */ - // const deploymentResourcePoolId = 'abc123' - - // Imports the Aiplatform library - const {DeploymentResourcePoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DeploymentResourcePoolServiceClient(); - - async function callCreateDeploymentResourcePool() { - // Construct request - const request = { - parent, - deploymentResourcePool, - deploymentResourcePoolId, - }; - - // Run request - const [operation] = await aiplatformClient.createDeploymentResourcePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateDeploymentResourcePool(); - // [END aiplatform_v1beta1_generated_DeploymentResourcePoolService_CreateDeploymentResourcePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/deployment_resource_pool_service.delete_deployment_resource_pool.js b/samples/generated/v1beta1/deployment_resource_pool_service.delete_deployment_resource_pool.js deleted file mode 100644 index 4ce318f1..00000000 --- a/samples/generated/v1beta1/deployment_resource_pool_service.delete_deployment_resource_pool.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_DeploymentResourcePoolService_DeleteDeploymentResourcePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the DeploymentResourcePool to delete. - * Format: - * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {DeploymentResourcePoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DeploymentResourcePoolServiceClient(); - - async function callDeleteDeploymentResourcePool() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteDeploymentResourcePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDeploymentResourcePool(); - // [END aiplatform_v1beta1_generated_DeploymentResourcePoolService_DeleteDeploymentResourcePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/deployment_resource_pool_service.get_deployment_resource_pool.js b/samples/generated/v1beta1/deployment_resource_pool_service.get_deployment_resource_pool.js deleted file mode 100644 index 5f41499f..00000000 --- a/samples/generated/v1beta1/deployment_resource_pool_service.get_deployment_resource_pool.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_DeploymentResourcePoolService_GetDeploymentResourcePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the DeploymentResourcePool to retrieve. - * Format: - * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {DeploymentResourcePoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DeploymentResourcePoolServiceClient(); - - async function callGetDeploymentResourcePool() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getDeploymentResourcePool(request); - console.log(response); - } - - callGetDeploymentResourcePool(); - // [END aiplatform_v1beta1_generated_DeploymentResourcePoolService_GetDeploymentResourcePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/deployment_resource_pool_service.list_deployment_resource_pools.js b/samples/generated/v1beta1/deployment_resource_pool_service.list_deployment_resource_pools.js deleted file mode 100644 index 870cb8e9..00000000 --- a/samples/generated/v1beta1/deployment_resource_pool_service.list_deployment_resource_pools.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_DeploymentResourcePoolService_ListDeploymentResourcePools_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent Location which owns this collection of DeploymentResourcePools. - * Format: projects/{project}/locations/{location} - */ - // const parent = 'abc123' - /** - * The maximum number of DeploymentResourcePools to return. The service may - * return fewer than this value. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous `ListDeploymentResourcePools` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListDeploymentResourcePools` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - - // Imports the Aiplatform library - const {DeploymentResourcePoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DeploymentResourcePoolServiceClient(); - - async function callListDeploymentResourcePools() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listDeploymentResourcePoolsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDeploymentResourcePools(); - // [END aiplatform_v1beta1_generated_DeploymentResourcePoolService_ListDeploymentResourcePools_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/deployment_resource_pool_service.query_deployed_models.js b/samples/generated/v1beta1/deployment_resource_pool_service.query_deployed_models.js deleted file mode 100644 index 42e8f330..00000000 --- a/samples/generated/v1beta1/deployment_resource_pool_service.query_deployed_models.js +++ /dev/null @@ -1,78 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(deploymentResourcePool) { - // [START aiplatform_v1beta1_generated_DeploymentResourcePoolService_QueryDeployedModels_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the target DeploymentResourcePool to query. - * Format: - * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} - */ - // const deploymentResourcePool = 'abc123' - /** - * The maximum number of DeployedModels to return. The service may return - * fewer than this value. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous `QueryDeployedModels` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `QueryDeployedModels` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - - // Imports the Aiplatform library - const {DeploymentResourcePoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new DeploymentResourcePoolServiceClient(); - - async function callQueryDeployedModels() { - // Construct request - const request = { - deploymentResourcePool, - }; - - // Run request - const iterable = await aiplatformClient.queryDeployedModelsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callQueryDeployedModels(); - // [END aiplatform_v1beta1_generated_DeploymentResourcePoolService_QueryDeployedModels_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/endpoint_service.create_endpoint.js b/samples/generated/v1beta1/endpoint_service.create_endpoint.js deleted file mode 100644 index 29f037af..00000000 --- a/samples/generated/v1beta1/endpoint_service.create_endpoint.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, endpoint, endpointId) { - // [START aiplatform_v1beta1_generated_EndpointService_CreateEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the Endpoint in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The Endpoint to create. - */ - // const endpoint = {} - /** - * Immutable. The ID to use for endpoint, which will become the final - * component of the endpoint resource name. - * If not provided, Vertex AI will generate a value for this ID. - * This value should be 1-10 characters, and valid characters are /[0-9]/. - * When using HTTP/JSON, this field is populated based on a query string - * argument, such as `?endpoint_id=12345`. This is the fallback for fields - * that are not included in either the URI or the body. - */ - // const endpointId = 'abc123' - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callCreateEndpoint() { - // Construct request - const request = { - parent, - endpoint, - endpointId, - }; - - // Run request - const [operation] = await aiplatformClient.createEndpoint(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateEndpoint(); - // [END aiplatform_v1beta1_generated_EndpointService_CreateEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/endpoint_service.delete_endpoint.js b/samples/generated/v1beta1/endpoint_service.delete_endpoint.js deleted file mode 100644 index d8c0df48..00000000 --- a/samples/generated/v1beta1/endpoint_service.delete_endpoint.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_EndpointService_DeleteEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callDeleteEndpoint() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteEndpoint(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteEndpoint(); - // [END aiplatform_v1beta1_generated_EndpointService_DeleteEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/endpoint_service.deploy_model.js b/samples/generated/v1beta1/endpoint_service.deploy_model.js deleted file mode 100644 index 04467707..00000000 --- a/samples/generated/v1beta1/endpoint_service.deploy_model.js +++ /dev/null @@ -1,84 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint, deployedModel) { - // [START aiplatform_v1beta1_generated_EndpointService_DeployModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint resource into which to deploy a Model. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const endpoint = 'abc123' - /** - * Required. The DeployedModel to be created within the Endpoint. Note that - * Endpoint.traffic_split google.cloud.aiplatform.v1beta1.Endpoint.traffic_split must be updated for the DeployedModel to start - * receiving traffic, either as part of this call, or via - * EndpointService.UpdateEndpoint google.cloud.aiplatform.v1beta1.EndpointService.UpdateEndpoint. - */ - // const deployedModel = {} - /** - * A map from a DeployedModel's ID to the percentage of this Endpoint's - * traffic that should be forwarded to that DeployedModel. - * If this field is non-empty, then the Endpoint's - * traffic_split google.cloud.aiplatform.v1beta1.Endpoint.traffic_split will be overwritten with it. - * To refer to the ID of the just being deployed Model, a "0" should be used, - * and the actual ID of the new DeployedModel will be filled in its place by - * this method. The traffic percentage values must add up to 100. - * If this field is empty, then the Endpoint's - * traffic_split google.cloud.aiplatform.v1beta1.Endpoint.traffic_split is not updated. - */ - // const trafficSplit = 1234 - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callDeployModel() { - // Construct request - const request = { - endpoint, - deployedModel, - }; - - // Run request - const [operation] = await aiplatformClient.deployModel(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeployModel(); - // [END aiplatform_v1beta1_generated_EndpointService_DeployModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/endpoint_service.get_endpoint.js b/samples/generated/v1beta1/endpoint_service.get_endpoint.js deleted file mode 100644 index 35c27ab6..00000000 --- a/samples/generated/v1beta1/endpoint_service.get_endpoint.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_EndpointService_GetEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint resource. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callGetEndpoint() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getEndpoint(request); - console.log(response); - } - - callGetEndpoint(); - // [END aiplatform_v1beta1_generated_EndpointService_GetEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/endpoint_service.list_endpoints.js b/samples/generated/v1beta1/endpoint_service.list_endpoints.js deleted file mode 100644 index ed766d27..00000000 --- a/samples/generated/v1beta1/endpoint_service.list_endpoints.js +++ /dev/null @@ -1,95 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_EndpointService_ListEndpoints_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location from which to list the Endpoints. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. An expression for filtering the results of the request. For field names - * both snake_case and camelCase are supported. - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's resource name google.cloud.aiplatform.v1beta1.Endpoint.name. - * * `display_name` supports = and, != - * * `labels` supports general map functions that is: - * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence - * * A key including a space must be quoted. `labels."a key"`. - * Some examples: - * * `endpoint=1` - * * `displayName="myDisplayName"` - * * `labels.myKey="myValue"` - */ - // const filter = 'abc123' - /** - * Optional. The standard list page size. - */ - // const pageSize = 1234 - /** - * Optional. The standard list page token. - * Typically obtained via - * ListEndpointsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListEndpointsResponse.next_page_token of the previous - * EndpointService.ListEndpoints google.cloud.aiplatform.v1beta1.EndpointService.ListEndpoints call. - */ - // const pageToken = 'abc123' - /** - * Optional. Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callListEndpoints() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listEndpointsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEndpoints(); - // [END aiplatform_v1beta1_generated_EndpointService_ListEndpoints_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/endpoint_service.undeploy_model.js b/samples/generated/v1beta1/endpoint_service.undeploy_model.js deleted file mode 100644 index 75c7ffa0..00000000 --- a/samples/generated/v1beta1/endpoint_service.undeploy_model.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint, deployedModelId) { - // [START aiplatform_v1beta1_generated_EndpointService_UndeployModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint resource from which to undeploy a Model. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const endpoint = 'abc123' - /** - * Required. The ID of the DeployedModel to be undeployed from the Endpoint. - */ - // const deployedModelId = 'abc123' - /** - * If this field is provided, then the Endpoint's - * traffic_split google.cloud.aiplatform.v1beta1.Endpoint.traffic_split will be overwritten with it. If - * last DeployedModel is being undeployed from the Endpoint, the - * Endpoint.traffic_split will always end up empty when this call returns. - * A DeployedModel will be successfully undeployed only if it doesn't have - * any traffic assigned to it when this method executes, or if this field - * unassigns any traffic to it. - */ - // const trafficSplit = 1234 - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callUndeployModel() { - // Construct request - const request = { - endpoint, - deployedModelId, - }; - - // Run request - const [operation] = await aiplatformClient.undeployModel(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUndeployModel(); - // [END aiplatform_v1beta1_generated_EndpointService_UndeployModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/endpoint_service.update_endpoint.js b/samples/generated/v1beta1/endpoint_service.update_endpoint.js deleted file mode 100644 index b8aa6e28..00000000 --- a/samples/generated/v1beta1/endpoint_service.update_endpoint.js +++ /dev/null @@ -1,66 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint, updateMask) { - // [START aiplatform_v1beta1_generated_EndpointService_UpdateEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Endpoint which replaces the resource on the server. - */ - // const endpoint = {} - /** - * Required. The update mask applies to the resource. See google.protobuf.FieldMask google.protobuf.FieldMask. - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new EndpointServiceClient(); - - async function callUpdateEndpoint() { - // Construct request - const request = { - endpoint, - updateMask, - }; - - // Run request - const response = await aiplatformClient.updateEndpoint(request); - console.log(response); - } - - callUpdateEndpoint(); - // [END aiplatform_v1beta1_generated_EndpointService_UpdateEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_online_serving_service.read_feature_values.js b/samples/generated/v1beta1/featurestore_online_serving_service.read_feature_values.js deleted file mode 100644 index aca11e1a..00000000 --- a/samples/generated/v1beta1/featurestore_online_serving_service.read_feature_values.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType, entityId, featureSelector) { - // [START aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_ReadFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntityType for the entity being read. - * Value format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`. - * For example, for a machine learning model predicting user clicks on a - * website, an EntityType ID could be `user`. - */ - // const entityType = 'abc123' - /** - * Required. ID for a specific entity. For example, - * for a machine learning model predicting user clicks on a website, an entity - * ID could be `user_123`. - */ - // const entityId = 'abc123' - /** - * Required. Selector choosing Features of the target EntityType. - */ - // const featureSelector = {} - - // Imports the Aiplatform library - const {FeaturestoreOnlineServingServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreOnlineServingServiceClient(); - - async function callReadFeatureValues() { - // Construct request - const request = { - entityType, - entityId, - featureSelector, - }; - - // Run request - const response = await aiplatformClient.readFeatureValues(request); - console.log(response); - } - - callReadFeatureValues(); - // [END aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_ReadFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_online_serving_service.streaming_read_feature_values.js b/samples/generated/v1beta1/featurestore_online_serving_service.streaming_read_feature_values.js deleted file mode 100644 index 65a09e96..00000000 --- a/samples/generated/v1beta1/featurestore_online_serving_service.streaming_read_feature_values.js +++ /dev/null @@ -1,81 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType, entityIds, featureSelector) { - // [START aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_StreamingReadFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the entities' type. - * Value format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`. - * For example, - * for a machine learning model predicting user clicks on a website, an - * EntityType ID could be `user`. - */ - // const entityType = 'abc123' - /** - * Required. IDs of entities to read Feature values of. The maximum number of IDs is - * 100. For example, for a machine learning model predicting user clicks on a - * website, an entity ID could be `user_123`. - */ - // const entityIds = 'abc123' - /** - * Required. Selector choosing Features of the target EntityType. Feature IDs will be - * deduplicated. - */ - // const featureSelector = {} - - // Imports the Aiplatform library - const {FeaturestoreOnlineServingServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreOnlineServingServiceClient(); - - async function callStreamingReadFeatureValues() { - // Construct request - const request = { - entityType, - entityIds, - featureSelector, - }; - - // Run request - const stream = await aiplatformClient.streamingReadFeatureValues(request); - stream.on('data', (response) => { console.log(response) }); - stream.on('error', (err) => { throw(err) }); - stream.on('end', () => { /* API call completed */ }); - } - - callStreamingReadFeatureValues(); - // [END aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_StreamingReadFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_online_serving_service.write_feature_values.js b/samples/generated/v1beta1/featurestore_online_serving_service.write_feature_values.js deleted file mode 100644 index 98b7838f..00000000 --- a/samples/generated/v1beta1/featurestore_online_serving_service.write_feature_values.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType, payloads) { - // [START aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_WriteFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntityType for the entities being written. - * Value format: `projects/{project}/locations/{location}/featurestores/ - * {featurestore}/entityTypes/{entityType}`. For example, - * for a machine learning model predicting user clicks on a website, an - * EntityType ID could be `user`. - */ - // const entityType = 'abc123' - /** - * Required. The entities to be written. Up to 100,000 feature values can be written - * across all `payloads`. - */ - // const payloads = 1234 - - // Imports the Aiplatform library - const {FeaturestoreOnlineServingServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreOnlineServingServiceClient(); - - async function callWriteFeatureValues() { - // Construct request - const request = { - entityType, - payloads, - }; - - // Run request - const response = await aiplatformClient.writeFeatureValues(request); - console.log(response); - } - - callWriteFeatureValues(); - // [END aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_WriteFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.batch_create_features.js b/samples/generated/v1beta1/featurestore_service.batch_create_features.js deleted file mode 100644 index 644be813..00000000 --- a/samples/generated/v1beta1/featurestore_service.batch_create_features.js +++ /dev/null @@ -1,72 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, requests) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_BatchCreateFeatures_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntityType to create the batch of Features under. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const parent = 'abc123' - /** - * Required. The request message specifying the Features to create. All Features must be - * created under the same parent EntityType. The `parent` field in each child - * request message can be omitted. If `parent` is set in a child request, then - * the value must match the `parent` value in this request message. - */ - // const requests = 1234 - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callBatchCreateFeatures() { - // Construct request - const request = { - parent, - requests, - }; - - // Run request - const [operation] = await aiplatformClient.batchCreateFeatures(request); - const [response] = await operation.promise(); - console.log(response); - } - - callBatchCreateFeatures(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_BatchCreateFeatures_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.batch_read_feature_values.js b/samples/generated/v1beta1/featurestore_service.batch_read_feature_values.js deleted file mode 100644 index 67b7c629..00000000 --- a/samples/generated/v1beta1/featurestore_service.batch_read_feature_values.js +++ /dev/null @@ -1,111 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(featurestore, destination, entityTypeSpecs) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_BatchReadFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Each read instance consists of exactly one read timestamp and one or more - * entity IDs identifying entities of the corresponding EntityTypes whose - * Features are requested. - * Each output instance contains Feature values of requested entities - * concatenated together as of the read time. - * An example read instance may be `foo_entity_id, bar_entity_id, - * 2020-01-01T10:00:00.123Z`. - * An example output instance may be `foo_entity_id, bar_entity_id, - * 2020-01-01T10:00:00.123Z, foo_entity_feature1_value, - * bar_entity_feature2_value`. - * Timestamp in each read instance must be millisecond-aligned. - * `csv_read_instances` are read instances stored in a plain-text CSV file. - * The header should be: - * ENTITY_TYPE_ID1, ENTITY_TYPE_ID2, ..., timestamp - * The columns can be in any order. - * Values in the timestamp column must use the RFC 3339 format, e.g. - * `2012-07-30T10:43:17.123Z`. - */ - // const csvReadInstances = {} - /** - * Similar to csv_read_instances, but from BigQuery source. - */ - // const bigqueryReadInstances = {} - /** - * Required. The resource name of the Featurestore from which to query Feature values. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}` - */ - // const featurestore = 'abc123' - /** - * Required. Specifies output location and format. - */ - // const destination = {} - /** - * When not empty, the specified fields in the *_read_instances source will be - * joined as-is in the output, in addition to those fields from the - * Featurestore Entity. - * For BigQuery source, the type of the pass-through values will be - * automatically inferred. For CSV source, the pass-through values will be - * passed as opaque bytes. - */ - // const passThroughFields = 1234 - /** - * Required. Specifies EntityType grouping Features to read values of and settings. - * Each EntityType referenced in - * BatchReadFeatureValuesRequest.entity_type_specs must have a column - * specifying entity IDs in the EntityType in - * BatchReadFeatureValuesRequest.request . - */ - // const entityTypeSpecs = 1234 - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callBatchReadFeatureValues() { - // Construct request - const request = { - featurestore, - destination, - entityTypeSpecs, - }; - - // Run request - const [operation] = await aiplatformClient.batchReadFeatureValues(request); - const [response] = await operation.promise(); - console.log(response); - } - - callBatchReadFeatureValues(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_BatchReadFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.create_entity_type.js b/samples/generated/v1beta1/featurestore_service.create_entity_type.js deleted file mode 100644 index bbc00325..00000000 --- a/samples/generated/v1beta1/featurestore_service.create_entity_type.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, entityTypeId) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_CreateEntityType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Featurestore to create EntityTypes. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}` - */ - // const parent = 'abc123' - /** - * The EntityType to create. - */ - // const entityType = {} - /** - * Required. The ID to use for the EntityType, which will become the final component of - * the EntityType's resource name. - * This value may be up to 60 characters, and valid characters are - * `[a-z0-9_]`. The first character cannot be a number. - * The value must be unique within a featurestore. - */ - // const entityTypeId = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callCreateEntityType() { - // Construct request - const request = { - parent, - entityTypeId, - }; - - // Run request - const [operation] = await aiplatformClient.createEntityType(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateEntityType(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_CreateEntityType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.create_feature.js b/samples/generated/v1beta1/featurestore_service.create_feature.js deleted file mode 100644 index 8d3bfe1d..00000000 --- a/samples/generated/v1beta1/featurestore_service.create_feature.js +++ /dev/null @@ -1,78 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, feature, featureId) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_CreateFeature_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntityType to create a Feature. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const parent = 'abc123' - /** - * Required. The Feature to create. - */ - // const feature = {} - /** - * Required. The ID to use for the Feature, which will become the final component of - * the Feature's resource name. - * This value may be up to 60 characters, and valid characters are - * `[a-z0-9_]`. The first character cannot be a number. - * The value must be unique within an EntityType. - */ - // const featureId = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callCreateFeature() { - // Construct request - const request = { - parent, - feature, - featureId, - }; - - // Run request - const [operation] = await aiplatformClient.createFeature(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateFeature(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_CreateFeature_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.create_featurestore.js b/samples/generated/v1beta1/featurestore_service.create_featurestore.js deleted file mode 100644 index c86b5c07..00000000 --- a/samples/generated/v1beta1/featurestore_service.create_featurestore.js +++ /dev/null @@ -1,78 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, featurestore, featurestoreId) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_CreateFeaturestore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create Featurestores. - * Format: - * `projects/{project}/locations/{location}'` - */ - // const parent = 'abc123' - /** - * Required. The Featurestore to create. - */ - // const featurestore = {} - /** - * Required. The ID to use for this Featurestore, which will become the final component - * of the Featurestore's resource name. - * This value may be up to 60 characters, and valid characters are - * `[a-z0-9_]`. The first character cannot be a number. - * The value must be unique within the project and location. - */ - // const featurestoreId = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callCreateFeaturestore() { - // Construct request - const request = { - parent, - featurestore, - featurestoreId, - }; - - // Run request - const [operation] = await aiplatformClient.createFeaturestore(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateFeaturestore(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_CreateFeaturestore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.delete_entity_type.js b/samples/generated/v1beta1/featurestore_service.delete_entity_type.js deleted file mode 100644 index 1caf807a..00000000 --- a/samples/generated/v1beta1/featurestore_service.delete_entity_type.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_DeleteEntityType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the EntityType to be deleted. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const name = 'abc123' - /** - * If set to true, any Features for this EntityType will also be deleted. - * (Otherwise, the request will only work if the EntityType has no Features.) - */ - // const force = true - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callDeleteEntityType() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteEntityType(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteEntityType(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_DeleteEntityType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.delete_feature.js b/samples/generated/v1beta1/featurestore_service.delete_feature.js deleted file mode 100644 index 264496df..00000000 --- a/samples/generated/v1beta1/featurestore_service.delete_feature.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeature_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Features to be deleted. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callDeleteFeature() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteFeature(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteFeature(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeature_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.delete_feature_values.js b/samples/generated/v1beta1/featurestore_service.delete_feature_values.js deleted file mode 100644 index 2b96d712..00000000 --- a/samples/generated/v1beta1/featurestore_service.delete_feature_values.js +++ /dev/null @@ -1,73 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Select feature values to be deleted by specifying entities. - */ - // const selectEntity = {} - /** - * Select feature values to be deleted by specifying time range and - * features. - */ - // const selectTimeRangeAndFeature = {} - /** - * Required. The resource name of the EntityType grouping the Features for which values - * are being deleted from. Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` - */ - // const entityType = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callDeleteFeatureValues() { - // Construct request - const request = { - entityType, - }; - - // Run request - const [operation] = await aiplatformClient.deleteFeatureValues(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteFeatureValues(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.delete_featurestore.js b/samples/generated/v1beta1/featurestore_service.delete_featurestore.js deleted file mode 100644 index 7b6989e4..00000000 --- a/samples/generated/v1beta1/featurestore_service.delete_featurestore.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeaturestore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Featurestore to be deleted. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}` - */ - // const name = 'abc123' - /** - * If set to true, any EntityTypes and Features for this Featurestore will - * also be deleted. (Otherwise, the request will only work if the Featurestore - * has no EntityTypes.) - */ - // const force = true - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callDeleteFeaturestore() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteFeaturestore(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteFeaturestore(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeaturestore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.export_feature_values.js b/samples/generated/v1beta1/featurestore_service.export_feature_values.js deleted file mode 100644 index e53cedf2..00000000 --- a/samples/generated/v1beta1/featurestore_service.export_feature_values.js +++ /dev/null @@ -1,88 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType, destination, featureSelector) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_ExportFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Exports the latest Feature values of all entities of the EntityType - * within a time range. - */ - // const snapshotExport = {} - /** - * Exports all historical values of all entities of the EntityType within a - * time range - */ - // const fullExport = {} - /** - * Required. The resource name of the EntityType from which to export Feature values. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const entityType = 'abc123' - /** - * Required. Specifies destination location and format. - */ - // const destination = {} - /** - * Required. Selects Features to export values of. - */ - // const featureSelector = {} - /** - * Per-Feature export settings. - */ - // const settings = 1234 - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callExportFeatureValues() { - // Construct request - const request = { - entityType, - destination, - featureSelector, - }; - - // Run request - const [operation] = await aiplatformClient.exportFeatureValues(request); - const [response] = await operation.promise(); - console.log(response); - } - - callExportFeatureValues(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_ExportFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.get_entity_type.js b/samples/generated/v1beta1/featurestore_service.get_entity_type.js deleted file mode 100644 index c8a7ad53..00000000 --- a/samples/generated/v1beta1/featurestore_service.get_entity_type.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_GetEntityType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the EntityType resource. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callGetEntityType() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getEntityType(request); - console.log(response); - } - - callGetEntityType(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_GetEntityType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.get_feature.js b/samples/generated/v1beta1/featurestore_service.get_feature.js deleted file mode 100644 index 97bfbd58..00000000 --- a/samples/generated/v1beta1/featurestore_service.get_feature.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_GetFeature_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Feature resource. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callGetFeature() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getFeature(request); - console.log(response); - } - - callGetFeature(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_GetFeature_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.get_featurestore.js b/samples/generated/v1beta1/featurestore_service.get_featurestore.js deleted file mode 100644 index 641a7f29..00000000 --- a/samples/generated/v1beta1/featurestore_service.get_featurestore.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_GetFeaturestore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Featurestore resource. - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callGetFeaturestore() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getFeaturestore(request); - console.log(response); - } - - callGetFeaturestore(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_GetFeaturestore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.import_feature_values.js b/samples/generated/v1beta1/featurestore_service.import_feature_values.js deleted file mode 100644 index ddddbc1f..00000000 --- a/samples/generated/v1beta1/featurestore_service.import_feature_values.js +++ /dev/null @@ -1,114 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType, featureSpecs) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_ImportFeatureValues_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - */ - // const avroSource = {} - /** - */ - // const bigquerySource = {} - /** - */ - // const csvSource = {} - /** - * Source column that holds the Feature timestamp for all Feature - * values in each entity. - */ - // const featureTimeField = 'abc123' - /** - * Single Feature timestamp for all entities being imported. The - * timestamp must not have higher than millisecond precision. - */ - // const featureTime = {} - /** - * Required. The resource name of the EntityType grouping the Features for which values - * are being imported. Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` - */ - // const entityType = 'abc123' - /** - * Source column that holds entity IDs. If not provided, entity IDs are - * extracted from the column named `entity_id`. - */ - // const entityIdField = 'abc123' - /** - * Required. Specifications defining which Feature values to import from the entity. The - * request fails if no feature_specs are provided, and having multiple - * feature_specs for one Feature is not allowed. - */ - // const featureSpecs = 1234 - /** - * If set, data will not be imported for online serving. This - * is typically used for backfilling, where Feature generation timestamps are - * not in the timestamp range needed for online serving. - */ - // const disableOnlineServing = true - /** - * Specifies the number of workers that are used to write data to the - * Featurestore. Consider the online serving capacity that you require to - * achieve the desired import throughput without interfering with online - * serving. The value must be positive, and less than or equal to 100. - * If not set, defaults to using 1 worker. The low count ensures minimal - * impact on online serving performance. - */ - // const workerCount = 1234 - /** - * If true, API doesn't start ingestion analysis pipeline. - */ - // const disableIngestionAnalysis = true - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callImportFeatureValues() { - // Construct request - const request = { - entityType, - featureSpecs, - }; - - // Run request - const [operation] = await aiplatformClient.importFeatureValues(request); - const [response] = await operation.promise(); - console.log(response); - } - - callImportFeatureValues(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_ImportFeatureValues_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.list_entity_types.js b/samples/generated/v1beta1/featurestore_service.list_entity_types.js deleted file mode 100644 index c0508c7a..00000000 --- a/samples/generated/v1beta1/featurestore_service.list_entity_types.js +++ /dev/null @@ -1,112 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_ListEntityTypes_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Featurestore to list EntityTypes. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}` - */ - // const parent = 'abc123' - /** - * Lists the EntityTypes that match the filter expression. The following - * filters are supported: - * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. - * Values must be in RFC 3339 format. - * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. - * Values must be in RFC 3339 format. - * * `labels`: Supports key-value equality as well as key presence. - * Examples: - * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR - * update_time > \"2020-01-31T15:30:00.000000Z\"` --> EntityTypes created - * or updated after 2020-01-31T15:30:00.000000Z. - * * `labels.active = yes AND labels.env = prod` --> EntityTypes having both - * (active: yes) and (env: prod) labels. - * * `labels.env: *` --> Any EntityType which has a label with 'env' as the - * key. - */ - // const filter = 'abc123' - /** - * The maximum number of EntityTypes to return. The service may return fewer - * than this value. If unspecified, at most 1000 EntityTypes will be returned. - * The maximum value is 1000; any value greater than 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * FeaturestoreService.ListEntityTypes google.cloud.aiplatform.v1beta1.FeaturestoreService.ListEntityTypes call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * FeaturestoreService.ListEntityTypes google.cloud.aiplatform.v1beta1.FeaturestoreService.ListEntityTypes must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - * Supported fields: - * * `entity_type_id` - * * `create_time` - * * `update_time` - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callListEntityTypes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listEntityTypesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEntityTypes(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_ListEntityTypes_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.list_features.js b/samples/generated/v1beta1/featurestore_service.list_features.js deleted file mode 100644 index 9027ed85..00000000 --- a/samples/generated/v1beta1/featurestore_service.list_features.js +++ /dev/null @@ -1,122 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_ListFeatures_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list Features. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const parent = 'abc123' - /** - * Lists the Features that match the filter expression. The following - * filters are supported: - * * `value_type`: Supports = and != comparisons. - * * `create_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must - * be in RFC 3339 format. - * * `update_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must - * be in RFC 3339 format. - * * `labels`: Supports key-value equality as well as key presence. - * Examples: - * * `value_type = DOUBLE` --> Features whose type is DOUBLE. - * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR - * update_time > \"2020-01-31T15:30:00.000000Z\"` --> EntityTypes created - * or updated after 2020-01-31T15:30:00.000000Z. - * * `labels.active = yes AND labels.env = prod` --> Features having both - * (active: yes) and (env: prod) labels. - * * `labels.env: *` --> Any Feature which has a label with 'env' as the - * key. - */ - // const filter = 'abc123' - /** - * The maximum number of Features to return. The service may return fewer - * than this value. If unspecified, at most 1000 Features will be returned. - * The maximum value is 1000; any value greater than 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * FeaturestoreService.ListFeatures google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * FeaturestoreService.ListFeatures google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - * Supported fields: - * * `feature_id` - * * `value_type` - * * `create_time` - * * `update_time` - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - /** - * If set, return the most recent ListFeaturesRequest.latest_stats_count google.cloud.aiplatform.v1beta1.ListFeaturesRequest.latest_stats_count - * of stats for each Feature in response. Valid value is 0, 10. If number of - * stats exists < ListFeaturesRequest.latest_stats_count google.cloud.aiplatform.v1beta1.ListFeaturesRequest.latest_stats_count, return all - * existing stats. - */ - // const latestStatsCount = 1234 - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callListFeatures() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listFeaturesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFeatures(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_ListFeatures_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.list_featurestores.js b/samples/generated/v1beta1/featurestore_service.list_featurestores.js deleted file mode 100644 index 7c10d168..00000000 --- a/samples/generated/v1beta1/featurestore_service.list_featurestores.js +++ /dev/null @@ -1,113 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_ListFeaturestores_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list Featurestores. - * Format: - * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Lists the featurestores that match the filter expression. The following - * fields are supported: - * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. - * Values must be - * in RFC 3339 format. - * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. - * Values must be - * in RFC 3339 format. - * * `online_serving_config.fixed_node_count`: Supports `=`, `!=`, `<`, `>`, - * `<=`, and `>=` comparisons. - * * `labels`: Supports key-value equality and key presence. - * Examples: - * * `create_time > "2020-01-01" OR update_time > "2020-01-01"` - * Featurestores created or updated after 2020-01-01. - * * `labels.env = "prod"` - * Featurestores with label "env" set to "prod". - */ - // const filter = 'abc123' - /** - * The maximum number of Featurestores to return. The service may return fewer - * than this value. If unspecified, at most 100 Featurestores will be - * returned. The maximum value is 100; any value greater than 100 will be - * coerced to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * FeaturestoreService.ListFeaturestores google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeaturestores call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * FeaturestoreService.ListFeaturestores google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeaturestores must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * A comma-separated list of fields to order by, sorted in ascending order. - * Use "desc" after a field name for descending. - * Supported Fields: - * * `create_time` - * * `update_time` - * * `online_serving_config.fixed_node_count` - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callListFeaturestores() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listFeaturestoresAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFeaturestores(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_ListFeaturestores_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.search_features.js b/samples/generated/v1beta1/featurestore_service.search_features.js deleted file mode 100644 index 6c4e645c..00000000 --- a/samples/generated/v1beta1/featurestore_service.search_features.js +++ /dev/null @@ -1,132 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(location) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_SearchFeatures_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to search Features. - * Format: - * `projects/{project}/locations/{location}` - */ - // const location = 'abc123' - /** - * Query string that is a conjunction of field-restricted queries and/or - * field-restricted filters. Field-restricted queries and filters can be - * combined using `AND` to form a conjunction. - * A field query is in the form FIELD:QUERY. This implicitly checks if QUERY - * exists as a substring within Feature's FIELD. The QUERY - * and the FIELD are converted to a sequence of words (i.e. tokens) for - * comparison. This is done by: - * * Removing leading/trailing whitespace and tokenizing the search value. - * Characters that are not one of alphanumeric `[a-zA-Z0-9]`, underscore - * `_`, or asterisk `*` are treated as delimiters for tokens. `*` is treated - * as a wildcard that matches characters within a token. - * * Ignoring case. - * * Prepending an asterisk to the first and appending an asterisk to the - * last token in QUERY. - * A QUERY must be either a singular token or a phrase. A phrase is one or - * multiple words enclosed in double quotation marks ("). With phrases, the - * order of the words is important. Words in the phrase must be matching in - * order and consecutively. - * Supported FIELDs for field-restricted queries: - * * `feature_id` - * * `description` - * * `entity_type_id` - * Examples: - * * `feature_id: foo` --> Matches a Feature with ID containing the substring - * `foo` (eg. `foo`, `foofeature`, `barfoo`). - * * `feature_id: foo*feature` --> Matches a Feature with ID containing the - * substring `foo*feature` (eg. `foobarfeature`). - * * `feature_id: foo AND description: bar` --> Matches a Feature with ID - * containing the substring `foo` and description containing the substring - * `bar`. - * Besides field queries, the following exact-match filters are - * supported. The exact-match filters do not support wildcards. Unlike - * field-restricted queries, exact-match filters are case-sensitive. - * * `feature_id`: Supports = comparisons. - * * `description`: Supports = comparisons. Multi-token filters should be - * enclosed in quotes. - * * `entity_type_id`: Supports = comparisons. - * * `value_type`: Supports = and != comparisons. - * * `labels`: Supports key-value equality as well as key presence. - * * `featurestore_id`: Supports = comparisons. - * Examples: - * * `description = "foo bar"` --> Any Feature with description exactly equal - * to `foo bar` - * * `value_type = DOUBLE` --> Features whose type is DOUBLE. - * * `labels.active = yes AND labels.env = prod` --> Features having both - * (active: yes) and (env: prod) labels. - * * `labels.env: *` --> Any Feature which has a label with `env` as the - * key. - */ - // const query = 'abc123' - /** - * The maximum number of Features to return. The service may return fewer - * than this value. If unspecified, at most 100 Features will be returned. - * The maximum value is 100; any value greater than 100 will be coerced to - * 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * FeaturestoreService.SearchFeatures google.cloud.aiplatform.v1beta1.FeaturestoreService.SearchFeatures call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * FeaturestoreService.SearchFeatures google.cloud.aiplatform.v1beta1.FeaturestoreService.SearchFeatures, except `page_size`, must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callSearchFeatures() { - // Construct request - const request = { - location, - }; - - // Run request - const iterable = await aiplatformClient.searchFeaturesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callSearchFeatures(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_SearchFeatures_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.update_entity_type.js b/samples/generated/v1beta1/featurestore_service.update_entity_type.js deleted file mode 100644 index c42f32b2..00000000 --- a/samples/generated/v1beta1/featurestore_service.update_entity_type.js +++ /dev/null @@ -1,84 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entityType) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_UpdateEntityType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The EntityType's `name` field is used to identify the EntityType to be - * updated. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` - */ - // const entityType = {} - /** - * Field mask is used to specify the fields to be overwritten in the - * EntityType resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then only the non-empty fields present in the - * request will be overwritten. Set the update_mask to `*` to override all - * fields. - * Updatable fields: - * * `description` - * * `labels` - * * `monitoring_config.snapshot_analysis.disabled` - * * `monitoring_config.snapshot_analysis.monitoring_interval_days` - * * `monitoring_config.snapshot_analysis.staleness_days` - * * `monitoring_config.import_features_analysis.state` - * * `monitoring_config.import_features_analysis.anomaly_detection_baseline` - * * `monitoring_config.numerical_threshold_config.value` - * * `monitoring_config.categorical_threshold_config.value` - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callUpdateEntityType() { - // Construct request - const request = { - entityType, - }; - - // Run request - const response = await aiplatformClient.updateEntityType(request); - console.log(response); - } - - callUpdateEntityType(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_UpdateEntityType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.update_feature.js b/samples/generated/v1beta1/featurestore_service.update_feature.js deleted file mode 100644 index f9edba30..00000000 --- a/samples/generated/v1beta1/featurestore_service.update_feature.js +++ /dev/null @@ -1,78 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(feature) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_UpdateFeature_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Feature's `name` field is used to identify the Feature to be - * updated. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` - */ - // const feature = {} - /** - * Field mask is used to specify the fields to be overwritten in the - * Features resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then only the non-empty fields present in the - * request will be overwritten. Set the update_mask to `*` to override all - * fields. - * Updatable fields: - * * `description` - * * `labels` - * * `disable_monitoring` - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callUpdateFeature() { - // Construct request - const request = { - feature, - }; - - // Run request - const response = await aiplatformClient.updateFeature(request); - console.log(response); - } - - callUpdateFeature(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_UpdateFeature_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/featurestore_service.update_featurestore.js b/samples/generated/v1beta1/featurestore_service.update_featurestore.js deleted file mode 100644 index 8b8c2b64..00000000 --- a/samples/generated/v1beta1/featurestore_service.update_featurestore.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(featurestore) { - // [START aiplatform_v1beta1_generated_FeaturestoreService_UpdateFeaturestore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Featurestore's `name` field is used to identify the Featurestore to be - * updated. - * Format: - * `projects/{project}/locations/{location}/featurestores/{featurestore}` - */ - // const featurestore = {} - /** - * Field mask is used to specify the fields to be overwritten in the - * Featurestore resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then only the non-empty fields present in the - * request will be overwritten. Set the update_mask to `*` to override all - * fields. - * Updatable fields: - * * `labels` - * * `online_serving_config.fixed_node_count` - * * `online_serving_config.scaling` - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new FeaturestoreServiceClient(); - - async function callUpdateFeaturestore() { - // Construct request - const request = { - featurestore, - }; - - // Run request - const [operation] = await aiplatformClient.updateFeaturestore(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateFeaturestore(); - // [END aiplatform_v1beta1_generated_FeaturestoreService_UpdateFeaturestore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_endpoint_service.create_index_endpoint.js b/samples/generated/v1beta1/index_endpoint_service.create_index_endpoint.js deleted file mode 100644 index e18e8635..00000000 --- a/samples/generated/v1beta1/index_endpoint_service.create_index_endpoint.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, indexEndpoint) { - // [START aiplatform_v1beta1_generated_IndexEndpointService_CreateIndexEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the IndexEndpoint in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The IndexEndpoint to create. - */ - // const indexEndpoint = {} - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callCreateIndexEndpoint() { - // Construct request - const request = { - parent, - indexEndpoint, - }; - - // Run request - const [operation] = await aiplatformClient.createIndexEndpoint(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateIndexEndpoint(); - // [END aiplatform_v1beta1_generated_IndexEndpointService_CreateIndexEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_endpoint_service.delete_index_endpoint.js b/samples/generated/v1beta1/index_endpoint_service.delete_index_endpoint.js deleted file mode 100644 index dadab827..00000000 --- a/samples/generated/v1beta1/index_endpoint_service.delete_index_endpoint.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_IndexEndpointService_DeleteIndexEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the IndexEndpoint resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callDeleteIndexEndpoint() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteIndexEndpoint(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteIndexEndpoint(); - // [END aiplatform_v1beta1_generated_IndexEndpointService_DeleteIndexEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_endpoint_service.deploy_index.js b/samples/generated/v1beta1/index_endpoint_service.deploy_index.js deleted file mode 100644 index 6f26f684..00000000 --- a/samples/generated/v1beta1/index_endpoint_service.deploy_index.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(indexEndpoint, deployedIndex) { - // [START aiplatform_v1beta1_generated_IndexEndpointService_DeployIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the IndexEndpoint resource into which to deploy an Index. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - */ - // const indexEndpoint = 'abc123' - /** - * Required. The DeployedIndex to be created within the IndexEndpoint. - */ - // const deployedIndex = {} - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callDeployIndex() { - // Construct request - const request = { - indexEndpoint, - deployedIndex, - }; - - // Run request - const [operation] = await aiplatformClient.deployIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeployIndex(); - // [END aiplatform_v1beta1_generated_IndexEndpointService_DeployIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_endpoint_service.get_index_endpoint.js b/samples/generated/v1beta1/index_endpoint_service.get_index_endpoint.js deleted file mode 100644 index 4019571e..00000000 --- a/samples/generated/v1beta1/index_endpoint_service.get_index_endpoint.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_IndexEndpointService_GetIndexEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the IndexEndpoint resource. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callGetIndexEndpoint() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getIndexEndpoint(request); - console.log(response); - } - - callGetIndexEndpoint(); - // [END aiplatform_v1beta1_generated_IndexEndpointService_GetIndexEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_endpoint_service.list_index_endpoints.js b/samples/generated/v1beta1/index_endpoint_service.list_index_endpoints.js deleted file mode 100644 index a128bb83..00000000 --- a/samples/generated/v1beta1/index_endpoint_service.list_index_endpoints.js +++ /dev/null @@ -1,98 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_IndexEndpointService_ListIndexEndpoints_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location from which to list the IndexEndpoints. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. An expression for filtering the results of the request. For field names - * both snake_case and camelCase are supported. - * * `index_endpoint` supports = and !=. `index_endpoint` represents the - * IndexEndpoint ID, ie. the last segment of the IndexEndpoint's - * resourcename google.cloud.aiplatform.v1beta1.IndexEndpoint.name. - * * `display_name` supports =, != and regex() - * (uses re2 (https://github.com/google/re2/wiki/Syntax) syntax) - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* or labels:key - key existence - * A key including a space must be quoted. `labels."a key"`. - * Some examples: - * * `index_endpoint="1"` - * * `display_name="myDisplayName"` - * * `regex(display_name, "^A") -> The display name starts with an A. - * * `labels.myKey="myValue"` - */ - // const filter = 'abc123' - /** - * Optional. The standard list page size. - */ - // const pageSize = 1234 - /** - * Optional. The standard list page token. - * Typically obtained via - * ListIndexEndpointsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListIndexEndpointsResponse.next_page_token of the previous - * IndexEndpointService.ListIndexEndpoints google.cloud.aiplatform.v1beta1.IndexEndpointService.ListIndexEndpoints call. - */ - // const pageToken = 'abc123' - /** - * Optional. Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callListIndexEndpoints() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listIndexEndpointsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListIndexEndpoints(); - // [END aiplatform_v1beta1_generated_IndexEndpointService_ListIndexEndpoints_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_endpoint_service.mutate_deployed_index.js b/samples/generated/v1beta1/index_endpoint_service.mutate_deployed_index.js deleted file mode 100644 index 25a37193..00000000 --- a/samples/generated/v1beta1/index_endpoint_service.mutate_deployed_index.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(indexEndpoint, deployedIndex) { - // [START aiplatform_v1beta1_generated_IndexEndpointService_MutateDeployedIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the IndexEndpoint resource into which to deploy an Index. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - */ - // const indexEndpoint = 'abc123' - /** - * Required. The DeployedIndex to be updated within the IndexEndpoint. - * Currently, the updatable fields are DeployedIndex automatic_resources - * and DeployedIndex dedicated_resources - */ - // const deployedIndex = {} - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callMutateDeployedIndex() { - // Construct request - const request = { - indexEndpoint, - deployedIndex, - }; - - // Run request - const [operation] = await aiplatformClient.mutateDeployedIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callMutateDeployedIndex(); - // [END aiplatform_v1beta1_generated_IndexEndpointService_MutateDeployedIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_endpoint_service.undeploy_index.js b/samples/generated/v1beta1/index_endpoint_service.undeploy_index.js deleted file mode 100644 index b0038ccf..00000000 --- a/samples/generated/v1beta1/index_endpoint_service.undeploy_index.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(indexEndpoint, deployedIndexId) { - // [START aiplatform_v1beta1_generated_IndexEndpointService_UndeployIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the IndexEndpoint resource from which to undeploy an Index. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - */ - // const indexEndpoint = 'abc123' - /** - * Required. The ID of the DeployedIndex to be undeployed from the IndexEndpoint. - */ - // const deployedIndexId = 'abc123' - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callUndeployIndex() { - // Construct request - const request = { - indexEndpoint, - deployedIndexId, - }; - - // Run request - const [operation] = await aiplatformClient.undeployIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUndeployIndex(); - // [END aiplatform_v1beta1_generated_IndexEndpointService_UndeployIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_endpoint_service.update_index_endpoint.js b/samples/generated/v1beta1/index_endpoint_service.update_index_endpoint.js deleted file mode 100644 index 8b1dc383..00000000 --- a/samples/generated/v1beta1/index_endpoint_service.update_index_endpoint.js +++ /dev/null @@ -1,66 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(indexEndpoint, updateMask) { - // [START aiplatform_v1beta1_generated_IndexEndpointService_UpdateIndexEndpoint_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The IndexEndpoint which replaces the resource on the server. - */ - // const indexEndpoint = {} - /** - * Required. The update mask applies to the resource. See google.protobuf.FieldMask google.protobuf.FieldMask. - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {IndexEndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexEndpointServiceClient(); - - async function callUpdateIndexEndpoint() { - // Construct request - const request = { - indexEndpoint, - updateMask, - }; - - // Run request - const response = await aiplatformClient.updateIndexEndpoint(request); - console.log(response); - } - - callUpdateIndexEndpoint(); - // [END aiplatform_v1beta1_generated_IndexEndpointService_UpdateIndexEndpoint_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_service.create_index.js b/samples/generated/v1beta1/index_service.create_index.js deleted file mode 100644 index 3c7c2e27..00000000 --- a/samples/generated/v1beta1/index_service.create_index.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, index) { - // [START aiplatform_v1beta1_generated_IndexService_CreateIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the Index in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The Index to create. - */ - // const index = {} - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callCreateIndex() { - // Construct request - const request = { - parent, - index, - }; - - // Run request - const [operation] = await aiplatformClient.createIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateIndex(); - // [END aiplatform_v1beta1_generated_IndexService_CreateIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_service.delete_index.js b/samples/generated/v1beta1/index_service.delete_index.js deleted file mode 100644 index 0ca8ce4a..00000000 --- a/samples/generated/v1beta1/index_service.delete_index.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_IndexService_DeleteIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Index resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/indexes/{index}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callDeleteIndex() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteIndex(); - // [END aiplatform_v1beta1_generated_IndexService_DeleteIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_service.get_index.js b/samples/generated/v1beta1/index_service.get_index.js deleted file mode 100644 index 89c7a5f1..00000000 --- a/samples/generated/v1beta1/index_service.get_index.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_IndexService_GetIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Index resource. - * Format: - * `projects/{project}/locations/{location}/indexes/{index}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callGetIndex() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getIndex(request); - console.log(response); - } - - callGetIndex(); - // [END aiplatform_v1beta1_generated_IndexService_GetIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_service.list_indexes.js b/samples/generated/v1beta1/index_service.list_indexes.js deleted file mode 100644 index 78827f58..00000000 --- a/samples/generated/v1beta1/index_service.list_indexes.js +++ /dev/null @@ -1,83 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_IndexService_ListIndexes_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location from which to list the Indexes. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListIndexesResponse.next_page_token google.cloud.aiplatform.v1beta1.ListIndexesResponse.next_page_token of the previous - * IndexService.ListIndexes google.cloud.aiplatform.v1beta1.IndexService.ListIndexes call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callListIndexes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listIndexesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListIndexes(); - // [END aiplatform_v1beta1_generated_IndexService_ListIndexes_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_service.remove_datapoints.js b/samples/generated/v1beta1/index_service.remove_datapoints.js deleted file mode 100644 index 8b717d58..00000000 --- a/samples/generated/v1beta1/index_service.remove_datapoints.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(index) { - // [START aiplatform_v1beta1_generated_IndexService_RemoveDatapoints_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Index resource to be updated. - * Format: - * `projects/{project}/locations/{location}/indexes/{index}` - */ - // const index = 'abc123' - /** - * A list of datapoint ids to be deleted. - */ - // const datapointIds = 'abc123' - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callRemoveDatapoints() { - // Construct request - const request = { - index, - }; - - // Run request - const response = await aiplatformClient.removeDatapoints(request); - console.log(response); - } - - callRemoveDatapoints(); - // [END aiplatform_v1beta1_generated_IndexService_RemoveDatapoints_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_service.update_index.js b/samples/generated/v1beta1/index_service.update_index.js deleted file mode 100644 index 5c353e52..00000000 --- a/samples/generated/v1beta1/index_service.update_index.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(index) { - // [START aiplatform_v1beta1_generated_IndexService_UpdateIndex_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Index which updates the resource on the server. - */ - // const index = {} - /** - * The update mask applies to the resource. - * For the `FieldMask` definition, see google.protobuf.FieldMask google.protobuf.FieldMask. - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callUpdateIndex() { - // Construct request - const request = { - index, - }; - - // Run request - const [operation] = await aiplatformClient.updateIndex(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateIndex(); - // [END aiplatform_v1beta1_generated_IndexService_UpdateIndex_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/index_service.upsert_datapoints.js b/samples/generated/v1beta1/index_service.upsert_datapoints.js deleted file mode 100644 index 062b053c..00000000 --- a/samples/generated/v1beta1/index_service.upsert_datapoints.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(index) { - // [START aiplatform_v1beta1_generated_IndexService_UpsertDatapoints_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Index resource to be updated. - * Format: - * `projects/{project}/locations/{location}/indexes/{index}` - */ - // const index = 'abc123' - /** - * A list of datapoints to be created/updated. - */ - // const datapoints = 1234 - - // Imports the Aiplatform library - const {IndexServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new IndexServiceClient(); - - async function callUpsertDatapoints() { - // Construct request - const request = { - index, - }; - - // Run request - const response = await aiplatformClient.upsertDatapoints(request); - console.log(response); - } - - callUpsertDatapoints(); - // [END aiplatform_v1beta1_generated_IndexService_UpsertDatapoints_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.cancel_batch_prediction_job.js b/samples/generated/v1beta1/job_service.cancel_batch_prediction_job.js deleted file mode 100644 index 7a9bfece..00000000 --- a/samples/generated/v1beta1/job_service.cancel_batch_prediction_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_CancelBatchPredictionJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the BatchPredictionJob to cancel. - * Format: - * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCancelBatchPredictionJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelBatchPredictionJob(request); - console.log(response); - } - - callCancelBatchPredictionJob(); - // [END aiplatform_v1beta1_generated_JobService_CancelBatchPredictionJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.cancel_custom_job.js b/samples/generated/v1beta1/job_service.cancel_custom_job.js deleted file mode 100644 index d6727e19..00000000 --- a/samples/generated/v1beta1/job_service.cancel_custom_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_CancelCustomJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the CustomJob to cancel. - * Format: - * `projects/{project}/locations/{location}/customJobs/{custom_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCancelCustomJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelCustomJob(request); - console.log(response); - } - - callCancelCustomJob(); - // [END aiplatform_v1beta1_generated_JobService_CancelCustomJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.cancel_data_labeling_job.js b/samples/generated/v1beta1/job_service.cancel_data_labeling_job.js deleted file mode 100644 index fb32d8ae..00000000 --- a/samples/generated/v1beta1/job_service.cancel_data_labeling_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_CancelDataLabelingJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the DataLabelingJob. - * Format: - * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCancelDataLabelingJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelDataLabelingJob(request); - console.log(response); - } - - callCancelDataLabelingJob(); - // [END aiplatform_v1beta1_generated_JobService_CancelDataLabelingJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.cancel_hyperparameter_tuning_job.js b/samples/generated/v1beta1/job_service.cancel_hyperparameter_tuning_job.js deleted file mode 100644 index e18cf5b3..00000000 --- a/samples/generated/v1beta1/job_service.cancel_hyperparameter_tuning_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_CancelHyperparameterTuningJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the HyperparameterTuningJob to cancel. - * Format: - * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCancelHyperparameterTuningJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelHyperparameterTuningJob(request); - console.log(response); - } - - callCancelHyperparameterTuningJob(); - // [END aiplatform_v1beta1_generated_JobService_CancelHyperparameterTuningJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.create_batch_prediction_job.js b/samples/generated/v1beta1/job_service.create_batch_prediction_job.js deleted file mode 100644 index d4c21054..00000000 --- a/samples/generated/v1beta1/job_service.create_batch_prediction_job.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, batchPredictionJob) { - // [START aiplatform_v1beta1_generated_JobService_CreateBatchPredictionJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the BatchPredictionJob in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The BatchPredictionJob to create. - */ - // const batchPredictionJob = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCreateBatchPredictionJob() { - // Construct request - const request = { - parent, - batchPredictionJob, - }; - - // Run request - const response = await aiplatformClient.createBatchPredictionJob(request); - console.log(response); - } - - callCreateBatchPredictionJob(); - // [END aiplatform_v1beta1_generated_JobService_CreateBatchPredictionJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.create_custom_job.js b/samples/generated/v1beta1/job_service.create_custom_job.js deleted file mode 100644 index 27bcfaf5..00000000 --- a/samples/generated/v1beta1/job_service.create_custom_job.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, customJob) { - // [START aiplatform_v1beta1_generated_JobService_CreateCustomJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the CustomJob in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The CustomJob to create. - */ - // const customJob = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCreateCustomJob() { - // Construct request - const request = { - parent, - customJob, - }; - - // Run request - const response = await aiplatformClient.createCustomJob(request); - console.log(response); - } - - callCreateCustomJob(); - // [END aiplatform_v1beta1_generated_JobService_CreateCustomJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.create_data_labeling_job.js b/samples/generated/v1beta1/job_service.create_data_labeling_job.js deleted file mode 100644 index 358376e4..00000000 --- a/samples/generated/v1beta1/job_service.create_data_labeling_job.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, dataLabelingJob) { - // [START aiplatform_v1beta1_generated_JobService_CreateDataLabelingJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent of the DataLabelingJob. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The DataLabelingJob to create. - */ - // const dataLabelingJob = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCreateDataLabelingJob() { - // Construct request - const request = { - parent, - dataLabelingJob, - }; - - // Run request - const response = await aiplatformClient.createDataLabelingJob(request); - console.log(response); - } - - callCreateDataLabelingJob(); - // [END aiplatform_v1beta1_generated_JobService_CreateDataLabelingJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.create_hyperparameter_tuning_job.js b/samples/generated/v1beta1/job_service.create_hyperparameter_tuning_job.js deleted file mode 100644 index c5d5a22b..00000000 --- a/samples/generated/v1beta1/job_service.create_hyperparameter_tuning_job.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, hyperparameterTuningJob) { - // [START aiplatform_v1beta1_generated_JobService_CreateHyperparameterTuningJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the HyperparameterTuningJob in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The HyperparameterTuningJob to create. - */ - // const hyperparameterTuningJob = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCreateHyperparameterTuningJob() { - // Construct request - const request = { - parent, - hyperparameterTuningJob, - }; - - // Run request - const response = await aiplatformClient.createHyperparameterTuningJob(request); - console.log(response); - } - - callCreateHyperparameterTuningJob(); - // [END aiplatform_v1beta1_generated_JobService_CreateHyperparameterTuningJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.create_model_deployment_monitoring_job.js b/samples/generated/v1beta1/job_service.create_model_deployment_monitoring_job.js deleted file mode 100644 index 8486b853..00000000 --- a/samples/generated/v1beta1/job_service.create_model_deployment_monitoring_job.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, modelDeploymentMonitoringJob) { - // [START aiplatform_v1beta1_generated_JobService_CreateModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent of the ModelDeploymentMonitoringJob. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The ModelDeploymentMonitoringJob to create - */ - // const modelDeploymentMonitoringJob = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callCreateModelDeploymentMonitoringJob() { - // Construct request - const request = { - parent, - modelDeploymentMonitoringJob, - }; - - // Run request - const response = await aiplatformClient.createModelDeploymentMonitoringJob(request); - console.log(response); - } - - callCreateModelDeploymentMonitoringJob(); - // [END aiplatform_v1beta1_generated_JobService_CreateModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.delete_batch_prediction_job.js b/samples/generated/v1beta1/job_service.delete_batch_prediction_job.js deleted file mode 100644 index e10dc90d..00000000 --- a/samples/generated/v1beta1/job_service.delete_batch_prediction_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_DeleteBatchPredictionJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the BatchPredictionJob resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callDeleteBatchPredictionJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteBatchPredictionJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteBatchPredictionJob(); - // [END aiplatform_v1beta1_generated_JobService_DeleteBatchPredictionJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.delete_custom_job.js b/samples/generated/v1beta1/job_service.delete_custom_job.js deleted file mode 100644 index e3ebba42..00000000 --- a/samples/generated/v1beta1/job_service.delete_custom_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_DeleteCustomJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the CustomJob resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/customJobs/{custom_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callDeleteCustomJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteCustomJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteCustomJob(); - // [END aiplatform_v1beta1_generated_JobService_DeleteCustomJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.delete_data_labeling_job.js b/samples/generated/v1beta1/job_service.delete_data_labeling_job.js deleted file mode 100644 index 011f2429..00000000 --- a/samples/generated/v1beta1/job_service.delete_data_labeling_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_DeleteDataLabelingJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the DataLabelingJob to be deleted. - * Format: - * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callDeleteDataLabelingJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteDataLabelingJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDataLabelingJob(); - // [END aiplatform_v1beta1_generated_JobService_DeleteDataLabelingJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.delete_hyperparameter_tuning_job.js b/samples/generated/v1beta1/job_service.delete_hyperparameter_tuning_job.js deleted file mode 100644 index e57075ae..00000000 --- a/samples/generated/v1beta1/job_service.delete_hyperparameter_tuning_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_DeleteHyperparameterTuningJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the HyperparameterTuningJob resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callDeleteHyperparameterTuningJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteHyperparameterTuningJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteHyperparameterTuningJob(); - // [END aiplatform_v1beta1_generated_JobService_DeleteHyperparameterTuningJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.delete_model_deployment_monitoring_job.js b/samples/generated/v1beta1/job_service.delete_model_deployment_monitoring_job.js deleted file mode 100644 index f65e3a60..00000000 --- a/samples/generated/v1beta1/job_service.delete_model_deployment_monitoring_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_DeleteModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the model monitoring job to delete. - * Format: - * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callDeleteModelDeploymentMonitoringJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteModelDeploymentMonitoringJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteModelDeploymentMonitoringJob(); - // [END aiplatform_v1beta1_generated_JobService_DeleteModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.get_batch_prediction_job.js b/samples/generated/v1beta1/job_service.get_batch_prediction_job.js deleted file mode 100644 index 51970f9e..00000000 --- a/samples/generated/v1beta1/job_service.get_batch_prediction_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_GetBatchPredictionJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the BatchPredictionJob resource. - * Format: - * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callGetBatchPredictionJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getBatchPredictionJob(request); - console.log(response); - } - - callGetBatchPredictionJob(); - // [END aiplatform_v1beta1_generated_JobService_GetBatchPredictionJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.get_custom_job.js b/samples/generated/v1beta1/job_service.get_custom_job.js deleted file mode 100644 index 18c41bed..00000000 --- a/samples/generated/v1beta1/job_service.get_custom_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_GetCustomJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the CustomJob resource. - * Format: - * `projects/{project}/locations/{location}/customJobs/{custom_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callGetCustomJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getCustomJob(request); - console.log(response); - } - - callGetCustomJob(); - // [END aiplatform_v1beta1_generated_JobService_GetCustomJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.get_data_labeling_job.js b/samples/generated/v1beta1/job_service.get_data_labeling_job.js deleted file mode 100644 index 46946260..00000000 --- a/samples/generated/v1beta1/job_service.get_data_labeling_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_GetDataLabelingJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the DataLabelingJob. - * Format: - * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callGetDataLabelingJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getDataLabelingJob(request); - console.log(response); - } - - callGetDataLabelingJob(); - // [END aiplatform_v1beta1_generated_JobService_GetDataLabelingJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.get_hyperparameter_tuning_job.js b/samples/generated/v1beta1/job_service.get_hyperparameter_tuning_job.js deleted file mode 100644 index 317b105b..00000000 --- a/samples/generated/v1beta1/job_service.get_hyperparameter_tuning_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_GetHyperparameterTuningJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the HyperparameterTuningJob resource. - * Format: - * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callGetHyperparameterTuningJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getHyperparameterTuningJob(request); - console.log(response); - } - - callGetHyperparameterTuningJob(); - // [END aiplatform_v1beta1_generated_JobService_GetHyperparameterTuningJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.get_model_deployment_monitoring_job.js b/samples/generated/v1beta1/job_service.get_model_deployment_monitoring_job.js deleted file mode 100644 index 452018b4..00000000 --- a/samples/generated/v1beta1/job_service.get_model_deployment_monitoring_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_GetModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the ModelDeploymentMonitoringJob. - * Format: - * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callGetModelDeploymentMonitoringJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getModelDeploymentMonitoringJob(request); - console.log(response); - } - - callGetModelDeploymentMonitoringJob(); - // [END aiplatform_v1beta1_generated_JobService_GetModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.list_batch_prediction_jobs.js b/samples/generated/v1beta1/job_service.list_batch_prediction_jobs.js deleted file mode 100644 index aec54300..00000000 --- a/samples/generated/v1beta1/job_service.list_batch_prediction_jobs.js +++ /dev/null @@ -1,99 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_JobService_ListBatchPredictionJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the BatchPredictionJobs - * from. Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `model_display_name` supports `=`, `!=` comparisons. - * * `state` supports `=`, `!=` comparisons. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` - * * `state!="JOB_STATE_FAILED" OR display_name="my_job"` - * * `NOT display_name="my_job"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `labels.keyA=valueA` - * * `labels.keyB:*` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListBatchPredictionJobsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListBatchPredictionJobsResponse.next_page_token of the previous - * JobService.ListBatchPredictionJobs google.cloud.aiplatform.v1beta1.JobService.ListBatchPredictionJobs call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callListBatchPredictionJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listBatchPredictionJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListBatchPredictionJobs(); - // [END aiplatform_v1beta1_generated_JobService_ListBatchPredictionJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.list_custom_jobs.js b/samples/generated/v1beta1/job_service.list_custom_jobs.js deleted file mode 100644 index a1ed029d..00000000 --- a/samples/generated/v1beta1/job_service.list_custom_jobs.js +++ /dev/null @@ -1,98 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_JobService_ListCustomJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the CustomJobs from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `state` supports `=`, `!=` comparisons. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` - * * `state!="JOB_STATE_FAILED" OR display_name="my_job"` - * * `NOT display_name="my_job"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `labels.keyA=valueA` - * * `labels.keyB:*` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListCustomJobsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListCustomJobsResponse.next_page_token of the previous - * JobService.ListCustomJobs google.cloud.aiplatform.v1beta1.JobService.ListCustomJobs call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callListCustomJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listCustomJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListCustomJobs(); - // [END aiplatform_v1beta1_generated_JobService_ListCustomJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.list_data_labeling_jobs.js b/samples/generated/v1beta1/job_service.list_data_labeling_jobs.js deleted file mode 100644 index 1950798c..00000000 --- a/samples/generated/v1beta1/job_service.list_data_labeling_jobs.js +++ /dev/null @@ -1,104 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_JobService_ListDataLabelingJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent of the DataLabelingJob. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `state` supports `=`, `!=` comparisons. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` - * * `state!="JOB_STATE_FAILED" OR display_name="my_job"` - * * `NOT display_name="my_job"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `labels.keyA=valueA` - * * `labels.keyB:*` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. FieldMask represents a set of - * symbolic field paths. For example, the mask can be `paths: "name"`. The - * "name" here is a field in DataLabelingJob. - * If this field is not set, all fields of the DataLabelingJob are returned. - */ - // const readMask = {} - /** - * A comma-separated list of fields to order by, sorted in ascending order by - * default. - * Use `desc` after a field name for descending. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callListDataLabelingJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listDataLabelingJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDataLabelingJobs(); - // [END aiplatform_v1beta1_generated_JobService_ListDataLabelingJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.list_hyperparameter_tuning_jobs.js b/samples/generated/v1beta1/job_service.list_hyperparameter_tuning_jobs.js deleted file mode 100644 index 752e0823..00000000 --- a/samples/generated/v1beta1/job_service.list_hyperparameter_tuning_jobs.js +++ /dev/null @@ -1,98 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_JobService_ListHyperparameterTuningJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the HyperparameterTuningJobs - * from. Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `state` supports `=`, `!=` comparisons. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` - * * `state!="JOB_STATE_FAILED" OR display_name="my_job"` - * * `NOT display_name="my_job"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `labels.keyA=valueA` - * * `labels.keyB:*` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListHyperparameterTuningJobsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListHyperparameterTuningJobsResponse.next_page_token of the previous - * JobService.ListHyperparameterTuningJobs google.cloud.aiplatform.v1beta1.JobService.ListHyperparameterTuningJobs call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callListHyperparameterTuningJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listHyperparameterTuningJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListHyperparameterTuningJobs(); - // [END aiplatform_v1beta1_generated_JobService_ListHyperparameterTuningJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.list_model_deployment_monitoring_jobs.js b/samples/generated/v1beta1/job_service.list_model_deployment_monitoring_jobs.js deleted file mode 100644 index 4c3e2975..00000000 --- a/samples/generated/v1beta1/job_service.list_model_deployment_monitoring_jobs.js +++ /dev/null @@ -1,95 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_JobService_ListModelDeploymentMonitoringJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent of the ModelDeploymentMonitoringJob. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `state` supports `=`, `!=` comparisons. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` - * * `state!="JOB_STATE_FAILED" OR display_name="my_job"` - * * `NOT display_name="my_job"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `labels.keyA=valueA` - * * `labels.keyB:*` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read - */ - // const readMask = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callListModelDeploymentMonitoringJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listModelDeploymentMonitoringJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListModelDeploymentMonitoringJobs(); - // [END aiplatform_v1beta1_generated_JobService_ListModelDeploymentMonitoringJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.pause_model_deployment_monitoring_job.js b/samples/generated/v1beta1/job_service.pause_model_deployment_monitoring_job.js deleted file mode 100644 index 4c6f9c40..00000000 --- a/samples/generated/v1beta1/job_service.pause_model_deployment_monitoring_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_PauseModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the ModelDeploymentMonitoringJob to pause. - * Format: - * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callPauseModelDeploymentMonitoringJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.pauseModelDeploymentMonitoringJob(request); - console.log(response); - } - - callPauseModelDeploymentMonitoringJob(); - // [END aiplatform_v1beta1_generated_JobService_PauseModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.resume_model_deployment_monitoring_job.js b/samples/generated/v1beta1/job_service.resume_model_deployment_monitoring_job.js deleted file mode 100644 index 66e89d35..00000000 --- a/samples/generated/v1beta1/job_service.resume_model_deployment_monitoring_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_JobService_ResumeModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the ModelDeploymentMonitoringJob to resume. - * Format: - * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callResumeModelDeploymentMonitoringJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.resumeModelDeploymentMonitoringJob(request); - console.log(response); - } - - callResumeModelDeploymentMonitoringJob(); - // [END aiplatform_v1beta1_generated_JobService_ResumeModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.search_model_deployment_monitoring_stats_anomalies.js b/samples/generated/v1beta1/job_service.search_model_deployment_monitoring_stats_anomalies.js deleted file mode 100644 index 1c221286..00000000 --- a/samples/generated/v1beta1/job_service.search_model_deployment_monitoring_stats_anomalies.js +++ /dev/null @@ -1,103 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(modelDeploymentMonitoringJob, deployedModelId, objectives) { - // [START aiplatform_v1beta1_generated_JobService_SearchModelDeploymentMonitoringStatsAnomalies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. ModelDeploymentMonitoring Job resource name. - * Format: - * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - */ - // const modelDeploymentMonitoringJob = 'abc123' - /** - * Required. The DeployedModel ID of the - * ModelDeploymentMonitoringObjectiveConfig.deployed_model_id. - */ - // const deployedModelId = 'abc123' - /** - * The feature display name. If specified, only return the stats belonging to - * this feature. Format: - * ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name google.cloud.aiplatform.v1beta1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name, - * example: "user_destination". - */ - // const featureDisplayName = 'abc123' - /** - * Required. Objectives of the stats to retrieve. - */ - // const objectives = 1234 - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * A page token received from a previous - * JobService.SearchModelDeploymentMonitoringStatsAnomalies google.cloud.aiplatform.v1beta1.JobService.SearchModelDeploymentMonitoringStatsAnomalies - * call. - */ - // const pageToken = 'abc123' - /** - * The earliest timestamp of stats being generated. - * If not set, indicates fetching stats till the earliest possible one. - */ - // const startTime = {} - /** - * The latest timestamp of stats being generated. - * If not set, indicates feching stats till the latest possible one. - */ - // const endTime = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callSearchModelDeploymentMonitoringStatsAnomalies() { - // Construct request - const request = { - modelDeploymentMonitoringJob, - deployedModelId, - objectives, - }; - - // Run request - const iterable = await aiplatformClient.searchModelDeploymentMonitoringStatsAnomaliesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callSearchModelDeploymentMonitoringStatsAnomalies(); - // [END aiplatform_v1beta1_generated_JobService_SearchModelDeploymentMonitoringStatsAnomalies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/job_service.update_model_deployment_monitoring_job.js b/samples/generated/v1beta1/job_service.update_model_deployment_monitoring_job.js deleted file mode 100644 index 9e09ddd2..00000000 --- a/samples/generated/v1beta1/job_service.update_model_deployment_monitoring_job.js +++ /dev/null @@ -1,92 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(modelDeploymentMonitoringJob, updateMask) { - // [START aiplatform_v1beta1_generated_JobService_UpdateModelDeploymentMonitoringJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The model monitoring configuration which replaces the resource on the - * server. - */ - // const modelDeploymentMonitoringJob = {} - /** - * Required. The update mask is used to specify the fields to be overwritten in the - * ModelDeploymentMonitoringJob resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then only the non-empty fields present in the - * request will be overwritten. Set the update_mask to `*` to override all - * fields. - * For the objective config, the user can either provide the update mask for - * model_deployment_monitoring_objective_configs or any combination of its - * nested fields, such as: - * model_deployment_monitoring_objective_configs.objective_config.training_dataset. - * Updatable fields: - * * `display_name` - * * `model_deployment_monitoring_schedule_config` - * * `model_monitoring_alert_config` - * * `logging_sampling_strategy` - * * `labels` - * * `log_ttl` - * * `enable_monitoring_pipeline_logs` - * . and - * * `model_deployment_monitoring_objective_configs` - * . or - * * `model_deployment_monitoring_objective_configs.objective_config.training_dataset` - * * `model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config` - * * `model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config` - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {JobServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new JobServiceClient(); - - async function callUpdateModelDeploymentMonitoringJob() { - // Construct request - const request = { - modelDeploymentMonitoringJob, - updateMask, - }; - - // Run request - const [operation] = await aiplatformClient.updateModelDeploymentMonitoringJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateModelDeploymentMonitoringJob(); - // [END aiplatform_v1beta1_generated_JobService_UpdateModelDeploymentMonitoringJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.js b/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.js deleted file mode 100644 index 9d047755..00000000 --- a/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(context) { - // [START aiplatform_v1beta1_generated_MetadataService_AddContextArtifactsAndExecutions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Context that the Artifacts and Executions - * belong to. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const context = 'abc123' - /** - * The resource names of the Artifacts to attribute to the Context. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - */ - // const artifacts = 'abc123' - /** - * The resource names of the Executions to associate with the - * Context. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const executions = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callAddContextArtifactsAndExecutions() { - // Construct request - const request = { - context, - }; - - // Run request - const response = await aiplatformClient.addContextArtifactsAndExecutions(request); - console.log(response); - } - - callAddContextArtifactsAndExecutions(); - // [END aiplatform_v1beta1_generated_MetadataService_AddContextArtifactsAndExecutions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.add_context_children.js b/samples/generated/v1beta1/metadata_service.add_context_children.js deleted file mode 100644 index b8c62fc4..00000000 --- a/samples/generated/v1beta1/metadata_service.add_context_children.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(context) { - // [START aiplatform_v1beta1_generated_MetadataService_AddContextChildren_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent Context. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const context = 'abc123' - /** - * The resource names of the child Contexts. - */ - // const childContexts = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callAddContextChildren() { - // Construct request - const request = { - context, - }; - - // Run request - const response = await aiplatformClient.addContextChildren(request); - console.log(response); - } - - callAddContextChildren(); - // [END aiplatform_v1beta1_generated_MetadataService_AddContextChildren_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.add_execution_events.js b/samples/generated/v1beta1/metadata_service.add_execution_events.js deleted file mode 100644 index ed8fe2d0..00000000 --- a/samples/generated/v1beta1/metadata_service.add_execution_events.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(execution) { - // [START aiplatform_v1beta1_generated_MetadataService_AddExecutionEvents_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Execution that the Events connect - * Artifacts with. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const execution = 'abc123' - /** - * The Events to create and add. - */ - // const events = 1234 - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callAddExecutionEvents() { - // Construct request - const request = { - execution, - }; - - // Run request - const response = await aiplatformClient.addExecutionEvents(request); - console.log(response); - } - - callAddExecutionEvents(); - // [END aiplatform_v1beta1_generated_MetadataService_AddExecutionEvents_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.create_artifact.js b/samples/generated/v1beta1/metadata_service.create_artifact.js deleted file mode 100644 index ebb09c8b..00000000 --- a/samples/generated/v1beta1/metadata_service.create_artifact.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, artifact) { - // [START aiplatform_v1beta1_generated_MetadataService_CreateArtifact_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore where the Artifact should - * be created. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. The Artifact to create. - */ - // const artifact = {} - /** - * The {artifact} portion of the resource name with the format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - * If not provided, the Artifact's ID will be a UUID generated by the service. - * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. - * Must be unique across all Artifacts in the parent MetadataStore. (Otherwise - * the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the - * caller can't view the preexisting Artifact.) - */ - // const artifactId = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callCreateArtifact() { - // Construct request - const request = { - parent, - artifact, - }; - - // Run request - const response = await aiplatformClient.createArtifact(request); - console.log(response); - } - - callCreateArtifact(); - // [END aiplatform_v1beta1_generated_MetadataService_CreateArtifact_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.create_context.js b/samples/generated/v1beta1/metadata_service.create_context.js deleted file mode 100644 index 73d20aee..00000000 --- a/samples/generated/v1beta1/metadata_service.create_context.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, context) { - // [START aiplatform_v1beta1_generated_MetadataService_CreateContext_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore where the Context should be - * created. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. The Context to create. - */ - // const context = {} - /** - * The {context} portion of the resource name with the format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`. - * If not provided, the Context's ID will be a UUID generated by the service. - * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. - * Must be unique across all Contexts in the parent MetadataStore. (Otherwise - * the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the - * caller can't view the preexisting Context.) - */ - // const contextId = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callCreateContext() { - // Construct request - const request = { - parent, - context, - }; - - // Run request - const response = await aiplatformClient.createContext(request); - console.log(response); - } - - callCreateContext(); - // [END aiplatform_v1beta1_generated_MetadataService_CreateContext_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.create_execution.js b/samples/generated/v1beta1/metadata_service.create_execution.js deleted file mode 100644 index 64e4257e..00000000 --- a/samples/generated/v1beta1/metadata_service.create_execution.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, execution) { - // [START aiplatform_v1beta1_generated_MetadataService_CreateExecution_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore where the Execution should - * be created. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. The Execution to create. - */ - // const execution = {} - /** - * The {execution} portion of the resource name with the format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - * If not provided, the Execution's ID will be a UUID generated by the - * service. - * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. - * Must be unique across all Executions in the parent MetadataStore. - * (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED - * if the caller can't view the preexisting Execution.) - */ - // const executionId = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callCreateExecution() { - // Construct request - const request = { - parent, - execution, - }; - - // Run request - const response = await aiplatformClient.createExecution(request); - console.log(response); - } - - callCreateExecution(); - // [END aiplatform_v1beta1_generated_MetadataService_CreateExecution_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.create_metadata_schema.js b/samples/generated/v1beta1/metadata_service.create_metadata_schema.js deleted file mode 100644 index 5b1fbe09..00000000 --- a/samples/generated/v1beta1/metadata_service.create_metadata_schema.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, metadataSchema) { - // [START aiplatform_v1beta1_generated_MetadataService_CreateMetadataSchema_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore where the MetadataSchema should - * be created. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. The MetadataSchema to create. - */ - // const metadataSchema = {} - /** - * The {metadata_schema} portion of the resource name with the format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}` - * If not provided, the MetadataStore's ID will be a UUID generated by the - * service. - * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. - * Must be unique across all MetadataSchemas in the parent Location. - * (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED - * if the caller can't view the preexisting MetadataSchema.) - */ - // const metadataSchemaId = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callCreateMetadataSchema() { - // Construct request - const request = { - parent, - metadataSchema, - }; - - // Run request - const response = await aiplatformClient.createMetadataSchema(request); - console.log(response); - } - - callCreateMetadataSchema(); - // [END aiplatform_v1beta1_generated_MetadataService_CreateMetadataSchema_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.create_metadata_store.js b/samples/generated/v1beta1/metadata_service.create_metadata_store.js deleted file mode 100644 index 935f9bd9..00000000 --- a/samples/generated/v1beta1/metadata_service.create_metadata_store.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, metadataStore) { - // [START aiplatform_v1beta1_generated_MetadataService_CreateMetadataStore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location where the MetadataStore should - * be created. - * Format: `projects/{project}/locations/{location}/` - */ - // const parent = 'abc123' - /** - * Required. The MetadataStore to create. - */ - // const metadataStore = {} - /** - * The {metadatastore} portion of the resource name with the format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - * If not provided, the MetadataStore's ID will be a UUID generated by the - * service. - * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. - * Must be unique across all MetadataStores in the parent Location. - * (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED - * if the caller can't view the preexisting MetadataStore.) - */ - // const metadataStoreId = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callCreateMetadataStore() { - // Construct request - const request = { - parent, - metadataStore, - }; - - // Run request - const [operation] = await aiplatformClient.createMetadataStore(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateMetadataStore(); - // [END aiplatform_v1beta1_generated_MetadataService_CreateMetadataStore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.delete_artifact.js b/samples/generated/v1beta1/metadata_service.delete_artifact.js deleted file mode 100644 index c5135771..00000000 --- a/samples/generated/v1beta1/metadata_service.delete_artifact.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_MetadataService_DeleteArtifact_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Artifact to delete. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - */ - // const name = 'abc123' - /** - * Optional. The etag of the Artifact to delete. - * If this is provided, it must match the server's etag. Otherwise, the - * request will fail with a FAILED_PRECONDITION. - */ - // const etag = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callDeleteArtifact() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteArtifact(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteArtifact(); - // [END aiplatform_v1beta1_generated_MetadataService_DeleteArtifact_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.delete_context.js b/samples/generated/v1beta1/metadata_service.delete_context.js deleted file mode 100644 index 652169cd..00000000 --- a/samples/generated/v1beta1/metadata_service.delete_context.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_MetadataService_DeleteContext_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Context to delete. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const name = 'abc123' - /** - * The force deletion semantics is still undefined. - * Users should not use this field. - */ - // const force = true - /** - * Optional. The etag of the Context to delete. - * If this is provided, it must match the server's etag. Otherwise, the - * request will fail with a FAILED_PRECONDITION. - */ - // const etag = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callDeleteContext() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteContext(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteContext(); - // [END aiplatform_v1beta1_generated_MetadataService_DeleteContext_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.delete_execution.js b/samples/generated/v1beta1/metadata_service.delete_execution.js deleted file mode 100644 index ed796159..00000000 --- a/samples/generated/v1beta1/metadata_service.delete_execution.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_MetadataService_DeleteExecution_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Execution to delete. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const name = 'abc123' - /** - * Optional. The etag of the Execution to delete. - * If this is provided, it must match the server's etag. Otherwise, the - * request will fail with a FAILED_PRECONDITION. - */ - // const etag = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callDeleteExecution() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteExecution(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteExecution(); - // [END aiplatform_v1beta1_generated_MetadataService_DeleteExecution_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.delete_metadata_store.js b/samples/generated/v1beta1/metadata_service.delete_metadata_store.js deleted file mode 100644 index 3484c7c4..00000000 --- a/samples/generated/v1beta1/metadata_service.delete_metadata_store.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_MetadataService_DeleteMetadataStore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore to delete. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callDeleteMetadataStore() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteMetadataStore(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteMetadataStore(); - // [END aiplatform_v1beta1_generated_MetadataService_DeleteMetadataStore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.get_artifact.js b/samples/generated/v1beta1/metadata_service.get_artifact.js deleted file mode 100644 index 0f036d42..00000000 --- a/samples/generated/v1beta1/metadata_service.get_artifact.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_MetadataService_GetArtifact_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Artifact to retrieve. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callGetArtifact() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getArtifact(request); - console.log(response); - } - - callGetArtifact(); - // [END aiplatform_v1beta1_generated_MetadataService_GetArtifact_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.get_context.js b/samples/generated/v1beta1/metadata_service.get_context.js deleted file mode 100644 index 2980f049..00000000 --- a/samples/generated/v1beta1/metadata_service.get_context.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_MetadataService_GetContext_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Context to retrieve. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callGetContext() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getContext(request); - console.log(response); - } - - callGetContext(); - // [END aiplatform_v1beta1_generated_MetadataService_GetContext_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.get_execution.js b/samples/generated/v1beta1/metadata_service.get_execution.js deleted file mode 100644 index bb74f265..00000000 --- a/samples/generated/v1beta1/metadata_service.get_execution.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_MetadataService_GetExecution_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Execution to retrieve. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callGetExecution() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getExecution(request); - console.log(response); - } - - callGetExecution(); - // [END aiplatform_v1beta1_generated_MetadataService_GetExecution_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.get_metadata_schema.js b/samples/generated/v1beta1/metadata_service.get_metadata_schema.js deleted file mode 100644 index 1a1fbd09..00000000 --- a/samples/generated/v1beta1/metadata_service.get_metadata_schema.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_MetadataService_GetMetadataSchema_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataSchema to retrieve. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callGetMetadataSchema() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getMetadataSchema(request); - console.log(response); - } - - callGetMetadataSchema(); - // [END aiplatform_v1beta1_generated_MetadataService_GetMetadataSchema_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.get_metadata_store.js b/samples/generated/v1beta1/metadata_service.get_metadata_store.js deleted file mode 100644 index 6fa55c28..00000000 --- a/samples/generated/v1beta1/metadata_service.get_metadata_store.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_MetadataService_GetMetadataStore_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the MetadataStore to retrieve. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callGetMetadataStore() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getMetadataStore(request); - console.log(response); - } - - callGetMetadataStore(); - // [END aiplatform_v1beta1_generated_MetadataService_GetMetadataStore_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.list_artifacts.js b/samples/generated/v1beta1/metadata_service.list_artifacts.js deleted file mode 100644 index f256190c..00000000 --- a/samples/generated/v1beta1/metadata_service.list_artifacts.js +++ /dev/null @@ -1,114 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_MetadataService_ListArtifacts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The MetadataStore whose Artifacts should be listed. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * The maximum number of Artifacts to return. The service may return fewer. - * Must be in range 1-1000, inclusive. Defaults to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous MetadataService.ListArtifacts google.cloud.aiplatform.v1beta1.MetadataService.ListArtifacts - * call. Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters must match the call that - * provided the page token. (Otherwise the request will fail with - * INVALID_ARGUMENT error.) - */ - // const pageToken = 'abc123' - /** - * Filter specifying the boolean condition for the Artifacts to satisfy in - * order to be part of the result set. - * The syntax to define filter query is based on https://google.aip.dev/160. - * The supported set of filters include the following: - * * **Attribute filtering**: - * For example: `display_name = "test"`. - * Supported fields include: `name`, `display_name`, `uri`, `state`, - * `schema_title`, `create_time`, and `update_time`. - * Time fields, such as `create_time` and `update_time`, require values - * specified in RFC-3339 format. - * For example: `create_time = "2020-11-19T11:30:00-04:00"` - * * **Metadata field**: - * To filter on metadata fields use traversal operation as follows: - * `metadata..`. - * For example: `metadata.field_1.number_value = 10.0` - * * **Context based filtering**: - * To filter Artifacts based on the contexts to which they belong, use the - * function operator with the full resource name - * `in_context()`. - * For example: - * `in_context("projects//locations//metadataStores//contexts/")` - * Each of the above supported filter types can be combined together using - * logical operators (`AND` & `OR`). - * For example: `display_name = "test" AND metadata.field1.bool_value = true`. - */ - // const filter = 'abc123' - /** - * How the list of messages is ordered. Specify the values to order by and an - * ordering operation. The default sorting order is ascending. To specify - * descending order for a field, users append a " desc" suffix; for example: - * "foo desc, bar". - * Subfields are specified with a `.` character, such as foo.bar. - * see https://google.aip.dev/132#ordering for more details. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callListArtifacts() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listArtifactsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListArtifacts(); - // [END aiplatform_v1beta1_generated_MetadataService_ListArtifacts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.list_contexts.js b/samples/generated/v1beta1/metadata_service.list_contexts.js deleted file mode 100644 index a1d3857a..00000000 --- a/samples/generated/v1beta1/metadata_service.list_contexts.js +++ /dev/null @@ -1,117 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_MetadataService_ListContexts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The MetadataStore whose Contexts should be listed. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * The maximum number of Contexts to return. The service may return fewer. - * Must be in range 1-1000, inclusive. Defaults to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous MetadataService.ListContexts google.cloud.aiplatform.v1beta1.MetadataService.ListContexts - * call. Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters must match the call that - * provided the page token. (Otherwise the request will fail with - * INVALID_ARGUMENT error.) - */ - // const pageToken = 'abc123' - /** - * Filter specifying the boolean condition for the Contexts to satisfy in - * order to be part of the result set. - * The syntax to define filter query is based on https://google.aip.dev/160. - * Following are the supported set of filters: - * * **Attribute filtering**: - * For example: `display_name = "test"`. - * Supported fields include: `name`, `display_name`, `schema_title`, - * `create_time`, and `update_time`. - * Time fields, such as `create_time` and `update_time`, require values - * specified in RFC-3339 format. - * For example: `create_time = "2020-11-19T11:30:00-04:00"`. - * * **Metadata field**: - * To filter on metadata fields use traversal operation as follows: - * `metadata..`. - * For example: `metadata.field_1.number_value = 10.0`. - * * **Parent Child filtering**: - * To filter Contexts based on parent-child relationship use the HAS - * operator as follows: - * ``` - * parent_contexts: - * "projects//locations//metadataStores//contexts/" - * child_contexts: - * "projects//locations//metadataStores//contexts/" - * ``` - * Each of the above supported filters can be combined together using - * logical operators (`AND` & `OR`). - * For example: `display_name = "test" AND metadata.field1.bool_value = true`. - */ - // const filter = 'abc123' - /** - * How the list of messages is ordered. Specify the values to order by and an - * ordering operation. The default sorting order is ascending. To specify - * descending order for a field, users append a " desc" suffix; for example: - * "foo desc, bar". - * Subfields are specified with a `.` character, such as foo.bar. - * see https://google.aip.dev/132#ordering for more details. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callListContexts() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listContextsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListContexts(); - // [END aiplatform_v1beta1_generated_MetadataService_ListContexts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.list_executions.js b/samples/generated/v1beta1/metadata_service.list_executions.js deleted file mode 100644 index 462c346f..00000000 --- a/samples/generated/v1beta1/metadata_service.list_executions.js +++ /dev/null @@ -1,114 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_MetadataService_ListExecutions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The MetadataStore whose Executions should be listed. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * The maximum number of Executions to return. The service may return fewer. - * Must be in range 1-1000, inclusive. Defaults to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous MetadataService.ListExecutions google.cloud.aiplatform.v1beta1.MetadataService.ListExecutions - * call. Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters must match the call that - * provided the page token. (Otherwise the request will fail with an - * INVALID_ARGUMENT error.) - */ - // const pageToken = 'abc123' - /** - * Filter specifying the boolean condition for the Executions to satisfy in - * order to be part of the result set. - * The syntax to define filter query is based on https://google.aip.dev/160. - * Following are the supported set of filters: - * * **Attribute filtering**: - * For example: `display_name = "test"`. - * Supported fields include: `name`, `display_name`, `state`, - * `schema_title`, `create_time`, and `update_time`. - * Time fields, such as `create_time` and `update_time`, require values - * specified in RFC-3339 format. - * For example: `create_time = "2020-11-19T11:30:00-04:00"`. - * * **Metadata field**: - * To filter on metadata fields use traversal operation as follows: - * `metadata..` - * For example: `metadata.field_1.number_value = 10.0` - * * **Context based filtering**: - * To filter Executions based on the contexts to which they belong use - * the function operator with the full resource name: - * `in_context()`. - * For example: - * `in_context("projects//locations//metadataStores//contexts/")` - * Each of the above supported filters can be combined together using - * logical operators (`AND` & `OR`). - * For example: `display_name = "test" AND metadata.field1.bool_value = true`. - */ - // const filter = 'abc123' - /** - * How the list of messages is ordered. Specify the values to order by and an - * ordering operation. The default sorting order is ascending. To specify - * descending order for a field, users append a " desc" suffix; for example: - * "foo desc, bar". - * Subfields are specified with a `.` character, such as foo.bar. - * see https://google.aip.dev/132#ordering for more details. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callListExecutions() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listExecutionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListExecutions(); - // [END aiplatform_v1beta1_generated_MetadataService_ListExecutions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.list_metadata_schemas.js b/samples/generated/v1beta1/metadata_service.list_metadata_schemas.js deleted file mode 100644 index 2c731934..00000000 --- a/samples/generated/v1beta1/metadata_service.list_metadata_schemas.js +++ /dev/null @@ -1,84 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_MetadataService_ListMetadataSchemas_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The MetadataStore whose MetadataSchemas should be listed. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * The maximum number of MetadataSchemas to return. The service may return - * fewer. - * Must be in range 1-1000, inclusive. Defaults to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * MetadataService.ListMetadataSchemas google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataSchemas call. Provide this to retrieve the - * next page. - * When paginating, all other provided parameters must match the call that - * provided the page token. (Otherwise the request will fail with - * INVALID_ARGUMENT error.) - */ - // const pageToken = 'abc123' - /** - * A query to filter available MetadataSchemas for matching results. - */ - // const filter = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callListMetadataSchemas() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listMetadataSchemasAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListMetadataSchemas(); - // [END aiplatform_v1beta1_generated_MetadataService_ListMetadataSchemas_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.list_metadata_stores.js b/samples/generated/v1beta1/metadata_service.list_metadata_stores.js deleted file mode 100644 index bd9ba7b4..00000000 --- a/samples/generated/v1beta1/metadata_service.list_metadata_stores.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_MetadataService_ListMetadataStores_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Location whose MetadataStores should be listed. - * Format: - * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The maximum number of Metadata Stores to return. The service may return - * fewer. - * Must be in range 1-1000, inclusive. Defaults to 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * MetadataService.ListMetadataStores google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataStores call. Provide this to retrieve the - * subsequent page. - * When paginating, all other provided parameters must match the call that - * provided the page token. (Otherwise the request will fail with - * INVALID_ARGUMENT error.) - */ - // const pageToken = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callListMetadataStores() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listMetadataStoresAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListMetadataStores(); - // [END aiplatform_v1beta1_generated_MetadataService_ListMetadataStores_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.purge_artifacts.js b/samples/generated/v1beta1/metadata_service.purge_artifacts.js deleted file mode 100644 index d64b6380..00000000 --- a/samples/generated/v1beta1/metadata_service.purge_artifacts.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, filter) { - // [START aiplatform_v1beta1_generated_MetadataService_PurgeArtifacts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The metadata store to purge Artifacts from. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. A required filter matching the Artifacts to be purged. - * E.g., `update_time <= 2020-11-19T11:30:00-04:00`. - */ - // const filter = 'abc123' - /** - * Optional. Flag to indicate to actually perform the purge. - * If `force` is set to false, the method will return a sample of - * Artifact names that would be deleted. - */ - // const force = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callPurgeArtifacts() { - // Construct request - const request = { - parent, - filter, - }; - - // Run request - const [operation] = await aiplatformClient.purgeArtifacts(request); - const [response] = await operation.promise(); - console.log(response); - } - - callPurgeArtifacts(); - // [END aiplatform_v1beta1_generated_MetadataService_PurgeArtifacts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.purge_contexts.js b/samples/generated/v1beta1/metadata_service.purge_contexts.js deleted file mode 100644 index 462a9887..00000000 --- a/samples/generated/v1beta1/metadata_service.purge_contexts.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, filter) { - // [START aiplatform_v1beta1_generated_MetadataService_PurgeContexts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The metadata store to purge Contexts from. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. A required filter matching the Contexts to be purged. - * E.g., `update_time <= 2020-11-19T11:30:00-04:00`. - */ - // const filter = 'abc123' - /** - * Optional. Flag to indicate to actually perform the purge. - * If `force` is set to false, the method will return a sample of - * Context names that would be deleted. - */ - // const force = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callPurgeContexts() { - // Construct request - const request = { - parent, - filter, - }; - - // Run request - const [operation] = await aiplatformClient.purgeContexts(request); - const [response] = await operation.promise(); - console.log(response); - } - - callPurgeContexts(); - // [END aiplatform_v1beta1_generated_MetadataService_PurgeContexts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.purge_executions.js b/samples/generated/v1beta1/metadata_service.purge_executions.js deleted file mode 100644 index 32166957..00000000 --- a/samples/generated/v1beta1/metadata_service.purge_executions.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, filter) { - // [START aiplatform_v1beta1_generated_MetadataService_PurgeExecutions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The metadata store to purge Executions from. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` - */ - // const parent = 'abc123' - /** - * Required. A required filter matching the Executions to be purged. - * E.g., `update_time <= 2020-11-19T11:30:00-04:00`. - */ - // const filter = 'abc123' - /** - * Optional. Flag to indicate to actually perform the purge. - * If `force` is set to false, the method will return a sample of - * Execution names that would be deleted. - */ - // const force = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callPurgeExecutions() { - // Construct request - const request = { - parent, - filter, - }; - - // Run request - const [operation] = await aiplatformClient.purgeExecutions(request); - const [response] = await operation.promise(); - console.log(response); - } - - callPurgeExecutions(); - // [END aiplatform_v1beta1_generated_MetadataService_PurgeExecutions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js b/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js deleted file mode 100644 index 88154e29..00000000 --- a/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js +++ /dev/null @@ -1,96 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(artifact) { - // [START aiplatform_v1beta1_generated_MetadataService_QueryArtifactLineageSubgraph_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Artifact whose Lineage needs to be retrieved as a - * LineageSubgraph. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - * The request may error with FAILED_PRECONDITION if the number of Artifacts, - * the number of Executions, or the number of Events that would be returned - * for the Context exceeds 1000. - */ - // const artifact = 'abc123' - /** - * Specifies the size of the lineage graph in terms of number of hops from the - * specified artifact. - * Negative Value: INVALID_ARGUMENT error is returned - * 0: Only input artifact is returned. - * No value: Transitive closure is performed to return the complete graph. - */ - // const maxHops = 1234 - /** - * Filter specifying the boolean condition for the Artifacts to satisfy in - * order to be part of the Lineage Subgraph. - * The syntax to define filter query is based on https://google.aip.dev/160. - * The supported set of filters include the following: - * * **Attribute filtering**: - * For example: `display_name = "test"` - * Supported fields include: `name`, `display_name`, `uri`, `state`, - * `schema_title`, `create_time`, and `update_time`. - * Time fields, such as `create_time` and `update_time`, require values - * specified in RFC-3339 format. - * For example: `create_time = "2020-11-19T11:30:00-04:00"` - * * **Metadata field**: - * To filter on metadata fields use traversal operation as follows: - * `metadata..`. - * For example: `metadata.field_1.number_value = 10.0` - * Each of the above supported filter types can be combined together using - * logical operators (`AND` & `OR`). - * For example: `display_name = "test" AND metadata.field1.bool_value = true`. - */ - // const filter = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callQueryArtifactLineageSubgraph() { - // Construct request - const request = { - artifact, - }; - - // Run request - const response = await aiplatformClient.queryArtifactLineageSubgraph(request); - console.log(response); - } - - callQueryArtifactLineageSubgraph(); - // [END aiplatform_v1beta1_generated_MetadataService_QueryArtifactLineageSubgraph_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.query_context_lineage_subgraph.js b/samples/generated/v1beta1/metadata_service.query_context_lineage_subgraph.js deleted file mode 100644 index adc32bdc..00000000 --- a/samples/generated/v1beta1/metadata_service.query_context_lineage_subgraph.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(context) { - // [START aiplatform_v1beta1_generated_MetadataService_QueryContextLineageSubgraph_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Context whose Artifacts and Executions - * should be retrieved as a LineageSubgraph. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - * The request may error with FAILED_PRECONDITION if the number of Artifacts, - * the number of Executions, or the number of Events that would be returned - * for the Context exceeds 1000. - */ - // const context = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callQueryContextLineageSubgraph() { - // Construct request - const request = { - context, - }; - - // Run request - const response = await aiplatformClient.queryContextLineageSubgraph(request); - console.log(response); - } - - callQueryContextLineageSubgraph(); - // [END aiplatform_v1beta1_generated_MetadataService_QueryContextLineageSubgraph_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.query_execution_inputs_and_outputs.js b/samples/generated/v1beta1/metadata_service.query_execution_inputs_and_outputs.js deleted file mode 100644 index c924e445..00000000 --- a/samples/generated/v1beta1/metadata_service.query_execution_inputs_and_outputs.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(execution) { - // [START aiplatform_v1beta1_generated_MetadataService_QueryExecutionInputsAndOutputs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Execution whose input and output Artifacts should - * be retrieved as a LineageSubgraph. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const execution = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callQueryExecutionInputsAndOutputs() { - // Construct request - const request = { - execution, - }; - - // Run request - const response = await aiplatformClient.queryExecutionInputsAndOutputs(request); - console.log(response); - } - - callQueryExecutionInputsAndOutputs(); - // [END aiplatform_v1beta1_generated_MetadataService_QueryExecutionInputsAndOutputs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.remove_context_children.js b/samples/generated/v1beta1/metadata_service.remove_context_children.js deleted file mode 100644 index d4aa462c..00000000 --- a/samples/generated/v1beta1/metadata_service.remove_context_children.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(context) { - // [START aiplatform_v1beta1_generated_MetadataService_RemoveContextChildren_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent Context. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const context = 'abc123' - /** - * The resource names of the child Contexts. - */ - // const childContexts = 'abc123' - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callRemoveContextChildren() { - // Construct request - const request = { - context, - }; - - // Run request - const response = await aiplatformClient.removeContextChildren(request); - console.log(response); - } - - callRemoveContextChildren(); - // [END aiplatform_v1beta1_generated_MetadataService_RemoveContextChildren_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.update_artifact.js b/samples/generated/v1beta1/metadata_service.update_artifact.js deleted file mode 100644 index 34b8012a..00000000 --- a/samples/generated/v1beta1/metadata_service.update_artifact.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(artifact) { - // [START aiplatform_v1beta1_generated_MetadataService_UpdateArtifact_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Artifact containing updates. - * The Artifact's Artifact.name google.cloud.aiplatform.v1beta1.Artifact.name field is used to identify the Artifact to - * be updated. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` - */ - // const artifact = {} - /** - * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. - */ - // const updateMask = {} - /** - * If set to true, and the Artifact google.cloud.aiplatform.v1beta1.Artifact is not found, a new Artifact google.cloud.aiplatform.v1beta1.Artifact is - * created. - */ - // const allowMissing = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callUpdateArtifact() { - // Construct request - const request = { - artifact, - }; - - // Run request - const response = await aiplatformClient.updateArtifact(request); - console.log(response); - } - - callUpdateArtifact(); - // [END aiplatform_v1beta1_generated_MetadataService_UpdateArtifact_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.update_context.js b/samples/generated/v1beta1/metadata_service.update_context.js deleted file mode 100644 index 176ca7a1..00000000 --- a/samples/generated/v1beta1/metadata_service.update_context.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(context) { - // [START aiplatform_v1beta1_generated_MetadataService_UpdateContext_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Context containing updates. - * The Context's Context.name google.cloud.aiplatform.v1beta1.Context.name field is used to identify the Context to be - * updated. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` - */ - // const context = {} - /** - * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. - */ - // const updateMask = {} - /** - * If set to true, and the Context google.cloud.aiplatform.v1beta1.Context is not found, a new Context google.cloud.aiplatform.v1beta1.Context is - * created. - */ - // const allowMissing = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callUpdateContext() { - // Construct request - const request = { - context, - }; - - // Run request - const response = await aiplatformClient.updateContext(request); - console.log(response); - } - - callUpdateContext(); - // [END aiplatform_v1beta1_generated_MetadataService_UpdateContext_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/metadata_service.update_execution.js b/samples/generated/v1beta1/metadata_service.update_execution.js deleted file mode 100644 index c6fb4602..00000000 --- a/samples/generated/v1beta1/metadata_service.update_execution.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(execution) { - // [START aiplatform_v1beta1_generated_MetadataService_UpdateExecution_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Execution containing updates. - * The Execution's Execution.name google.cloud.aiplatform.v1beta1.Execution.name field is used to identify the Execution - * to be updated. - * Format: - * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` - */ - // const execution = {} - /** - * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. - */ - // const updateMask = {} - /** - * If set to true, and the Execution google.cloud.aiplatform.v1beta1.Execution is not found, a new Execution google.cloud.aiplatform.v1beta1.Execution - * is created. - */ - // const allowMissing = true - - // Imports the Aiplatform library - const {MetadataServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MetadataServiceClient(); - - async function callUpdateExecution() { - // Construct request - const request = { - execution, - }; - - // Run request - const response = await aiplatformClient.updateExecution(request); - console.log(response); - } - - callUpdateExecution(); - // [END aiplatform_v1beta1_generated_MetadataService_UpdateExecution_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/migration_service.batch_migrate_resources.js b/samples/generated/v1beta1/migration_service.batch_migrate_resources.js deleted file mode 100644 index 6a06659e..00000000 --- a/samples/generated/v1beta1/migration_service.batch_migrate_resources.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, migrateResourceRequests) { - // [START aiplatform_v1beta1_generated_MigrationService_BatchMigrateResources_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The location of the migrated resource will live in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The request messages specifying the resources to migrate. - * They must be in the same location as the destination. - * Up to 50 resources can be migrated in one batch. - */ - // const migrateResourceRequests = 1234 - - // Imports the Aiplatform library - const {MigrationServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MigrationServiceClient(); - - async function callBatchMigrateResources() { - // Construct request - const request = { - parent, - migrateResourceRequests, - }; - - // Run request - const [operation] = await aiplatformClient.batchMigrateResources(request); - const [response] = await operation.promise(); - console.log(response); - } - - callBatchMigrateResources(); - // [END aiplatform_v1beta1_generated_MigrationService_BatchMigrateResources_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/migration_service.search_migratable_resources.js b/samples/generated/v1beta1/migration_service.search_migratable_resources.js deleted file mode 100644 index 7470e76a..00000000 --- a/samples/generated/v1beta1/migration_service.search_migratable_resources.js +++ /dev/null @@ -1,90 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_MigrationService_SearchMigratableResources_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The location that the migratable resources should be searched from. - * It's the Vertex AI location that the resources can be migrated to, not - * the resources' original location. - * Format: - * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard page size. - * The default and maximum value is 100. - */ - // const pageSize = 1234 - /** - * The standard page token. - */ - // const pageToken = 'abc123' - /** - * A filter for your search. You can use the following types of filters: - * * Resource type filters. The following strings filter for a specific type - * of MigratableResource google.cloud.aiplatform.v1beta1.MigratableResource: - * * `ml_engine_model_version:*` - * * `automl_model:*` - * * `automl_dataset:*` - * * `data_labeling_dataset:*` - * * "Migrated or not" filters. The following strings filter for resources - * that either have or have not already been migrated: - * * `last_migrate_time:*` filters for migrated resources. - * * `NOT last_migrate_time:*` filters for not yet migrated resources. - */ - // const filter = 'abc123' - - // Imports the Aiplatform library - const {MigrationServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new MigrationServiceClient(); - - async function callSearchMigratableResources() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.searchMigratableResourcesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callSearchMigratableResources(); - // [END aiplatform_v1beta1_generated_MigrationService_SearchMigratableResources_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.batch_import_model_evaluation_slices.js b/samples/generated/v1beta1/model_service.batch_import_model_evaluation_slices.js deleted file mode 100644 index a5ba00be..00000000 --- a/samples/generated/v1beta1/model_service.batch_import_model_evaluation_slices.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, modelEvaluationSlices) { - // [START aiplatform_v1beta1_generated_ModelService_BatchImportModelEvaluationSlices_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent ModelEvaluation resource. - * Format: - * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` - */ - // const parent = 'abc123' - /** - * Required. Model evaluation slice resource to be imported. - */ - // const modelEvaluationSlices = 1234 - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callBatchImportModelEvaluationSlices() { - // Construct request - const request = { - parent, - modelEvaluationSlices, - }; - - // Run request - const response = await aiplatformClient.batchImportModelEvaluationSlices(request); - console.log(response); - } - - callBatchImportModelEvaluationSlices(); - // [END aiplatform_v1beta1_generated_ModelService_BatchImportModelEvaluationSlices_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.delete_model.js b/samples/generated/v1beta1/model_service.delete_model.js deleted file mode 100644 index b0328943..00000000 --- a/samples/generated/v1beta1/model_service.delete_model.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_ModelService_DeleteModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Model resource to be deleted. - * Format: `projects/{project}/locations/{location}/models/{model}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callDeleteModel() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteModel(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteModel(); - // [END aiplatform_v1beta1_generated_ModelService_DeleteModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.delete_model_version.js b/samples/generated/v1beta1/model_service.delete_model_version.js deleted file mode 100644 index 7c37987a..00000000 --- a/samples/generated/v1beta1/model_service.delete_model_version.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_ModelService_DeleteModelVersion_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the model version to be deleted, with a version ID explicitly - * included. - * Example: `projects/{project}/locations/{location}/models/{model}@1234` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callDeleteModelVersion() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteModelVersion(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteModelVersion(); - // [END aiplatform_v1beta1_generated_ModelService_DeleteModelVersion_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.export_model.js b/samples/generated/v1beta1/model_service.export_model.js deleted file mode 100644 index 1e59804e..00000000 --- a/samples/generated/v1beta1/model_service.export_model.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, outputConfig) { - // [START aiplatform_v1beta1_generated_ModelService_ExportModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Model to export. - * The resource name may contain version id or version alias to specify the - * version, if no version is specified, the default version will be exported. - */ - // const name = 'abc123' - /** - * Required. The desired output location and configuration. - */ - // const outputConfig = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callExportModel() { - // Construct request - const request = { - name, - outputConfig, - }; - - // Run request - const [operation] = await aiplatformClient.exportModel(request); - const [response] = await operation.promise(); - console.log(response); - } - - callExportModel(); - // [END aiplatform_v1beta1_generated_ModelService_ExportModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.get_model.js b/samples/generated/v1beta1/model_service.get_model.js deleted file mode 100644 index 22bb2535..00000000 --- a/samples/generated/v1beta1/model_service.get_model.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_ModelService_GetModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Model resource. - * Format: `projects/{project}/locations/{location}/models/{model}` - * In order to retrieve a specific version of the model, also provide - * the version ID or version alias. - * Example: `projects/{project}/locations/{location}/models/{model}@2` - * or - * `projects/{project}/locations/{location}/models/{model}@golden` - * If no version ID or alias is specified, the "default" version will be - * returned. The "default" version alias is created for the first version of - * the model, and can be moved to other versions later on. There will be - * exactly one default version. - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callGetModel() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getModel(request); - console.log(response); - } - - callGetModel(); - // [END aiplatform_v1beta1_generated_ModelService_GetModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.get_model_evaluation.js b/samples/generated/v1beta1/model_service.get_model_evaluation.js deleted file mode 100644 index 079a5710..00000000 --- a/samples/generated/v1beta1/model_service.get_model_evaluation.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_ModelService_GetModelEvaluation_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the ModelEvaluation resource. - * Format: - * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callGetModelEvaluation() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getModelEvaluation(request); - console.log(response); - } - - callGetModelEvaluation(); - // [END aiplatform_v1beta1_generated_ModelService_GetModelEvaluation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.get_model_evaluation_slice.js b/samples/generated/v1beta1/model_service.get_model_evaluation_slice.js deleted file mode 100644 index 7c421bc6..00000000 --- a/samples/generated/v1beta1/model_service.get_model_evaluation_slice.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_ModelService_GetModelEvaluationSlice_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the ModelEvaluationSlice resource. - * Format: - * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callGetModelEvaluationSlice() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getModelEvaluationSlice(request); - console.log(response); - } - - callGetModelEvaluationSlice(); - // [END aiplatform_v1beta1_generated_ModelService_GetModelEvaluationSlice_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.import_model_evaluation.js b/samples/generated/v1beta1/model_service.import_model_evaluation.js deleted file mode 100644 index ada50ddf..00000000 --- a/samples/generated/v1beta1/model_service.import_model_evaluation.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, modelEvaluation) { - // [START aiplatform_v1beta1_generated_ModelService_ImportModelEvaluation_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent model resource. - * Format: `projects/{project}/locations/{location}/models/{model}` - */ - // const parent = 'abc123' - /** - * Required. Model evaluation resource to be imported. - */ - // const modelEvaluation = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callImportModelEvaluation() { - // Construct request - const request = { - parent, - modelEvaluation, - }; - - // Run request - const response = await aiplatformClient.importModelEvaluation(request); - console.log(response); - } - - callImportModelEvaluation(); - // [END aiplatform_v1beta1_generated_ModelService_ImportModelEvaluation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.list_model_evaluation_slices.js b/samples/generated/v1beta1/model_service.list_model_evaluation_slices.js deleted file mode 100644 index f932db34..00000000 --- a/samples/generated/v1beta1/model_service.list_model_evaluation_slices.js +++ /dev/null @@ -1,85 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_ModelService_ListModelEvaluationSlices_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices - * from. Format: - * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * * `slice.dimension` - for =. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListModelEvaluationSlicesResponse.next_page_token google.cloud.aiplatform.v1beta1.ListModelEvaluationSlicesResponse.next_page_token of the previous - * ModelService.ListModelEvaluationSlices google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluationSlices call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callListModelEvaluationSlices() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listModelEvaluationSlicesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListModelEvaluationSlices(); - // [END aiplatform_v1beta1_generated_ModelService_ListModelEvaluationSlices_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.list_model_evaluations.js b/samples/generated/v1beta1/model_service.list_model_evaluations.js deleted file mode 100644 index b9c13949..00000000 --- a/samples/generated/v1beta1/model_service.list_model_evaluations.js +++ /dev/null @@ -1,83 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_ModelService_ListModelEvaluations_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Model to list the ModelEvaluations from. - * Format: `projects/{project}/locations/{location}/models/{model}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListModelEvaluationsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListModelEvaluationsResponse.next_page_token of the previous - * ModelService.ListModelEvaluations google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluations call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callListModelEvaluations() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listModelEvaluationsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListModelEvaluations(); - // [END aiplatform_v1beta1_generated_ModelService_ListModelEvaluations_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.list_model_versions.js b/samples/generated/v1beta1/model_service.list_model_versions.js deleted file mode 100644 index 90da425f..00000000 --- a/samples/generated/v1beta1/model_service.list_model_versions.js +++ /dev/null @@ -1,89 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_ModelService_ListModelVersions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the model to list versions for. - */ - // const name = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListModelVersionsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token of the previous - * ModelService.ListModelversions call. - */ - // const pageToken = 'abc123' - /** - * An expression for filtering the results of the request. For field names - * both snake_case and camelCase are supported. - * * `labels` supports general map functions that is: - * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence - * * A key including a space must be quoted. `labels."a key"`. - * Some examples: - * * `labels.myKey="myValue"` - */ - // const filter = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callListModelVersions() { - // Construct request - const request = { - name, - }; - - // Run request - const iterable = await aiplatformClient.listModelVersionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListModelVersions(); - // [END aiplatform_v1beta1_generated_ModelService_ListModelVersions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.list_models.js b/samples/generated/v1beta1/model_service.list_models.js deleted file mode 100644 index 1544b6e0..00000000 --- a/samples/generated/v1beta1/model_service.list_models.js +++ /dev/null @@ -1,95 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_ModelService_ListModels_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the Models from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * An expression for filtering the results of the request. For field names - * both snake_case and camelCase are supported. - * * `model` supports = and !=. `model` represents the Model ID, - * i.e. the last segment of the Model's resource name google.cloud.aiplatform.v1beta1.Model.name. - * * `display_name` supports = and != - * * `labels` supports general map functions that is: - * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence - * * A key including a space must be quoted. `labels."a key"`. - * Some examples: - * * `model=1234` - * * `displayName="myDisplayName"` - * * `labels.myKey="myValue"` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListModelsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListModelsResponse.next_page_token of the previous - * ModelService.ListModels google.cloud.aiplatform.v1beta1.ModelService.ListModels call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callListModels() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listModelsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListModels(); - // [END aiplatform_v1beta1_generated_ModelService_ListModels_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.merge_version_aliases.js b/samples/generated/v1beta1/model_service.merge_version_aliases.js deleted file mode 100644 index f20bae63..00000000 --- a/samples/generated/v1beta1/model_service.merge_version_aliases.js +++ /dev/null @@ -1,78 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, versionAliases) { - // [START aiplatform_v1beta1_generated_ModelService_MergeVersionAliases_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the model version to merge aliases, with a version ID - * explicitly included. - * Example: `projects/{project}/locations/{location}/models/{model}@1234` - */ - // const name = 'abc123' - /** - * Required. The set of version aliases to merge. - * The alias should be at most 128 characters, and match - * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`. - * Add the `-` prefix to an alias means removing that alias from the version. - * `-` is NOT counted in the 128 characters. Example: `-golden` means removing - * the `golden` alias from the version. - * There is NO ordering in aliases, which means - * 1) The aliases returned from GetModel API might not have the exactly same - * order from this MergeVersionAliases API. 2) Adding and deleting the same - * alias in the request is not recommended, and the 2 operations will be - * cancelled out. - */ - // const versionAliases = 'abc123' - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callMergeVersionAliases() { - // Construct request - const request = { - name, - versionAliases, - }; - - // Run request - const response = await aiplatformClient.mergeVersionAliases(request); - console.log(response); - } - - callMergeVersionAliases(); - // [END aiplatform_v1beta1_generated_ModelService_MergeVersionAliases_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.update_explanation_dataset.js b/samples/generated/v1beta1/model_service.update_explanation_dataset.js deleted file mode 100644 index 47c8f21f..00000000 --- a/samples/generated/v1beta1/model_service.update_explanation_dataset.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(model) { - // [START aiplatform_v1beta1_generated_ModelService_UpdateExplanationDataset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Model to update. - * Format: `projects/{project}/locations/{location}/models/{model}` - */ - // const model = 'abc123' - /** - * The example config containing the location of the dataset. - */ - // const examples = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callUpdateExplanationDataset() { - // Construct request - const request = { - model, - }; - - // Run request - const [operation] = await aiplatformClient.updateExplanationDataset(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateExplanationDataset(); - // [END aiplatform_v1beta1_generated_ModelService_UpdateExplanationDataset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.update_model.js b/samples/generated/v1beta1/model_service.update_model.js deleted file mode 100644 index 02dba574..00000000 --- a/samples/generated/v1beta1/model_service.update_model.js +++ /dev/null @@ -1,84 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(model, updateMask) { - // [START aiplatform_v1beta1_generated_ModelService_UpdateModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Model which replaces the resource on the server. - * When Model Versioning is enabled, the model.name will be used to determine - * whether to update the model or model version. - * 1. model.name with the @ value, e.g. models/123@1, refers to a version - * specific update. - * 2. model.name without the @ value, e.g. models/123, refers to a model - * update. - * 3. model.name with @-, e.g. models/123@-, refers to a model update. - * 4. Supported model fields: display_name, description; supported - * version-specific fields: version_description. Labels are supported in both - * scenarios. Both the model labels and the version labels are merged when a - * model is returned. When updating labels, if the request is for - * model-specific update, model label gets updated. Otherwise, version labels - * get updated. - * 5. A model name or model version name fields update mismatch will cause a - * precondition error. - * 6. One request cannot update both the model and the version fields. You - * must update them separately. - */ - // const model = {} - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see google.protobuf.FieldMask google.protobuf.FieldMask. - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callUpdateModel() { - // Construct request - const request = { - model, - updateMask, - }; - - // Run request - const response = await aiplatformClient.updateModel(request); - console.log(response); - } - - callUpdateModel(); - // [END aiplatform_v1beta1_generated_ModelService_UpdateModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/model_service.upload_model.js b/samples/generated/v1beta1/model_service.upload_model.js deleted file mode 100644 index b9c1810f..00000000 --- a/samples/generated/v1beta1/model_service.upload_model.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, model) { - // [START aiplatform_v1beta1_generated_ModelService_UploadModel_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location into which to upload the Model. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The resource name of the model into which to upload the version. Only - * specify this field when uploading a new version. - */ - // const parentModel = 'abc123' - /** - * Optional. The ID to use for the uploaded Model, which will become the final - * component of the model resource name. - * This value may be up to 63 characters, and valid characters are - * `[a-z0-9_-]`. The first character cannot be a number or hyphen. - */ - // const modelId = 'abc123' - /** - * Required. The Model to create. - */ - // const model = {} - - // Imports the Aiplatform library - const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new ModelServiceClient(); - - async function callUploadModel() { - // Construct request - const request = { - parent, - model, - }; - - // Run request - const [operation] = await aiplatformClient.uploadModel(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUploadModel(); - // [END aiplatform_v1beta1_generated_ModelService_UploadModel_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/pipeline_service.cancel_pipeline_job.js b/samples/generated/v1beta1/pipeline_service.cancel_pipeline_job.js deleted file mode 100644 index 62c3e656..00000000 --- a/samples/generated/v1beta1/pipeline_service.cancel_pipeline_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_PipelineService_CancelPipelineJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the PipelineJob to cancel. - * Format: - * `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callCancelPipelineJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelPipelineJob(request); - console.log(response); - } - - callCancelPipelineJob(); - // [END aiplatform_v1beta1_generated_PipelineService_CancelPipelineJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/pipeline_service.cancel_training_pipeline.js b/samples/generated/v1beta1/pipeline_service.cancel_training_pipeline.js deleted file mode 100644 index a4dc9c78..00000000 --- a/samples/generated/v1beta1/pipeline_service.cancel_training_pipeline.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_PipelineService_CancelTrainingPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TrainingPipeline to cancel. - * Format: - * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callCancelTrainingPipeline() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.cancelTrainingPipeline(request); - console.log(response); - } - - callCancelTrainingPipeline(); - // [END aiplatform_v1beta1_generated_PipelineService_CancelTrainingPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/pipeline_service.create_pipeline_job.js b/samples/generated/v1beta1/pipeline_service.create_pipeline_job.js deleted file mode 100644 index b9312e09..00000000 --- a/samples/generated/v1beta1/pipeline_service.create_pipeline_job.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, pipelineJob) { - // [START aiplatform_v1beta1_generated_PipelineService_CreatePipelineJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the PipelineJob in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The PipelineJob to create. - */ - // const pipelineJob = {} - /** - * The ID to use for the PipelineJob, which will become the final component of - * the PipelineJob name. If not provided, an ID will be automatically - * generated. - * This value should be less than 128 characters, and valid characters - * are /[a-z][0-9]-/. - */ - // const pipelineJobId = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callCreatePipelineJob() { - // Construct request - const request = { - parent, - pipelineJob, - }; - - // Run request - const response = await aiplatformClient.createPipelineJob(request); - console.log(response); - } - - callCreatePipelineJob(); - // [END aiplatform_v1beta1_generated_PipelineService_CreatePipelineJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/pipeline_service.create_training_pipeline.js b/samples/generated/v1beta1/pipeline_service.create_training_pipeline.js deleted file mode 100644 index 5c72fcfd..00000000 --- a/samples/generated/v1beta1/pipeline_service.create_training_pipeline.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, trainingPipeline) { - // [START aiplatform_v1beta1_generated_PipelineService_CreateTrainingPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the TrainingPipeline in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The TrainingPipeline to create. - */ - // const trainingPipeline = {} - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callCreateTrainingPipeline() { - // Construct request - const request = { - parent, - trainingPipeline, - }; - - // Run request - const response = await aiplatformClient.createTrainingPipeline(request); - console.log(response); - } - - callCreateTrainingPipeline(); - // [END aiplatform_v1beta1_generated_PipelineService_CreateTrainingPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/pipeline_service.delete_pipeline_job.js b/samples/generated/v1beta1/pipeline_service.delete_pipeline_job.js deleted file mode 100644 index 53b38d3d..00000000 --- a/samples/generated/v1beta1/pipeline_service.delete_pipeline_job.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_PipelineService_DeletePipelineJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the PipelineJob resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callDeletePipelineJob() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deletePipelineJob(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeletePipelineJob(); - // [END aiplatform_v1beta1_generated_PipelineService_DeletePipelineJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/pipeline_service.delete_training_pipeline.js b/samples/generated/v1beta1/pipeline_service.delete_training_pipeline.js deleted file mode 100644 index 289eb19a..00000000 --- a/samples/generated/v1beta1/pipeline_service.delete_training_pipeline.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_PipelineService_DeleteTrainingPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TrainingPipeline resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callDeleteTrainingPipeline() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteTrainingPipeline(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTrainingPipeline(); - // [END aiplatform_v1beta1_generated_PipelineService_DeleteTrainingPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/pipeline_service.get_pipeline_job.js b/samples/generated/v1beta1/pipeline_service.get_pipeline_job.js deleted file mode 100644 index 1f2d1f37..00000000 --- a/samples/generated/v1beta1/pipeline_service.get_pipeline_job.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_PipelineService_GetPipelineJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the PipelineJob resource. - * Format: - * `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callGetPipelineJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getPipelineJob(request); - console.log(response); - } - - callGetPipelineJob(); - // [END aiplatform_v1beta1_generated_PipelineService_GetPipelineJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/pipeline_service.get_training_pipeline.js b/samples/generated/v1beta1/pipeline_service.get_training_pipeline.js deleted file mode 100644 index e0181609..00000000 --- a/samples/generated/v1beta1/pipeline_service.get_training_pipeline.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_PipelineService_GetTrainingPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TrainingPipeline resource. - * Format: - * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callGetTrainingPipeline() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTrainingPipeline(request); - console.log(response); - } - - callGetTrainingPipeline(); - // [END aiplatform_v1beta1_generated_PipelineService_GetTrainingPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/pipeline_service.list_pipeline_jobs.js b/samples/generated/v1beta1/pipeline_service.list_pipeline_jobs.js deleted file mode 100644 index c0e49e88..00000000 --- a/samples/generated/v1beta1/pipeline_service.list_pipeline_jobs.js +++ /dev/null @@ -1,126 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_PipelineService_ListPipelineJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the PipelineJobs from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Lists the PipelineJobs that match the filter expression. The following - * fields are supported: - * * `pipeline_name`: Supports `=` and `!=` comparisons. - * * `display_name`: Supports `=`, `!=` comparisons, and `:` wildcard. - * * `pipeline_job_user_id`: Supports `=`, `!=` comparisons, and `:` wildcard. - * for example, can check if pipeline's display_name contains *step* by - * doing display_name:\"*step*\" - * * `state`: Supports `=` and `!=` comparisons. - * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. - * Values must be in RFC 3339 format. - * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. - * Values must be in RFC 3339 format. - * * `end_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. - * Values must be in RFC 3339 format. - * * `labels`: Supports key-value equality and key presence. - * * `template_uri`: Supports `=`, `!=` comparisons, and `:` wildcard. - * * `template_metadata.version`: Supports `=`, `!=` comparisons, and `:` - * wildcard. - * Filter expressions can be combined together using logical operators - * (`AND` & `OR`). - * For example: `pipeline_name="test" AND create_time>"2020-05-18T13:30:00Z"`. - * The syntax to define filter expression is based on - * https://google.aip.dev/160. - * Examples: - * * `create_time>"2021-05-18T00:00:00Z" OR - * update_time>"2020-05-18T00:00:00Z"` PipelineJobs created or updated - * after 2020-05-18 00:00:00 UTC. - * * `labels.env = "prod"` - * PipelineJobs with label "env" set to "prod". - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListPipelineJobsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListPipelineJobsResponse.next_page_token of the previous - * PipelineService.ListPipelineJobs google.cloud.aiplatform.v1beta1.PipelineService.ListPipelineJobs call. - */ - // const pageToken = 'abc123' - /** - * A comma-separated list of fields to order by. The default sort order is in - * ascending order. Use "desc" after a field name for descending. You can have - * multiple order_by fields provided e.g. "create_time desc, end_time", - * "end_time, start_time, update_time" For example, using "create_time desc, - * end_time" will order results by create time in descending order, and if - * there are multiple jobs having the same create time, order them by the end - * time in ascending order. if order_by is not specified, it will order by - * default order is create time in descending order. Supported fields: - * * `create_time` - * * `update_time` - * * `end_time` - * * `start_time` - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callListPipelineJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listPipelineJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPipelineJobs(); - // [END aiplatform_v1beta1_generated_PipelineService_ListPipelineJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/pipeline_service.list_training_pipelines.js b/samples/generated/v1beta1/pipeline_service.list_training_pipelines.js deleted file mode 100644 index b9ab1be4..00000000 --- a/samples/generated/v1beta1/pipeline_service.list_training_pipelines.js +++ /dev/null @@ -1,98 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_PipelineService_ListTrainingPipelines_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the TrainingPipelines from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list filter. - * Supported fields: - * * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. - * * `state` supports `=`, `!=` comparisons. - * * `training_task_definition` `=`, `!=` comparisons, and `:` wildcard. - * * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. - * `create_time` must be in RFC 3339 format. - * * `labels` supports general map functions that is: - * `labels.key=value` - key:value equality - * `labels.key:* - key existence - * Some examples of using the filter are: - * * `state="PIPELINE_STATE_SUCCEEDED" AND display_name:"my_pipeline_*"` - * * `state!="PIPELINE_STATE_FAILED" OR display_name="my_pipeline"` - * * `NOT display_name="my_pipeline"` - * * `create_time>"2021-05-18T00:00:00Z"` - * * `training_task_definition:"*automl_text_classification*"` - */ - // const filter = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained via - * ListTrainingPipelinesResponse.next_page_token google.cloud.aiplatform.v1beta1.ListTrainingPipelinesResponse.next_page_token of the previous - * PipelineService.ListTrainingPipelines google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines call. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {PipelineServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PipelineServiceClient(); - - async function callListTrainingPipelines() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTrainingPipelinesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTrainingPipelines(); - // [END aiplatform_v1beta1_generated_PipelineService_ListTrainingPipelines_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/prediction_service.explain.js b/samples/generated/v1beta1/prediction_service.explain.js deleted file mode 100644 index 0c35a5a0..00000000 --- a/samples/generated/v1beta1/prediction_service.explain.js +++ /dev/null @@ -1,99 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint, instances) { - // [START aiplatform_v1beta1_generated_PredictionService_Explain_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint requested to serve the explanation. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const endpoint = 'abc123' - /** - * Required. The instances that are the input to the explanation call. - * A DeployedModel may have an upper limit on the number of instances it - * supports per request, and when it is exceeded the explanation call errors - * in case of AutoML Models, or, in case of customer created Models, the - * behaviour is as documented by that Model. - * The schema of any single instance may be specified via Endpoint's - * DeployedModels' Model's google.cloud.aiplatform.v1beta1.DeployedModel.model - * PredictSchemata's google.cloud.aiplatform.v1beta1.Model.predict_schemata - * instance_schema_uri google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri. - */ - // const instances = 1234 - /** - * The parameters that govern the prediction. The schema of the parameters may - * be specified via Endpoint's DeployedModels' Model's google.cloud.aiplatform.v1beta1.DeployedModel.model - * PredictSchemata's google.cloud.aiplatform.v1beta1.Model.predict_schemata - * parameters_schema_uri google.cloud.aiplatform.v1beta1.PredictSchemata.parameters_schema_uri. - */ - // const parameters = {} - /** - * If specified, overrides the - * explanation_spec google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec of the DeployedModel. - * Can be used for explaining prediction results with different - * configurations, such as: - * - Explaining top-5 predictions results as opposed to top-1; - * - Increasing path count or step count of the attribution methods to reduce - * approximate errors; - * - Using different baselines for explaining the prediction results. - */ - // const explanationSpecOverride = {} - /** - * If specified, this ExplainRequest will be served by the chosen - * DeployedModel, overriding Endpoint.traffic_split google.cloud.aiplatform.v1beta1.Endpoint.traffic_split. - */ - // const deployedModelId = 'abc123' - - // Imports the Aiplatform library - const {PredictionServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PredictionServiceClient(); - - async function callExplain() { - // Construct request - const request = { - endpoint, - instances, - }; - - // Run request - const response = await aiplatformClient.explain(request); - console.log(response); - } - - callExplain(); - // [END aiplatform_v1beta1_generated_PredictionService_Explain_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/prediction_service.predict.js b/samples/generated/v1beta1/prediction_service.predict.js deleted file mode 100644 index 3cabc926..00000000 --- a/samples/generated/v1beta1/prediction_service.predict.js +++ /dev/null @@ -1,83 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint, instances) { - // [START aiplatform_v1beta1_generated_PredictionService_Predict_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint requested to serve the prediction. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const endpoint = 'abc123' - /** - * Required. The instances that are the input to the prediction call. - * A DeployedModel may have an upper limit on the number of instances it - * supports per request, and when it is exceeded the prediction call errors - * in case of AutoML Models, or, in case of customer created Models, the - * behaviour is as documented by that Model. - * The schema of any single instance may be specified via Endpoint's - * DeployedModels' Model's google.cloud.aiplatform.v1beta1.DeployedModel.model - * PredictSchemata's google.cloud.aiplatform.v1beta1.Model.predict_schemata - * instance_schema_uri google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri. - */ - // const instances = 1234 - /** - * The parameters that govern the prediction. The schema of the parameters may - * be specified via Endpoint's DeployedModels' Model's google.cloud.aiplatform.v1beta1.DeployedModel.model - * PredictSchemata's google.cloud.aiplatform.v1beta1.Model.predict_schemata - * parameters_schema_uri google.cloud.aiplatform.v1beta1.PredictSchemata.parameters_schema_uri. - */ - // const parameters = {} - - // Imports the Aiplatform library - const {PredictionServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PredictionServiceClient(); - - async function callPredict() { - // Construct request - const request = { - endpoint, - instances, - }; - - // Run request - const response = await aiplatformClient.predict(request); - console.log(response); - } - - callPredict(); - // [END aiplatform_v1beta1_generated_PredictionService_Predict_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/prediction_service.raw_predict.js b/samples/generated/v1beta1/prediction_service.raw_predict.js deleted file mode 100644 index b4c6ea93..00000000 --- a/samples/generated/v1beta1/prediction_service.raw_predict.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(endpoint) { - // [START aiplatform_v1beta1_generated_PredictionService_RawPredict_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Endpoint requested to serve the prediction. - * Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - */ - // const endpoint = 'abc123' - /** - * The prediction input. Supports HTTP headers and arbitrary data payload. - * A DeployedModel google.cloud.aiplatform.v1beta1.DeployedModel may have an upper limit on the number of instances it - * supports per request. When this limit it is exceeded for an AutoML model, - * the RawPredict google.cloud.aiplatform.v1beta1.PredictionService.RawPredict method returns an error. - * When this limit is exceeded for a custom-trained model, the behavior varies - * depending on the model. - * You can specify the schema for each instance in the - * predict_schemata.instance_schema_uri google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri - * field when you create a Model google.cloud.aiplatform.v1beta1.Model. This schema applies when you deploy the - * `Model` as a `DeployedModel` to an Endpoint google.cloud.aiplatform.v1beta1.Endpoint and use the `RawPredict` - * method. - */ - // const httpBody = {} - - // Imports the Aiplatform library - const {PredictionServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new PredictionServiceClient(); - - async function callRawPredict() { - // Construct request - const request = { - endpoint, - }; - - // Run request - const response = await aiplatformClient.rawPredict(request); - console.log(response); - } - - callRawPredict(); - // [END aiplatform_v1beta1_generated_PredictionService_RawPredict_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json deleted file mode 100644 index 180f2829..00000000 --- a/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ /dev/null @@ -1,9307 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-aiplatform", - "version": "2.3.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.aiplatform.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_CreateDataset_async", - "title": "DatasetService createDataset Sample", - "origin": "API_DEFINITION", - "description": " Creates a Dataset.", - "canonical": true, - "file": "dataset_service.create_dataset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDataset", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.CreateDataset", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "dataset", - "type": ".google.cloud.aiplatform.v1beta1.Dataset" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "CreateDataset", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.CreateDataset", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_GetDataset_async", - "title": "DatasetService getDataset Sample", - "origin": "API_DEFINITION", - "description": " Gets a Dataset.", - "canonical": true, - "file": "dataset_service.get_dataset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataset", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.GetDataset", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Dataset", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "GetDataset", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.GetDataset", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_UpdateDataset_async", - "title": "DatasetService updateDataset Sample", - "origin": "API_DEFINITION", - "description": " Updates a Dataset.", - "canonical": true, - "file": "dataset_service.update_dataset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDataset", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.UpdateDataset", - "async": true, - "parameters": [ - { - "name": "dataset", - "type": ".google.cloud.aiplatform.v1beta1.Dataset" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Dataset", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "UpdateDataset", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.UpdateDataset", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_ListDatasets_async", - "title": "DatasetService listDatasets Sample", - "origin": "API_DEFINITION", - "description": " Lists Datasets in a Location.", - "canonical": true, - "file": "dataset_service.list_datasets.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 91, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDatasets", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ListDatasets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListDatasetsResponse", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "ListDatasets", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ListDatasets", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_DeleteDataset_async", - "title": "DatasetService deleteDataset Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Dataset.", - "canonical": true, - "file": "dataset_service.delete_dataset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDataset", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.DeleteDataset", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "DeleteDataset", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.DeleteDataset", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_ImportData_async", - "title": "DatasetService importData Sample", - "origin": "API_DEFINITION", - "description": " Imports data into a Dataset.", - "canonical": true, - "file": "dataset_service.import_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportData", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ImportData", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "import_configs", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "ImportData", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ImportData", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_ExportData_async", - "title": "DatasetService exportData Sample", - "origin": "API_DEFINITION", - "description": " Exports data from a Dataset.", - "canonical": true, - "file": "dataset_service.export_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportData", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ExportData", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "export_config", - "type": ".google.cloud.aiplatform.v1beta1.ExportDataConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "ExportData", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ExportData", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_ListDataItems_async", - "title": "DatasetService listDataItems Sample", - "origin": "API_DEFINITION", - "description": " Lists DataItems in a Dataset.", - "canonical": true, - "file": "dataset_service.list_data_items.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataItems", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ListDataItems", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListDataItemsResponse", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "ListDataItems", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ListDataItems", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_ListSavedQueries_async", - "title": "DatasetService listSavedQueries Sample", - "origin": "API_DEFINITION", - "description": " Lists SavedQueries in a Dataset.", - "canonical": true, - "file": "dataset_service.list_saved_queries.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSavedQueries", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ListSavedQueries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListSavedQueriesResponse", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "ListSavedQueries", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ListSavedQueries", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_GetAnnotationSpec_async", - "title": "DatasetService getAnnotationSpec Sample", - "origin": "API_DEFINITION", - "description": " Gets an AnnotationSpec.", - "canonical": true, - "file": "dataset_service.get_annotation_spec.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAnnotationSpec", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.GetAnnotationSpec", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.AnnotationSpec", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "GetAnnotationSpec", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.GetAnnotationSpec", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DatasetService_ListAnnotations_async", - "title": "DatasetService listAnnotations Sample", - "origin": "API_DEFINITION", - "description": " Lists Annotations belongs to a dataitem", - "canonical": true, - "file": "dataset_service.list_annotations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAnnotations", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListAnnotationsResponse", - "client": { - "shortName": "DatasetServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" - }, - "method": { - "shortName": "ListAnnotations", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations", - "service": { - "shortName": "DatasetService", - "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DeploymentResourcePoolService_CreateDeploymentResourcePool_async", - "title": "DatasetService createDeploymentResourcePool Sample", - "origin": "API_DEFINITION", - "description": " Create a DeploymentResourcePool.", - "canonical": true, - "file": "deployment_resource_pool_service.create_deployment_resource_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDeploymentResourcePool", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.CreateDeploymentResourcePool", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "deployment_resource_pool", - "type": ".google.cloud.aiplatform.v1beta1.DeploymentResourcePool" - }, - { - "name": "deployment_resource_pool_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DeploymentResourcePoolServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient" - }, - "method": { - "shortName": "CreateDeploymentResourcePool", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.CreateDeploymentResourcePool", - "service": { - "shortName": "DeploymentResourcePoolService", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DeploymentResourcePoolService_GetDeploymentResourcePool_async", - "title": "DatasetService getDeploymentResourcePool Sample", - "origin": "API_DEFINITION", - "description": " Get a DeploymentResourcePool.", - "canonical": true, - "file": "deployment_resource_pool_service.get_deployment_resource_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDeploymentResourcePool", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.GetDeploymentResourcePool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.DeploymentResourcePool", - "client": { - "shortName": "DeploymentResourcePoolServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient" - }, - "method": { - "shortName": "GetDeploymentResourcePool", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.GetDeploymentResourcePool", - "service": { - "shortName": "DeploymentResourcePoolService", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DeploymentResourcePoolService_ListDeploymentResourcePools_async", - "title": "DatasetService listDeploymentResourcePools Sample", - "origin": "API_DEFINITION", - "description": " List DeploymentResourcePools in a location.", - "canonical": true, - "file": "deployment_resource_pool_service.list_deployment_resource_pools.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDeploymentResourcePools", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.ListDeploymentResourcePools", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse", - "client": { - "shortName": "DeploymentResourcePoolServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient" - }, - "method": { - "shortName": "ListDeploymentResourcePools", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.ListDeploymentResourcePools", - "service": { - "shortName": "DeploymentResourcePoolService", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DeploymentResourcePoolService_DeleteDeploymentResourcePool_async", - "title": "DatasetService deleteDeploymentResourcePool Sample", - "origin": "API_DEFINITION", - "description": " Delete a DeploymentResourcePool.", - "canonical": true, - "file": "deployment_resource_pool_service.delete_deployment_resource_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDeploymentResourcePool", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.DeleteDeploymentResourcePool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DeploymentResourcePoolServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient" - }, - "method": { - "shortName": "DeleteDeploymentResourcePool", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.DeleteDeploymentResourcePool", - "service": { - "shortName": "DeploymentResourcePoolService", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_DeploymentResourcePoolService_QueryDeployedModels_async", - "title": "DatasetService queryDeployedModels Sample", - "origin": "API_DEFINITION", - "description": " List DeployedModels that have been deployed on this DeploymentResourcePool.", - "canonical": true, - "file": "deployment_resource_pool_service.query_deployed_models.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "QueryDeployedModels", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.QueryDeployedModels", - "async": true, - "parameters": [ - { - "name": "deployment_resource_pool", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse", - "client": { - "shortName": "DeploymentResourcePoolServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient" - }, - "method": { - "shortName": "QueryDeployedModels", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.QueryDeployedModels", - "service": { - "shortName": "DeploymentResourcePoolService", - "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_EndpointService_CreateEndpoint_async", - "title": "DatasetService createEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Creates an Endpoint.", - "canonical": true, - "file": "endpoint_service.create_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.CreateEndpoint", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "endpoint", - "type": ".google.cloud.aiplatform.v1beta1.Endpoint" - }, - { - "name": "endpoint_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointServiceClient" - }, - "method": { - "shortName": "CreateEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.CreateEndpoint", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_EndpointService_GetEndpoint_async", - "title": "DatasetService getEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Gets an Endpoint.", - "canonical": true, - "file": "endpoint_service.get_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.GetEndpoint", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Endpoint", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointServiceClient" - }, - "method": { - "shortName": "GetEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.GetEndpoint", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_EndpointService_ListEndpoints_async", - "title": "DatasetService listEndpoints Sample", - "origin": "API_DEFINITION", - "description": " Lists Endpoints in a Location.", - "canonical": true, - "file": "endpoint_service.list_endpoints.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEndpoints", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.ListEndpoints", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListEndpointsResponse", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointServiceClient" - }, - "method": { - "shortName": "ListEndpoints", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.ListEndpoints", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_EndpointService_UpdateEndpoint_async", - "title": "DatasetService updateEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Updates an Endpoint.", - "canonical": true, - "file": "endpoint_service.update_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.UpdateEndpoint", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": ".google.cloud.aiplatform.v1beta1.Endpoint" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Endpoint", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointServiceClient" - }, - "method": { - "shortName": "UpdateEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.UpdateEndpoint", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_EndpointService_DeleteEndpoint_async", - "title": "DatasetService deleteEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Deletes an Endpoint.", - "canonical": true, - "file": "endpoint_service.delete_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.DeleteEndpoint", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointServiceClient" - }, - "method": { - "shortName": "DeleteEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.DeleteEndpoint", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_EndpointService_DeployModel_async", - "title": "DatasetService deployModel Sample", - "origin": "API_DEFINITION", - "description": " Deploys a Model into this Endpoint, creating a DeployedModel within it.", - "canonical": true, - "file": "endpoint_service.deploy_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeployModel", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.DeployModel", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": "TYPE_STRING" - }, - { - "name": "deployed_model", - "type": ".google.cloud.aiplatform.v1beta1.DeployedModel" - }, - { - "name": "traffic_split", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointServiceClient" - }, - "method": { - "shortName": "DeployModel", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.DeployModel", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_EndpointService_UndeployModel_async", - "title": "DatasetService undeployModel Sample", - "origin": "API_DEFINITION", - "description": " Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.", - "canonical": true, - "file": "endpoint_service.undeploy_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UndeployModel", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.UndeployModel", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": "TYPE_STRING" - }, - { - "name": "deployed_model_id", - "type": "TYPE_STRING" - }, - { - "name": "traffic_split", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointServiceClient" - }, - "method": { - "shortName": "UndeployModel", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.UndeployModel", - "service": { - "shortName": "EndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.EndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_ReadFeatureValues_async", - "title": "DatasetService readFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Reads Feature values of a specific entity of an EntityType. For reading feature values of multiple entities of an EntityType, please use StreamingReadFeatureValues.", - "canonical": true, - "file": "featurestore_online_serving_service.read_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService.ReadFeatureValues", - "async": true, - "parameters": [ - { - "name": "entity_type", - "type": "TYPE_STRING" - }, - { - "name": "entity_id", - "type": "TYPE_STRING" - }, - { - "name": "feature_selector", - "type": ".google.cloud.aiplatform.v1beta1.FeatureSelector" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ReadFeatureValuesResponse", - "client": { - "shortName": "FeaturestoreOnlineServingServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingServiceClient" - }, - "method": { - "shortName": "ReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService.ReadFeatureValues", - "service": { - "shortName": "FeaturestoreOnlineServingService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_StreamingReadFeatureValues_async", - "title": "DatasetService streamingReadFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Reads Feature values for multiple entities. Depending on their size, data for different entities may be broken up across multiple responses.", - "canonical": true, - "file": "featurestore_online_serving_service.streaming_read_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StreamingReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService.StreamingReadFeatureValues", - "async": true, - "parameters": [ - { - "name": "entity_type", - "type": "TYPE_STRING" - }, - { - "name": "entity_ids", - "type": "TYPE_STRING[]" - }, - { - "name": "feature_selector", - "type": ".google.cloud.aiplatform.v1beta1.FeatureSelector" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ReadFeatureValuesResponse", - "client": { - "shortName": "FeaturestoreOnlineServingServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingServiceClient" - }, - "method": { - "shortName": "StreamingReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService.StreamingReadFeatureValues", - "service": { - "shortName": "FeaturestoreOnlineServingService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_WriteFeatureValues_async", - "title": "DatasetService writeFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Writes Feature values of one or more entities of an EntityType. The Feature values are merged into existing entities if any. The Feature values to be written must have timestamp within the online storage retention.", - "canonical": true, - "file": "featurestore_online_serving_service.write_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "WriteFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService.WriteFeatureValues", - "async": true, - "parameters": [ - { - "name": "entity_type", - "type": "TYPE_STRING" - }, - { - "name": "payloads", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.WriteFeatureValuesResponse", - "client": { - "shortName": "FeaturestoreOnlineServingServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingServiceClient" - }, - "method": { - "shortName": "WriteFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService.WriteFeatureValues", - "service": { - "shortName": "FeaturestoreOnlineServingService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_CreateFeaturestore_async", - "title": "DatasetService createFeaturestore Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Featurestore in a given project and location.", - "canonical": true, - "file": "featurestore_service.create_featurestore.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateFeaturestore", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.CreateFeaturestore", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "featurestore", - "type": ".google.cloud.aiplatform.v1beta1.Featurestore" - }, - { - "name": "featurestore_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "CreateFeaturestore", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.CreateFeaturestore", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_GetFeaturestore_async", - "title": "DatasetService getFeaturestore Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Featurestore.", - "canonical": true, - "file": "featurestore_service.get_featurestore.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetFeaturestore", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.GetFeaturestore", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Featurestore", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "GetFeaturestore", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.GetFeaturestore", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_ListFeaturestores_async", - "title": "DatasetService listFeaturestores Sample", - "origin": "API_DEFINITION", - "description": " Lists Featurestores in a given project and location.", - "canonical": true, - "file": "featurestore_service.list_featurestores.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 105, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListFeaturestores", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeaturestores", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListFeaturestoresResponse", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "ListFeaturestores", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeaturestores", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_UpdateFeaturestore_async", - "title": "DatasetService updateFeaturestore Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single Featurestore.", - "canonical": true, - "file": "featurestore_service.update_featurestore.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateFeaturestore", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.UpdateFeaturestore", - "async": true, - "parameters": [ - { - "name": "featurestore", - "type": ".google.cloud.aiplatform.v1beta1.Featurestore" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "UpdateFeaturestore", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.UpdateFeaturestore", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeaturestore_async", - "title": "DatasetService deleteFeaturestore Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single Featurestore. The Featurestore must not contain any EntityTypes or `force` must be set to true for the request to succeed.", - "canonical": true, - "file": "featurestore_service.delete_featurestore.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteFeaturestore", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeaturestore", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "DeleteFeaturestore", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeaturestore", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_CreateEntityType_async", - "title": "DatasetService createEntityType Sample", - "origin": "API_DEFINITION", - "description": " Creates a new EntityType in a given Featurestore.", - "canonical": true, - "file": "featurestore_service.create_entity_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntityType", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.CreateEntityType", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entity_type", - "type": ".google.cloud.aiplatform.v1beta1.EntityType" - }, - { - "name": "entity_type_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "CreateEntityType", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.CreateEntityType", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_GetEntityType_async", - "title": "DatasetService getEntityType Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single EntityType.", - "canonical": true, - "file": "featurestore_service.get_entity_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntityType", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.GetEntityType", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.EntityType", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "GetEntityType", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.GetEntityType", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_ListEntityTypes_async", - "title": "DatasetService listEntityTypes Sample", - "origin": "API_DEFINITION", - "description": " Lists EntityTypes in a given Featurestore.", - "canonical": true, - "file": "featurestore_service.list_entity_types.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 104, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntityTypes", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.ListEntityTypes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListEntityTypesResponse", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "ListEntityTypes", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.ListEntityTypes", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_UpdateEntityType_async", - "title": "DatasetService updateEntityType Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single EntityType.", - "canonical": true, - "file": "featurestore_service.update_entity_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntityType", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.UpdateEntityType", - "async": true, - "parameters": [ - { - "name": "entity_type", - "type": ".google.cloud.aiplatform.v1beta1.EntityType" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.EntityType", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "UpdateEntityType", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.UpdateEntityType", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_DeleteEntityType_async", - "title": "DatasetService deleteEntityType Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single EntityType. The EntityType must not have any Features or `force` must be set to true for the request to succeed.", - "canonical": true, - "file": "featurestore_service.delete_entity_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntityType", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteEntityType", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "DeleteEntityType", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteEntityType", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_CreateFeature_async", - "title": "DatasetService createFeature Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Feature in a given EntityType.", - "canonical": true, - "file": "featurestore_service.create_feature.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateFeature", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.CreateFeature", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "feature", - "type": ".google.cloud.aiplatform.v1beta1.Feature" - }, - { - "name": "feature_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "CreateFeature", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.CreateFeature", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_BatchCreateFeatures_async", - "title": "DatasetService batchCreateFeatures Sample", - "origin": "API_DEFINITION", - "description": " Creates a batch of Features in a given EntityType.", - "canonical": true, - "file": "featurestore_service.batch_create_features.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchCreateFeatures", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.BatchCreateFeatures", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "BatchCreateFeatures", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.BatchCreateFeatures", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_GetFeature_async", - "title": "DatasetService getFeature Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Feature.", - "canonical": true, - "file": "featurestore_service.get_feature.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetFeature", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.GetFeature", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Feature", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "GetFeature", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.GetFeature", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_ListFeatures_async", - "title": "DatasetService listFeatures Sample", - "origin": "API_DEFINITION", - "description": " Lists Features in a given EntityType.", - "canonical": true, - "file": "featurestore_service.list_features.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 114, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListFeatures", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "latest_stats_count", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListFeaturesResponse", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "ListFeatures", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_UpdateFeature_async", - "title": "DatasetService updateFeature Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single Feature.", - "canonical": true, - "file": "featurestore_service.update_feature.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateFeature", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.UpdateFeature", - "async": true, - "parameters": [ - { - "name": "feature", - "type": ".google.cloud.aiplatform.v1beta1.Feature" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Feature", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "UpdateFeature", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.UpdateFeature", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeature_async", - "title": "DatasetService deleteFeature Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single Feature.", - "canonical": true, - "file": "featurestore_service.delete_feature.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteFeature", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeature", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "DeleteFeature", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeature", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_ImportFeatureValues_async", - "title": "DatasetService importFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Imports Feature values into the Featurestore from a source storage. The progress of the import is tracked by the returned operation. The imported features are guaranteed to be visible to subsequent read operations after the operation is marked as successfully done. If an import operation fails, the Feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same import request again and wait till the new operation returned is marked as successfully done. There are also scenarios where the caller can cause inconsistency. - Source data for import contains multiple distinct Feature values for the same entity ID and timestamp. - Source is modified during an import. This includes adding, updating, or removing source data and/or metadata. Examples of updating metadata include but are not limited to changing storage location, storage class, or retention policy. - Online serving cluster is under-provisioned.", - "canonical": true, - "file": "featurestore_service.import_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 106, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.ImportFeatureValues", - "async": true, - "parameters": [ - { - "name": "avro_source", - "type": ".google.cloud.aiplatform.v1beta1.AvroSource" - }, - { - "name": "bigquery_source", - "type": ".google.cloud.aiplatform.v1beta1.BigQuerySource" - }, - { - "name": "csv_source", - "type": ".google.cloud.aiplatform.v1beta1.CsvSource" - }, - { - "name": "feature_time_field", - "type": "TYPE_STRING" - }, - { - "name": "feature_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "entity_type", - "type": "TYPE_STRING" - }, - { - "name": "entity_id_field", - "type": "TYPE_STRING" - }, - { - "name": "feature_specs", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "disable_online_serving", - "type": "TYPE_BOOL" - }, - { - "name": "worker_count", - "type": "TYPE_INT32" - }, - { - "name": "disable_ingestion_analysis", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "ImportFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.ImportFeatureValues", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_BatchReadFeatureValues_async", - "title": "DatasetService batchReadFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Batch reads Feature values from a Featurestore. This API enables batch reading Feature values, where each read instance in the batch may read Feature values of entities from one or more EntityTypes. Point-in-time correctness is guaranteed for Feature values of each read instance as of each instance's read timestamp.", - "canonical": true, - "file": "featurestore_service.batch_read_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 103, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.BatchReadFeatureValues", - "async": true, - "parameters": [ - { - "name": "csv_read_instances", - "type": ".google.cloud.aiplatform.v1beta1.CsvSource" - }, - { - "name": "bigquery_read_instances", - "type": ".google.cloud.aiplatform.v1beta1.BigQuerySource" - }, - { - "name": "featurestore", - "type": "TYPE_STRING" - }, - { - "name": "destination", - "type": ".google.cloud.aiplatform.v1beta1.FeatureValueDestination" - }, - { - "name": "pass_through_fields", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "entity_type_specs", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "BatchReadFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.BatchReadFeatureValues", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_ExportFeatureValues_async", - "title": "DatasetService exportFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Exports Feature values from all the entities of a target EntityType.", - "canonical": true, - "file": "featurestore_service.export_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.ExportFeatureValues", - "async": true, - "parameters": [ - { - "name": "snapshot_export", - "type": ".google.cloud.aiplatform.v1beta1.ExportFeatureValuesRequest.SnapshotExport" - }, - { - "name": "full_export", - "type": ".google.cloud.aiplatform.v1beta1.ExportFeatureValuesRequest.FullExport" - }, - { - "name": "entity_type", - "type": "TYPE_STRING" - }, - { - "name": "destination", - "type": ".google.cloud.aiplatform.v1beta1.FeatureValueDestination" - }, - { - "name": "feature_selector", - "type": ".google.cloud.aiplatform.v1beta1.FeatureSelector" - }, - { - "name": "settings", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "ExportFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.ExportFeatureValues", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async", - "title": "DatasetService deleteFeatureValues Sample", - "origin": "API_DEFINITION", - "description": " Delete Feature values from Featurestore. The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done. If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done.", - "canonical": true, - "file": "featurestore_service.delete_feature_values.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues", - "async": true, - "parameters": [ - { - "name": "select_entity", - "type": ".google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity" - }, - { - "name": "select_time_range_and_feature", - "type": ".google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature" - }, - { - "name": "entity_type", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "DeleteFeatureValues", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_SearchFeatures_async", - "title": "DatasetService searchFeatures Sample", - "origin": "API_DEFINITION", - "description": " Searches Features matching a query in a given project.", - "canonical": true, - "file": "featurestore_service.search_features.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 124, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchFeatures", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.SearchFeatures", - "async": true, - "parameters": [ - { - "name": "location", - "type": "TYPE_STRING" - }, - { - "name": "query", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.SearchFeaturesResponse", - "client": { - "shortName": "FeaturestoreServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" - }, - "method": { - "shortName": "SearchFeatures", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.SearchFeatures", - "service": { - "shortName": "FeaturestoreService", - "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexEndpointService_CreateIndexEndpoint_async", - "title": "DatasetService createIndexEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Creates an IndexEndpoint.", - "canonical": true, - "file": "index_endpoint_service.create_index_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.CreateIndexEndpoint", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "index_endpoint", - "type": ".google.cloud.aiplatform.v1beta1.IndexEndpoint" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "CreateIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.CreateIndexEndpoint", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexEndpointService_GetIndexEndpoint_async", - "title": "DatasetService getIndexEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Gets an IndexEndpoint.", - "canonical": true, - "file": "index_endpoint_service.get_index_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.GetIndexEndpoint", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.IndexEndpoint", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "GetIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.GetIndexEndpoint", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexEndpointService_ListIndexEndpoints_async", - "title": "DatasetService listIndexEndpoints Sample", - "origin": "API_DEFINITION", - "description": " Lists IndexEndpoints in a Location.", - "canonical": true, - "file": "index_endpoint_service.list_index_endpoints.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListIndexEndpoints", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.ListIndexEndpoints", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListIndexEndpointsResponse", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "ListIndexEndpoints", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.ListIndexEndpoints", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexEndpointService_UpdateIndexEndpoint_async", - "title": "DatasetService updateIndexEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Updates an IndexEndpoint.", - "canonical": true, - "file": "index_endpoint_service.update_index_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.UpdateIndexEndpoint", - "async": true, - "parameters": [ - { - "name": "index_endpoint", - "type": ".google.cloud.aiplatform.v1beta1.IndexEndpoint" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.IndexEndpoint", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "UpdateIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.UpdateIndexEndpoint", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexEndpointService_DeleteIndexEndpoint_async", - "title": "DatasetService deleteIndexEndpoint Sample", - "origin": "API_DEFINITION", - "description": " Deletes an IndexEndpoint.", - "canonical": true, - "file": "index_endpoint_service.delete_index_endpoint.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.DeleteIndexEndpoint", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "DeleteIndexEndpoint", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.DeleteIndexEndpoint", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexEndpointService_DeployIndex_async", - "title": "DatasetService deployIndex Sample", - "origin": "API_DEFINITION", - "description": " Deploys an Index into this IndexEndpoint, creating a DeployedIndex within it. Only non-empty Indexes can be deployed.", - "canonical": true, - "file": "index_endpoint_service.deploy_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeployIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.DeployIndex", - "async": true, - "parameters": [ - { - "name": "index_endpoint", - "type": "TYPE_STRING" - }, - { - "name": "deployed_index", - "type": ".google.cloud.aiplatform.v1beta1.DeployedIndex" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "DeployIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.DeployIndex", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexEndpointService_UndeployIndex_async", - "title": "DatasetService undeployIndex Sample", - "origin": "API_DEFINITION", - "description": " Undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it, and freeing all resources it's using.", - "canonical": true, - "file": "index_endpoint_service.undeploy_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UndeployIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.UndeployIndex", - "async": true, - "parameters": [ - { - "name": "index_endpoint", - "type": "TYPE_STRING" - }, - { - "name": "deployed_index_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "UndeployIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.UndeployIndex", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexEndpointService_MutateDeployedIndex_async", - "title": "DatasetService mutateDeployedIndex Sample", - "origin": "API_DEFINITION", - "description": " Update an existing DeployedIndex under an IndexEndpoint.", - "canonical": true, - "file": "index_endpoint_service.mutate_deployed_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "MutateDeployedIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.MutateDeployedIndex", - "async": true, - "parameters": [ - { - "name": "index_endpoint", - "type": "TYPE_STRING" - }, - { - "name": "deployed_index", - "type": ".google.cloud.aiplatform.v1beta1.DeployedIndex" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexEndpointServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointServiceClient" - }, - "method": { - "shortName": "MutateDeployedIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService.MutateDeployedIndex", - "service": { - "shortName": "IndexEndpointService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexEndpointService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexService_CreateIndex_async", - "title": "DatasetService createIndex Sample", - "origin": "API_DEFINITION", - "description": " Creates an Index.", - "canonical": true, - "file": "index_service.create_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.CreateIndex", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "index", - "type": ".google.cloud.aiplatform.v1beta1.Index" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexServiceClient" - }, - "method": { - "shortName": "CreateIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.CreateIndex", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexService_GetIndex_async", - "title": "DatasetService getIndex Sample", - "origin": "API_DEFINITION", - "description": " Gets an Index.", - "canonical": true, - "file": "index_service.get_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.GetIndex", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Index", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexServiceClient" - }, - "method": { - "shortName": "GetIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.GetIndex", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexService_ListIndexes_async", - "title": "DatasetService listIndexes Sample", - "origin": "API_DEFINITION", - "description": " Lists Indexes in a Location.", - "canonical": true, - "file": "index_service.list_indexes.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListIndexes", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.ListIndexes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListIndexesResponse", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexServiceClient" - }, - "method": { - "shortName": "ListIndexes", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.ListIndexes", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexService_UpdateIndex_async", - "title": "DatasetService updateIndex Sample", - "origin": "API_DEFINITION", - "description": " Updates an Index.", - "canonical": true, - "file": "index_service.update_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.UpdateIndex", - "async": true, - "parameters": [ - { - "name": "index", - "type": ".google.cloud.aiplatform.v1beta1.Index" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexServiceClient" - }, - "method": { - "shortName": "UpdateIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.UpdateIndex", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexService_DeleteIndex_async", - "title": "DatasetService deleteIndex Sample", - "origin": "API_DEFINITION", - "description": " Deletes an Index. An Index can only be deleted when all its [DeployedIndexes][google.cloud.aiplatform.v1beta1.Index.deployed_indexes] had been undeployed.", - "canonical": true, - "file": "index_service.delete_index.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.DeleteIndex", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexServiceClient" - }, - "method": { - "shortName": "DeleteIndex", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.DeleteIndex", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexService_UpsertDatapoints_async", - "title": "DatasetService upsertDatapoints Sample", - "origin": "API_DEFINITION", - "description": " Add/update Datapoints into an Index.", - "canonical": true, - "file": "index_service.upsert_datapoints.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpsertDatapoints", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.UpsertDatapoints", - "async": true, - "parameters": [ - { - "name": "index", - "type": "TYPE_STRING" - }, - { - "name": "datapoints", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexServiceClient" - }, - "method": { - "shortName": "UpsertDatapoints", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.UpsertDatapoints", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_IndexService_RemoveDatapoints_async", - "title": "DatasetService removeDatapoints Sample", - "origin": "API_DEFINITION", - "description": " Remove Datapoints from an Index.", - "canonical": true, - "file": "index_service.remove_datapoints.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RemoveDatapoints", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.RemoveDatapoints", - "async": true, - "parameters": [ - { - "name": "index", - "type": "TYPE_STRING" - }, - { - "name": "datapoint_ids", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse", - "client": { - "shortName": "IndexServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.IndexServiceClient" - }, - "method": { - "shortName": "RemoveDatapoints", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService.RemoveDatapoints", - "service": { - "shortName": "IndexService", - "fullName": "google.cloud.aiplatform.v1beta1.IndexService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_CreateCustomJob_async", - "title": "DatasetService createCustomJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a CustomJob. A created CustomJob right away will be attempted to be run.", - "canonical": true, - "file": "job_service.create_custom_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCustomJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CreateCustomJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "custom_job", - "type": ".google.cloud.aiplatform.v1beta1.CustomJob" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.CustomJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "CreateCustomJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CreateCustomJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_GetCustomJob_async", - "title": "DatasetService getCustomJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a CustomJob.", - "canonical": true, - "file": "job_service.get_custom_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCustomJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.GetCustomJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.CustomJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "GetCustomJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.GetCustomJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_ListCustomJobs_async", - "title": "DatasetService listCustomJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists CustomJobs in a Location.", - "canonical": true, - "file": "job_service.list_custom_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCustomJobs", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ListCustomJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListCustomJobsResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "ListCustomJobs", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ListCustomJobs", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_DeleteCustomJob_async", - "title": "DatasetService deleteCustomJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a CustomJob.", - "canonical": true, - "file": "job_service.delete_custom_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCustomJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.DeleteCustomJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "DeleteCustomJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.DeleteCustomJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_CancelCustomJob_async", - "title": "DatasetService cancelCustomJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1beta1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1beta1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1beta1.CustomJob.state] is set to `CANCELLED`.", - "canonical": true, - "file": "job_service.cancel_custom_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelCustomJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CancelCustomJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "CancelCustomJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CancelCustomJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_CreateDataLabelingJob_async", - "title": "DatasetService createDataLabelingJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a DataLabelingJob.", - "canonical": true, - "file": "job_service.create_data_labeling_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CreateDataLabelingJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "data_labeling_job", - "type": ".google.cloud.aiplatform.v1beta1.DataLabelingJob" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.DataLabelingJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "CreateDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CreateDataLabelingJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_GetDataLabelingJob_async", - "title": "DatasetService getDataLabelingJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a DataLabelingJob.", - "canonical": true, - "file": "job_service.get_data_labeling_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.GetDataLabelingJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.DataLabelingJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "GetDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.GetDataLabelingJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_ListDataLabelingJobs_async", - "title": "DatasetService listDataLabelingJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists DataLabelingJobs in a Location.", - "canonical": true, - "file": "job_service.list_data_labeling_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 96, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataLabelingJobs", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ListDataLabelingJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListDataLabelingJobsResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "ListDataLabelingJobs", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ListDataLabelingJobs", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_DeleteDataLabelingJob_async", - "title": "DatasetService deleteDataLabelingJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a DataLabelingJob.", - "canonical": true, - "file": "job_service.delete_data_labeling_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.DeleteDataLabelingJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "DeleteDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.DeleteDataLabelingJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_CancelDataLabelingJob_async", - "title": "DatasetService cancelDataLabelingJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a DataLabelingJob. Success of cancellation is not guaranteed.", - "canonical": true, - "file": "job_service.cancel_data_labeling_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CancelDataLabelingJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "CancelDataLabelingJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CancelDataLabelingJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_CreateHyperparameterTuningJob_async", - "title": "DatasetService createHyperparameterTuningJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a HyperparameterTuningJob", - "canonical": true, - "file": "job_service.create_hyperparameter_tuning_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CreateHyperparameterTuningJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "hyperparameter_tuning_job", - "type": ".google.cloud.aiplatform.v1beta1.HyperparameterTuningJob" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.HyperparameterTuningJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "CreateHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CreateHyperparameterTuningJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_GetHyperparameterTuningJob_async", - "title": "DatasetService getHyperparameterTuningJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a HyperparameterTuningJob", - "canonical": true, - "file": "job_service.get_hyperparameter_tuning_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.GetHyperparameterTuningJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.HyperparameterTuningJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "GetHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.GetHyperparameterTuningJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_ListHyperparameterTuningJobs_async", - "title": "DatasetService listHyperparameterTuningJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists HyperparameterTuningJobs in a Location.", - "canonical": true, - "file": "job_service.list_hyperparameter_tuning_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListHyperparameterTuningJobs", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ListHyperparameterTuningJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListHyperparameterTuningJobsResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "ListHyperparameterTuningJobs", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ListHyperparameterTuningJobs", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_DeleteHyperparameterTuningJob_async", - "title": "DatasetService deleteHyperparameterTuningJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a HyperparameterTuningJob.", - "canonical": true, - "file": "job_service.delete_hyperparameter_tuning_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.DeleteHyperparameterTuningJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "DeleteHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.DeleteHyperparameterTuningJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_CancelHyperparameterTuningJob_async", - "title": "DatasetService cancelHyperparameterTuningJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1beta1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.state] is set to `CANCELLED`.", - "canonical": true, - "file": "job_service.cancel_hyperparameter_tuning_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CancelHyperparameterTuningJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "CancelHyperparameterTuningJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CancelHyperparameterTuningJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_CreateBatchPredictionJob_async", - "title": "DatasetService createBatchPredictionJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.", - "canonical": true, - "file": "job_service.create_batch_prediction_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CreateBatchPredictionJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "batch_prediction_job", - "type": ".google.cloud.aiplatform.v1beta1.BatchPredictionJob" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.BatchPredictionJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "CreateBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CreateBatchPredictionJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_GetBatchPredictionJob_async", - "title": "DatasetService getBatchPredictionJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a BatchPredictionJob", - "canonical": true, - "file": "job_service.get_batch_prediction_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.GetBatchPredictionJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.BatchPredictionJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "GetBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.GetBatchPredictionJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_ListBatchPredictionJobs_async", - "title": "DatasetService listBatchPredictionJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists BatchPredictionJobs in a Location.", - "canonical": true, - "file": "job_service.list_batch_prediction_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 91, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBatchPredictionJobs", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ListBatchPredictionJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListBatchPredictionJobsResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "ListBatchPredictionJobs", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ListBatchPredictionJobs", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_DeleteBatchPredictionJob_async", - "title": "DatasetService deleteBatchPredictionJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a BatchPredictionJob. Can only be called on jobs that already finished.", - "canonical": true, - "file": "job_service.delete_batch_prediction_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.DeleteBatchPredictionJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "DeleteBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.DeleteBatchPredictionJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_CancelBatchPredictionJob_async", - "title": "DatasetService cancelBatchPredictionJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a BatchPredictionJob. Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1beta1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1beta1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already outputted by the job are not deleted.", - "canonical": true, - "file": "job_service.cancel_batch_prediction_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CancelBatchPredictionJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "CancelBatchPredictionJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CancelBatchPredictionJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_CreateModelDeploymentMonitoringJob_async", - "title": "DatasetService createModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.", - "canonical": true, - "file": "job_service.create_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CreateModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "model_deployment_monitoring_job", - "type": ".google.cloud.aiplatform.v1beta1.ModelDeploymentMonitoringJob" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ModelDeploymentMonitoringJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "CreateModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.CreateModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_SearchModelDeploymentMonitoringStatsAnomalies_async", - "title": "DatasetService searchModelDeploymentMonitoringStatsAnomalies Sample", - "origin": "API_DEFINITION", - "description": " Searches Model Monitoring Statistics generated within a given time window.", - "canonical": true, - "file": "job_service.search_model_deployment_monitoring_stats_anomalies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 95, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchModelDeploymentMonitoringStatsAnomalies", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.SearchModelDeploymentMonitoringStatsAnomalies", - "async": true, - "parameters": [ - { - "name": "model_deployment_monitoring_job", - "type": "TYPE_STRING" - }, - { - "name": "deployed_model_id", - "type": "TYPE_STRING" - }, - { - "name": "feature_display_name", - "type": "TYPE_STRING" - }, - { - "name": "objectives", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "end_time", - "type": ".google.protobuf.Timestamp" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.SearchModelDeploymentMonitoringStatsAnomaliesResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "SearchModelDeploymentMonitoringStatsAnomalies", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.SearchModelDeploymentMonitoringStatsAnomalies", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_GetModelDeploymentMonitoringJob_async", - "title": "DatasetService getModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a ModelDeploymentMonitoringJob.", - "canonical": true, - "file": "job_service.get_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.GetModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ModelDeploymentMonitoringJob", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "GetModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.GetModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_ListModelDeploymentMonitoringJobs_async", - "title": "DatasetService listModelDeploymentMonitoringJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists ModelDeploymentMonitoringJobs in a Location.", - "canonical": true, - "file": "job_service.list_model_deployment_monitoring_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListModelDeploymentMonitoringJobs", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ListModelDeploymentMonitoringJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListModelDeploymentMonitoringJobsResponse", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "ListModelDeploymentMonitoringJobs", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ListModelDeploymentMonitoringJobs", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_UpdateModelDeploymentMonitoringJob_async", - "title": "DatasetService updateModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Updates a ModelDeploymentMonitoringJob.", - "canonical": true, - "file": "job_service.update_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.UpdateModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "model_deployment_monitoring_job", - "type": ".google.cloud.aiplatform.v1beta1.ModelDeploymentMonitoringJob" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "UpdateModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.UpdateModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_DeleteModelDeploymentMonitoringJob_async", - "title": "DatasetService deleteModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a ModelDeploymentMonitoringJob.", - "canonical": true, - "file": "job_service.delete_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.DeleteModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "DeleteModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.DeleteModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_PauseModelDeploymentMonitoringJob_async", - "title": "DatasetService pauseModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1beta1.ModelDeploymentMonitoringJob.state] to 'PAUSED'.", - "canonical": true, - "file": "job_service.pause_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PauseModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.PauseModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "PauseModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.PauseModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_JobService_ResumeModelDeploymentMonitoringJob_async", - "title": "DatasetService resumeModelDeploymentMonitoringJob Sample", - "origin": "API_DEFINITION", - "description": " Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.", - "canonical": true, - "file": "job_service.resume_model_deployment_monitoring_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ResumeModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ResumeModelDeploymentMonitoringJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "JobServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.JobServiceClient" - }, - "method": { - "shortName": "ResumeModelDeploymentMonitoringJob", - "fullName": "google.cloud.aiplatform.v1beta1.JobService.ResumeModelDeploymentMonitoringJob", - "service": { - "shortName": "JobService", - "fullName": "google.cloud.aiplatform.v1beta1.JobService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_CreateMetadataStore_async", - "title": "DatasetService createMetadataStore Sample", - "origin": "API_DEFINITION", - "description": " Initializes a MetadataStore, including allocation of resources.", - "canonical": true, - "file": "metadata_service.create_metadata_store.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateMetadataStore", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.CreateMetadataStore", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "metadata_store", - "type": ".google.cloud.aiplatform.v1beta1.MetadataStore" - }, - { - "name": "metadata_store_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateMetadataStore", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.CreateMetadataStore", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_GetMetadataStore_async", - "title": "DatasetService getMetadataStore Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a specific MetadataStore.", - "canonical": true, - "file": "metadata_service.get_metadata_store.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMetadataStore", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.GetMetadataStore", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.MetadataStore", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "GetMetadataStore", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.GetMetadataStore", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_ListMetadataStores_async", - "title": "DatasetService listMetadataStores Sample", - "origin": "API_DEFINITION", - "description": " Lists MetadataStores for a Location.", - "canonical": true, - "file": "metadata_service.list_metadata_stores.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMetadataStores", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataStores", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListMetadataStoresResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "ListMetadataStores", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataStores", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_DeleteMetadataStore_async", - "title": "DatasetService deleteMetadataStore Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and Contexts).", - "canonical": true, - "file": "metadata_service.delete_metadata_store.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteMetadataStore", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.DeleteMetadataStore", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "DeleteMetadataStore", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.DeleteMetadataStore", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_CreateArtifact_async", - "title": "DatasetService createArtifact Sample", - "origin": "API_DEFINITION", - "description": " Creates an Artifact associated with a MetadataStore.", - "canonical": true, - "file": "metadata_service.create_artifact.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateArtifact", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.CreateArtifact", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "artifact", - "type": ".google.cloud.aiplatform.v1beta1.Artifact" - }, - { - "name": "artifact_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Artifact", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateArtifact", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.CreateArtifact", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_GetArtifact_async", - "title": "DatasetService getArtifact Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a specific Artifact.", - "canonical": true, - "file": "metadata_service.get_artifact.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetArtifact", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.GetArtifact", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Artifact", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "GetArtifact", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.GetArtifact", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_ListArtifacts_async", - "title": "DatasetService listArtifacts Sample", - "origin": "API_DEFINITION", - "description": " Lists Artifacts in the MetadataStore.", - "canonical": true, - "file": "metadata_service.list_artifacts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 106, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListArtifacts", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.ListArtifacts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListArtifactsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "ListArtifacts", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.ListArtifacts", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_UpdateArtifact_async", - "title": "DatasetService updateArtifact Sample", - "origin": "API_DEFINITION", - "description": " Updates a stored Artifact.", - "canonical": true, - "file": "metadata_service.update_artifact.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateArtifact", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.UpdateArtifact", - "async": true, - "parameters": [ - { - "name": "artifact", - "type": ".google.cloud.aiplatform.v1beta1.Artifact" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Artifact", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "UpdateArtifact", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.UpdateArtifact", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_DeleteArtifact_async", - "title": "DatasetService deleteArtifact Sample", - "origin": "API_DEFINITION", - "description": " Deletes an Artifact.", - "canonical": true, - "file": "metadata_service.delete_artifact.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteArtifact", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.DeleteArtifact", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "DeleteArtifact", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.DeleteArtifact", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_PurgeArtifacts_async", - "title": "DatasetService purgeArtifacts Sample", - "origin": "API_DEFINITION", - "description": " Purges Artifacts.", - "canonical": true, - "file": "metadata_service.purge_artifacts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PurgeArtifacts", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.PurgeArtifacts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "PurgeArtifacts", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.PurgeArtifacts", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_CreateContext_async", - "title": "DatasetService createContext Sample", - "origin": "API_DEFINITION", - "description": " Creates a Context associated with a MetadataStore.", - "canonical": true, - "file": "metadata_service.create_context.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateContext", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.CreateContext", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "context", - "type": ".google.cloud.aiplatform.v1beta1.Context" - }, - { - "name": "context_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Context", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateContext", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.CreateContext", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_GetContext_async", - "title": "DatasetService getContext Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a specific Context.", - "canonical": true, - "file": "metadata_service.get_context.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetContext", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.GetContext", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Context", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "GetContext", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.GetContext", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_ListContexts_async", - "title": "DatasetService listContexts Sample", - "origin": "API_DEFINITION", - "description": " Lists Contexts on the MetadataStore.", - "canonical": true, - "file": "metadata_service.list_contexts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 109, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListContexts", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.ListContexts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListContextsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "ListContexts", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.ListContexts", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_UpdateContext_async", - "title": "DatasetService updateContext Sample", - "origin": "API_DEFINITION", - "description": " Updates a stored Context.", - "canonical": true, - "file": "metadata_service.update_context.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateContext", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.UpdateContext", - "async": true, - "parameters": [ - { - "name": "context", - "type": ".google.cloud.aiplatform.v1beta1.Context" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Context", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "UpdateContext", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.UpdateContext", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_DeleteContext_async", - "title": "DatasetService deleteContext Sample", - "origin": "API_DEFINITION", - "description": " Deletes a stored Context.", - "canonical": true, - "file": "metadata_service.delete_context.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteContext", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.DeleteContext", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "DeleteContext", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.DeleteContext", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_PurgeContexts_async", - "title": "DatasetService purgeContexts Sample", - "origin": "API_DEFINITION", - "description": " Purges Contexts.", - "canonical": true, - "file": "metadata_service.purge_contexts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PurgeContexts", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.PurgeContexts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "PurgeContexts", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.PurgeContexts", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_AddContextArtifactsAndExecutions_async", - "title": "DatasetService addContextArtifactsAndExecutions Sample", - "origin": "API_DEFINITION", - "description": " Adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have already been added to a Context, they are simply skipped.", - "canonical": true, - "file": "metadata_service.add_context_artifacts_and_executions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AddContextArtifactsAndExecutions", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.AddContextArtifactsAndExecutions", - "async": true, - "parameters": [ - { - "name": "context", - "type": "TYPE_STRING" - }, - { - "name": "artifacts", - "type": "TYPE_STRING[]" - }, - { - "name": "executions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.AddContextArtifactsAndExecutionsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "AddContextArtifactsAndExecutions", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.AddContextArtifactsAndExecutions", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_AddContextChildren_async", - "title": "DatasetService addContextChildren Sample", - "origin": "API_DEFINITION", - "description": " Adds a set of Contexts as children to a parent Context. If any of the child Contexts have already been added to the parent Context, they are simply skipped. If this call would create a cycle or cause any Context to have more than 10 parents, the request will fail with an INVALID_ARGUMENT error.", - "canonical": true, - "file": "metadata_service.add_context_children.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AddContextChildren", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.AddContextChildren", - "async": true, - "parameters": [ - { - "name": "context", - "type": "TYPE_STRING" - }, - { - "name": "child_contexts", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.AddContextChildrenResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "AddContextChildren", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.AddContextChildren", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_RemoveContextChildren_async", - "title": "DatasetService removeContextChildren Sample", - "origin": "API_DEFINITION", - "description": " Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT added to the parent Context, they are simply skipped.", - "canonical": true, - "file": "metadata_service.remove_context_children.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RemoveContextChildren", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.RemoveContextChildren", - "async": true, - "parameters": [ - { - "name": "context", - "type": "TYPE_STRING" - }, - { - "name": "child_contexts", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.RemoveContextChildrenResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "RemoveContextChildren", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.RemoveContextChildren", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_QueryContextLineageSubgraph_async", - "title": "DatasetService queryContextLineageSubgraph Sample", - "origin": "API_DEFINITION", - "description": " Retrieves Artifacts and Executions within the specified Context, connected by Event edges and returned as a LineageSubgraph.", - "canonical": true, - "file": "metadata_service.query_context_lineage_subgraph.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "QueryContextLineageSubgraph", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.QueryContextLineageSubgraph", - "async": true, - "parameters": [ - { - "name": "context", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.LineageSubgraph", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "QueryContextLineageSubgraph", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.QueryContextLineageSubgraph", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_CreateExecution_async", - "title": "DatasetService createExecution Sample", - "origin": "API_DEFINITION", - "description": " Creates an Execution associated with a MetadataStore.", - "canonical": true, - "file": "metadata_service.create_execution.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateExecution", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.CreateExecution", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "execution", - "type": ".google.cloud.aiplatform.v1beta1.Execution" - }, - { - "name": "execution_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Execution", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateExecution", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.CreateExecution", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_GetExecution_async", - "title": "DatasetService getExecution Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a specific Execution.", - "canonical": true, - "file": "metadata_service.get_execution.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetExecution", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.GetExecution", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Execution", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "GetExecution", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.GetExecution", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_ListExecutions_async", - "title": "DatasetService listExecutions Sample", - "origin": "API_DEFINITION", - "description": " Lists Executions in the MetadataStore.", - "canonical": true, - "file": "metadata_service.list_executions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 106, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListExecutions", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.ListExecutions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListExecutionsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "ListExecutions", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.ListExecutions", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_UpdateExecution_async", - "title": "DatasetService updateExecution Sample", - "origin": "API_DEFINITION", - "description": " Updates a stored Execution.", - "canonical": true, - "file": "metadata_service.update_execution.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateExecution", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.UpdateExecution", - "async": true, - "parameters": [ - { - "name": "execution", - "type": ".google.cloud.aiplatform.v1beta1.Execution" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Execution", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "UpdateExecution", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.UpdateExecution", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_DeleteExecution_async", - "title": "DatasetService deleteExecution Sample", - "origin": "API_DEFINITION", - "description": " Deletes an Execution.", - "canonical": true, - "file": "metadata_service.delete_execution.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteExecution", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.DeleteExecution", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "DeleteExecution", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.DeleteExecution", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_PurgeExecutions_async", - "title": "DatasetService purgeExecutions Sample", - "origin": "API_DEFINITION", - "description": " Purges Executions.", - "canonical": true, - "file": "metadata_service.purge_executions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PurgeExecutions", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.PurgeExecutions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "PurgeExecutions", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.PurgeExecutions", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_AddExecutionEvents_async", - "title": "DatasetService addExecutionEvents Sample", - "origin": "API_DEFINITION", - "description": " Adds Events to the specified Execution. An Event indicates whether an Artifact was used as an input or output for an Execution. If an Event already exists between the Execution and the Artifact, the Event is skipped.", - "canonical": true, - "file": "metadata_service.add_execution_events.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AddExecutionEvents", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.AddExecutionEvents", - "async": true, - "parameters": [ - { - "name": "execution", - "type": "TYPE_STRING" - }, - { - "name": "events", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.AddExecutionEventsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "AddExecutionEvents", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.AddExecutionEvents", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_QueryExecutionInputsAndOutputs_async", - "title": "DatasetService queryExecutionInputsAndOutputs Sample", - "origin": "API_DEFINITION", - "description": " Obtains the set of input and output Artifacts for this Execution, in the form of LineageSubgraph that also contains the Execution and connecting Events.", - "canonical": true, - "file": "metadata_service.query_execution_inputs_and_outputs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "QueryExecutionInputsAndOutputs", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.QueryExecutionInputsAndOutputs", - "async": true, - "parameters": [ - { - "name": "execution", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.LineageSubgraph", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "QueryExecutionInputsAndOutputs", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.QueryExecutionInputsAndOutputs", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_CreateMetadataSchema_async", - "title": "DatasetService createMetadataSchema Sample", - "origin": "API_DEFINITION", - "description": " Creates a MetadataSchema.", - "canonical": true, - "file": "metadata_service.create_metadata_schema.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateMetadataSchema", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.CreateMetadataSchema", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "metadata_schema", - "type": ".google.cloud.aiplatform.v1beta1.MetadataSchema" - }, - { - "name": "metadata_schema_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.MetadataSchema", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateMetadataSchema", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.CreateMetadataSchema", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_GetMetadataSchema_async", - "title": "DatasetService getMetadataSchema Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a specific MetadataSchema.", - "canonical": true, - "file": "metadata_service.get_metadata_schema.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMetadataSchema", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.GetMetadataSchema", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.MetadataSchema", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "GetMetadataSchema", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.GetMetadataSchema", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_ListMetadataSchemas_async", - "title": "DatasetService listMetadataSchemas Sample", - "origin": "API_DEFINITION", - "description": " Lists MetadataSchemas.", - "canonical": true, - "file": "metadata_service.list_metadata_schemas.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMetadataSchemas", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataSchemas", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListMetadataSchemasResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "ListMetadataSchemas", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.ListMetadataSchemas", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MetadataService_QueryArtifactLineageSubgraph_async", - "title": "DatasetService queryArtifactLineageSubgraph Sample", - "origin": "API_DEFINITION", - "description": " Retrieves lineage of an Artifact represented through Artifacts and Executions connected by Event edges and returned as a LineageSubgraph.", - "canonical": true, - "file": "metadata_service.query_artifact_lineage_subgraph.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 88, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "QueryArtifactLineageSubgraph", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.QueryArtifactLineageSubgraph", - "async": true, - "parameters": [ - { - "name": "artifact", - "type": "TYPE_STRING" - }, - { - "name": "max_hops", - "type": "TYPE_INT32" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.LineageSubgraph", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataServiceClient" - }, - "method": { - "shortName": "QueryArtifactLineageSubgraph", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService.QueryArtifactLineageSubgraph", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.aiplatform.v1beta1.MetadataService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MigrationService_SearchMigratableResources_async", - "title": "DatasetService searchMigratableResources Sample", - "origin": "API_DEFINITION", - "description": " Searches all of the resources in automl.googleapis.com, datalabeling.googleapis.com and ml.googleapis.com that can be migrated to Vertex AI's given location.", - "canonical": true, - "file": "migration_service.search_migratable_resources.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchMigratableResources", - "fullName": "google.cloud.aiplatform.v1beta1.MigrationService.SearchMigratableResources", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.SearchMigratableResourcesResponse", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MigrationServiceClient" - }, - "method": { - "shortName": "SearchMigratableResources", - "fullName": "google.cloud.aiplatform.v1beta1.MigrationService.SearchMigratableResources", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.aiplatform.v1beta1.MigrationService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_MigrationService_BatchMigrateResources_async", - "title": "DatasetService batchMigrateResources Sample", - "origin": "API_DEFINITION", - "description": " Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and datalabeling.googleapis.com to Vertex AI.", - "canonical": true, - "file": "migration_service.batch_migrate_resources.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchMigrateResources", - "fullName": "google.cloud.aiplatform.v1beta1.MigrationService.BatchMigrateResources", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "migrate_resource_requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.MigrationServiceClient" - }, - "method": { - "shortName": "BatchMigrateResources", - "fullName": "google.cloud.aiplatform.v1beta1.MigrationService.BatchMigrateResources", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.aiplatform.v1beta1.MigrationService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_UploadModel_async", - "title": "DatasetService uploadModel Sample", - "origin": "API_DEFINITION", - "description": " Uploads a Model artifact into Vertex AI.", - "canonical": true, - "file": "model_service.upload_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UploadModel", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.UploadModel", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "parent_model", - "type": "TYPE_STRING" - }, - { - "name": "model_id", - "type": "TYPE_STRING" - }, - { - "name": "model", - "type": ".google.cloud.aiplatform.v1beta1.Model" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "UploadModel", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.UploadModel", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_GetModel_async", - "title": "DatasetService getModel Sample", - "origin": "API_DEFINITION", - "description": " Gets a Model.", - "canonical": true, - "file": "model_service.get_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetModel", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.GetModel", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Model", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "GetModel", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.GetModel", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_ListModels_async", - "title": "DatasetService listModels Sample", - "origin": "API_DEFINITION", - "description": " Lists Models in a Location.", - "canonical": true, - "file": "model_service.list_models.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListModels", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ListModels", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListModelsResponse", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "ListModels", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ListModels", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_ListModelVersions_async", - "title": "DatasetService listModelVersions Sample", - "origin": "API_DEFINITION", - "description": " Lists versions of the specified model.", - "canonical": true, - "file": "model_service.list_model_versions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListModelVersions", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ListModelVersions", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListModelVersionsResponse", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "ListModelVersions", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ListModelVersions", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_UpdateModel_async", - "title": "DatasetService updateModel Sample", - "origin": "API_DEFINITION", - "description": " Updates a Model.", - "canonical": true, - "file": "model_service.update_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateModel", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.UpdateModel", - "async": true, - "parameters": [ - { - "name": "model", - "type": ".google.cloud.aiplatform.v1beta1.Model" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Model", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "UpdateModel", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.UpdateModel", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_UpdateExplanationDataset_async", - "title": "DatasetService updateExplanationDataset Sample", - "origin": "API_DEFINITION", - "description": " Incrementally update the dataset used for an examples model.", - "canonical": true, - "file": "model_service.update_explanation_dataset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateExplanationDataset", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.UpdateExplanationDataset", - "async": true, - "parameters": [ - { - "name": "model", - "type": "TYPE_STRING" - }, - { - "name": "examples", - "type": ".google.cloud.aiplatform.v1beta1.Examples" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "UpdateExplanationDataset", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.UpdateExplanationDataset", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_DeleteModel_async", - "title": "DatasetService deleteModel Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Model. A model cannot be deleted if any [Endpoint][google.cloud.aiplatform.v1beta1.Endpoint] resource has a [DeployedModel][google.cloud.aiplatform.v1beta1.DeployedModel] based on the model in its [deployed_models][google.cloud.aiplatform.v1beta1.Endpoint.deployed_models] field.", - "canonical": true, - "file": "model_service.delete_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteModel", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.DeleteModel", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "DeleteModel", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.DeleteModel", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_DeleteModelVersion_async", - "title": "DatasetService deleteModelVersion Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Model version. Model version can only be deleted if there are no [DeployedModels][] created from it. Deleting the only version in the Model is not allowed. Use [DeleteModel][google.cloud.aiplatform.v1beta1.ModelService.DeleteModel] for deleting the Model instead.", - "canonical": true, - "file": "model_service.delete_model_version.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteModelVersion", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.DeleteModelVersion", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "DeleteModelVersion", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.DeleteModelVersion", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_MergeVersionAliases_async", - "title": "DatasetService mergeVersionAliases Sample", - "origin": "API_DEFINITION", - "description": " Merges a set of aliases for a Model version.", - "canonical": true, - "file": "model_service.merge_version_aliases.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "MergeVersionAliases", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.MergeVersionAliases", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "version_aliases", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Model", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "MergeVersionAliases", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.MergeVersionAliases", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_ExportModel_async", - "title": "DatasetService exportModel Sample", - "origin": "API_DEFINITION", - "description": " Exports a trained, exportable Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats].", - "canonical": true, - "file": "model_service.export_model.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportModel", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ExportModel", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "output_config", - "type": ".google.cloud.aiplatform.v1beta1.ExportModelRequest.OutputConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "ExportModel", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ExportModel", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_ImportModelEvaluation_async", - "title": "DatasetService importModelEvaluation Sample", - "origin": "API_DEFINITION", - "description": " Imports an externally generated ModelEvaluation.", - "canonical": true, - "file": "model_service.import_model_evaluation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportModelEvaluation", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ImportModelEvaluation", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "model_evaluation", - "type": ".google.cloud.aiplatform.v1beta1.ModelEvaluation" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ModelEvaluation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "ImportModelEvaluation", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ImportModelEvaluation", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_BatchImportModelEvaluationSlices_async", - "title": "DatasetService batchImportModelEvaluationSlices Sample", - "origin": "API_DEFINITION", - "description": " Imports a list of externally generated ModelEvaluationSlice.", - "canonical": true, - "file": "model_service.batch_import_model_evaluation_slices.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchImportModelEvaluationSlices", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.BatchImportModelEvaluationSlices", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "model_evaluation_slices", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "BatchImportModelEvaluationSlices", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.BatchImportModelEvaluationSlices", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_GetModelEvaluation_async", - "title": "DatasetService getModelEvaluation Sample", - "origin": "API_DEFINITION", - "description": " Gets a ModelEvaluation.", - "canonical": true, - "file": "model_service.get_model_evaluation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetModelEvaluation", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.GetModelEvaluation", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ModelEvaluation", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "GetModelEvaluation", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.GetModelEvaluation", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_ListModelEvaluations_async", - "title": "DatasetService listModelEvaluations Sample", - "origin": "API_DEFINITION", - "description": " Lists ModelEvaluations in a Model.", - "canonical": true, - "file": "model_service.list_model_evaluations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListModelEvaluations", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluations", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListModelEvaluationsResponse", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "ListModelEvaluations", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluations", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_GetModelEvaluationSlice_async", - "title": "DatasetService getModelEvaluationSlice Sample", - "origin": "API_DEFINITION", - "description": " Gets a ModelEvaluationSlice.", - "canonical": true, - "file": "model_service.get_model_evaluation_slice.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetModelEvaluationSlice", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.GetModelEvaluationSlice", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ModelEvaluationSlice", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "GetModelEvaluationSlice", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.GetModelEvaluationSlice", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_ModelService_ListModelEvaluationSlices_async", - "title": "DatasetService listModelEvaluationSlices Sample", - "origin": "API_DEFINITION", - "description": " Lists ModelEvaluationSlices in a ModelEvaluation.", - "canonical": true, - "file": "model_service.list_model_evaluation_slices.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListModelEvaluationSlices", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluationSlices", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListModelEvaluationSlicesResponse", - "client": { - "shortName": "ModelServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" - }, - "method": { - "shortName": "ListModelEvaluationSlices", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluationSlices", - "service": { - "shortName": "ModelService", - "fullName": "google.cloud.aiplatform.v1beta1.ModelService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PipelineService_CreateTrainingPipeline_async", - "title": "DatasetService createTrainingPipeline Sample", - "origin": "API_DEFINITION", - "description": " Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run.", - "canonical": true, - "file": "pipeline_service.create_training_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.CreateTrainingPipeline", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "training_pipeline", - "type": ".google.cloud.aiplatform.v1beta1.TrainingPipeline" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TrainingPipeline", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineServiceClient" - }, - "method": { - "shortName": "CreateTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.CreateTrainingPipeline", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PipelineService_GetTrainingPipeline_async", - "title": "DatasetService getTrainingPipeline Sample", - "origin": "API_DEFINITION", - "description": " Gets a TrainingPipeline.", - "canonical": true, - "file": "pipeline_service.get_training_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.GetTrainingPipeline", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TrainingPipeline", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineServiceClient" - }, - "method": { - "shortName": "GetTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.GetTrainingPipeline", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PipelineService_ListTrainingPipelines_async", - "title": "DatasetService listTrainingPipelines Sample", - "origin": "API_DEFINITION", - "description": " Lists TrainingPipelines in a Location.", - "canonical": true, - "file": "pipeline_service.list_training_pipelines.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTrainingPipelines", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListTrainingPipelinesResponse", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineServiceClient" - }, - "method": { - "shortName": "ListTrainingPipelines", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PipelineService_DeleteTrainingPipeline_async", - "title": "DatasetService deleteTrainingPipeline Sample", - "origin": "API_DEFINITION", - "description": " Deletes a TrainingPipeline.", - "canonical": true, - "file": "pipeline_service.delete_training_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.DeleteTrainingPipeline", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineServiceClient" - }, - "method": { - "shortName": "DeleteTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.DeleteTrainingPipeline", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PipelineService_CancelTrainingPipeline_async", - "title": "DatasetService cancelTrainingPipeline Sample", - "origin": "API_DEFINITION", - "description": " Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.GetTrainingPipeline] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead it becomes a pipeline with a [TrainingPipeline.error][google.cloud.aiplatform.v1beta1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1beta1.TrainingPipeline.state] is set to `CANCELLED`.", - "canonical": true, - "file": "pipeline_service.cancel_training_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.CancelTrainingPipeline", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineServiceClient" - }, - "method": { - "shortName": "CancelTrainingPipeline", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.CancelTrainingPipeline", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PipelineService_CreatePipelineJob_async", - "title": "DatasetService createPipelineJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a PipelineJob. A PipelineJob will run immediately when created.", - "canonical": true, - "file": "pipeline_service.create_pipeline_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePipelineJob", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.CreatePipelineJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "pipeline_job", - "type": ".google.cloud.aiplatform.v1beta1.PipelineJob" - }, - { - "name": "pipeline_job_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.PipelineJob", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineServiceClient" - }, - "method": { - "shortName": "CreatePipelineJob", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.CreatePipelineJob", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PipelineService_GetPipelineJob_async", - "title": "DatasetService getPipelineJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a PipelineJob.", - "canonical": true, - "file": "pipeline_service.get_pipeline_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPipelineJob", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.GetPipelineJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.PipelineJob", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineServiceClient" - }, - "method": { - "shortName": "GetPipelineJob", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.GetPipelineJob", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PipelineService_ListPipelineJobs_async", - "title": "DatasetService listPipelineJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists PipelineJobs in a Location.", - "canonical": true, - "file": "pipeline_service.list_pipeline_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 118, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPipelineJobs", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.ListPipelineJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListPipelineJobsResponse", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineServiceClient" - }, - "method": { - "shortName": "ListPipelineJobs", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.ListPipelineJobs", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PipelineService_DeletePipelineJob_async", - "title": "DatasetService deletePipelineJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a PipelineJob.", - "canonical": true, - "file": "pipeline_service.delete_pipeline_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePipelineJob", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.DeletePipelineJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineServiceClient" - }, - "method": { - "shortName": "DeletePipelineJob", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.DeletePipelineJob", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PipelineService_CancelPipelineJob_async", - "title": "DatasetService cancelPipelineJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a PipelineJob. Starts asynchronous cancellation on the PipelineJob. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.GetPipelineJob] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the PipelineJob is not deleted; instead it becomes a pipeline with a [PipelineJob.error][google.cloud.aiplatform.v1beta1.PipelineJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [PipelineJob.state][google.cloud.aiplatform.v1beta1.PipelineJob.state] is set to `CANCELLED`.", - "canonical": true, - "file": "pipeline_service.cancel_pipeline_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelPipelineJob", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.CancelPipelineJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "PipelineServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineServiceClient" - }, - "method": { - "shortName": "CancelPipelineJob", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService.CancelPipelineJob", - "service": { - "shortName": "PipelineService", - "fullName": "google.cloud.aiplatform.v1beta1.PipelineService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PredictionService_Predict_async", - "title": "DatasetService predict Sample", - "origin": "API_DEFINITION", - "description": " Perform an online prediction.", - "canonical": true, - "file": "prediction_service.predict.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "Predict", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.Predict", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": "TYPE_STRING" - }, - { - "name": "instances", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "parameters", - "type": ".google.protobuf.Value" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.PredictResponse", - "client": { - "shortName": "PredictionServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionServiceClient" - }, - "method": { - "shortName": "Predict", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.Predict", - "service": { - "shortName": "PredictionService", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PredictionService_RawPredict_async", - "title": "DatasetService rawPredict Sample", - "origin": "API_DEFINITION", - "description": " Perform an online prediction with an arbitrary HTTP payload. The response includes the following HTTP headers: * `X-Vertex-AI-Endpoint-Id`: ID of the [Endpoint][google.cloud.aiplatform.v1beta1.Endpoint] that served this prediction. * `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's [DeployedModel][google.cloud.aiplatform.v1beta1.DeployedModel] that served this prediction.", - "canonical": true, - "file": "prediction_service.raw_predict.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RawPredict", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.RawPredict", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": "TYPE_STRING" - }, - { - "name": "http_body", - "type": ".google.api.HttpBody" - } - ], - "resultType": ".google.api.HttpBody", - "client": { - "shortName": "PredictionServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionServiceClient" - }, - "method": { - "shortName": "RawPredict", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.RawPredict", - "service": { - "shortName": "PredictionService", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_PredictionService_Explain_async", - "title": "DatasetService explain Sample", - "origin": "API_DEFINITION", - "description": " Perform an online explanation. If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. Only deployed AutoML tabular Models have explanation_spec.", - "canonical": true, - "file": "prediction_service.explain.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 91, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "Explain", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.Explain", - "async": true, - "parameters": [ - { - "name": "endpoint", - "type": "TYPE_STRING" - }, - { - "name": "instances", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "parameters", - "type": ".google.protobuf.Value" - }, - { - "name": "explanation_spec_override", - "type": ".google.cloud.aiplatform.v1beta1.ExplanationSpecOverride" - }, - { - "name": "deployed_model_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ExplainResponse", - "client": { - "shortName": "PredictionServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionServiceClient" - }, - "method": { - "shortName": "Explain", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.Explain", - "service": { - "shortName": "PredictionService", - "fullName": "google.cloud.aiplatform.v1beta1.PredictionService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_SpecialistPoolService_CreateSpecialistPool_async", - "title": "DatasetService createSpecialistPool Sample", - "origin": "API_DEFINITION", - "description": " Creates a SpecialistPool.", - "canonical": true, - "file": "specialist_pool_service.create_specialist_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateSpecialistPool", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService.CreateSpecialistPool", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "specialist_pool", - "type": ".google.cloud.aiplatform.v1beta1.SpecialistPool" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "SpecialistPoolServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClient" - }, - "method": { - "shortName": "CreateSpecialistPool", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService.CreateSpecialistPool", - "service": { - "shortName": "SpecialistPoolService", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_SpecialistPoolService_GetSpecialistPool_async", - "title": "DatasetService getSpecialistPool Sample", - "origin": "API_DEFINITION", - "description": " Gets a SpecialistPool.", - "canonical": true, - "file": "specialist_pool_service.get_specialist_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetSpecialistPool", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService.GetSpecialistPool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.SpecialistPool", - "client": { - "shortName": "SpecialistPoolServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClient" - }, - "method": { - "shortName": "GetSpecialistPool", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService.GetSpecialistPool", - "service": { - "shortName": "SpecialistPoolService", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_SpecialistPoolService_ListSpecialistPools_async", - "title": "DatasetService listSpecialistPools Sample", - "origin": "API_DEFINITION", - "description": " Lists SpecialistPools in a Location.", - "canonical": true, - "file": "specialist_pool_service.list_specialist_pools.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSpecialistPools", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService.ListSpecialistPools", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListSpecialistPoolsResponse", - "client": { - "shortName": "SpecialistPoolServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClient" - }, - "method": { - "shortName": "ListSpecialistPools", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService.ListSpecialistPools", - "service": { - "shortName": "SpecialistPoolService", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_SpecialistPoolService_DeleteSpecialistPool_async", - "title": "DatasetService deleteSpecialistPool Sample", - "origin": "API_DEFINITION", - "description": " Deletes a SpecialistPool as well as all Specialists in the pool.", - "canonical": true, - "file": "specialist_pool_service.delete_specialist_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteSpecialistPool", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService.DeleteSpecialistPool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "SpecialistPoolServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClient" - }, - "method": { - "shortName": "DeleteSpecialistPool", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService.DeleteSpecialistPool", - "service": { - "shortName": "SpecialistPoolService", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_SpecialistPoolService_UpdateSpecialistPool_async", - "title": "DatasetService updateSpecialistPool Sample", - "origin": "API_DEFINITION", - "description": " Updates a SpecialistPool.", - "canonical": true, - "file": "specialist_pool_service.update_specialist_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateSpecialistPool", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService.UpdateSpecialistPool", - "async": true, - "parameters": [ - { - "name": "specialist_pool", - "type": ".google.cloud.aiplatform.v1beta1.SpecialistPool" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "SpecialistPoolServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClient" - }, - "method": { - "shortName": "UpdateSpecialistPool", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService.UpdateSpecialistPool", - "service": { - "shortName": "SpecialistPoolService", - "fullName": "google.cloud.aiplatform.v1beta1.SpecialistPoolService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_CreateTensorboard_async", - "title": "DatasetService createTensorboard Sample", - "origin": "API_DEFINITION", - "description": " Creates a Tensorboard.", - "canonical": true, - "file": "tensorboard_service.create_tensorboard.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTensorboard", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.CreateTensorboard", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tensorboard", - "type": ".google.cloud.aiplatform.v1beta1.Tensorboard" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "CreateTensorboard", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.CreateTensorboard", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_GetTensorboard_async", - "title": "DatasetService getTensorboard Sample", - "origin": "API_DEFINITION", - "description": " Gets a Tensorboard.", - "canonical": true, - "file": "tensorboard_service.get_tensorboard.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTensorboard", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.GetTensorboard", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Tensorboard", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "GetTensorboard", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.GetTensorboard", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboard_async", - "title": "DatasetService updateTensorboard Sample", - "origin": "API_DEFINITION", - "description": " Updates a Tensorboard.", - "canonical": true, - "file": "tensorboard_service.update_tensorboard.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTensorboard", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.UpdateTensorboard", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "tensorboard", - "type": ".google.cloud.aiplatform.v1beta1.Tensorboard" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "UpdateTensorboard", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.UpdateTensorboard", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_ListTensorboards_async", - "title": "DatasetService listTensorboards Sample", - "origin": "API_DEFINITION", - "description": " Lists Tensorboards in a Location.", - "canonical": true, - "file": "tensorboard_service.list_tensorboards.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTensorboards", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboards", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListTensorboardsResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "ListTensorboards", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboards", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboard_async", - "title": "DatasetService deleteTensorboard Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Tensorboard.", - "canonical": true, - "file": "tensorboard_service.delete_tensorboard.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTensorboard", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.DeleteTensorboard", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "DeleteTensorboard", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.DeleteTensorboard", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_CreateTensorboardExperiment_async", - "title": "DatasetService createTensorboardExperiment Sample", - "origin": "API_DEFINITION", - "description": " Creates a TensorboardExperiment.", - "canonical": true, - "file": "tensorboard_service.create_tensorboard_experiment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.CreateTensorboardExperiment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tensorboard_experiment", - "type": ".google.cloud.aiplatform.v1beta1.TensorboardExperiment" - }, - { - "name": "tensorboard_experiment_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TensorboardExperiment", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "CreateTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.CreateTensorboardExperiment", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_GetTensorboardExperiment_async", - "title": "DatasetService getTensorboardExperiment Sample", - "origin": "API_DEFINITION", - "description": " Gets a TensorboardExperiment.", - "canonical": true, - "file": "tensorboard_service.get_tensorboard_experiment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.GetTensorboardExperiment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TensorboardExperiment", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "GetTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.GetTensorboardExperiment", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboardExperiment_async", - "title": "DatasetService updateTensorboardExperiment Sample", - "origin": "API_DEFINITION", - "description": " Updates a TensorboardExperiment.", - "canonical": true, - "file": "tensorboard_service.update_tensorboard_experiment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.UpdateTensorboardExperiment", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "tensorboard_experiment", - "type": ".google.cloud.aiplatform.v1beta1.TensorboardExperiment" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TensorboardExperiment", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "UpdateTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.UpdateTensorboardExperiment", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_ListTensorboardExperiments_async", - "title": "DatasetService listTensorboardExperiments Sample", - "origin": "API_DEFINITION", - "description": " Lists TensorboardExperiments in a Location.", - "canonical": true, - "file": "tensorboard_service.list_tensorboard_experiments.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTensorboardExperiments", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardExperiments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListTensorboardExperimentsResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "ListTensorboardExperiments", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardExperiments", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboardExperiment_async", - "title": "DatasetService deleteTensorboardExperiment Sample", - "origin": "API_DEFINITION", - "description": " Deletes a TensorboardExperiment.", - "canonical": true, - "file": "tensorboard_service.delete_tensorboard_experiment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.DeleteTensorboardExperiment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "DeleteTensorboardExperiment", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.DeleteTensorboardExperiment", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_CreateTensorboardRun_async", - "title": "DatasetService createTensorboardRun Sample", - "origin": "API_DEFINITION", - "description": " Creates a TensorboardRun.", - "canonical": true, - "file": "tensorboard_service.create_tensorboard_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTensorboardRun", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.CreateTensorboardRun", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tensorboard_run", - "type": ".google.cloud.aiplatform.v1beta1.TensorboardRun" - }, - { - "name": "tensorboard_run_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TensorboardRun", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "CreateTensorboardRun", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.CreateTensorboardRun", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_BatchCreateTensorboardRuns_async", - "title": "DatasetService batchCreateTensorboardRuns Sample", - "origin": "API_DEFINITION", - "description": " Batch create TensorboardRuns.", - "canonical": true, - "file": "tensorboard_service.batch_create_tensorboard_runs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchCreateTensorboardRuns", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.BatchCreateTensorboardRuns", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.BatchCreateTensorboardRunsResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "BatchCreateTensorboardRuns", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.BatchCreateTensorboardRuns", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_GetTensorboardRun_async", - "title": "DatasetService getTensorboardRun Sample", - "origin": "API_DEFINITION", - "description": " Gets a TensorboardRun.", - "canonical": true, - "file": "tensorboard_service.get_tensorboard_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTensorboardRun", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.GetTensorboardRun", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TensorboardRun", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "GetTensorboardRun", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.GetTensorboardRun", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboardRun_async", - "title": "DatasetService updateTensorboardRun Sample", - "origin": "API_DEFINITION", - "description": " Updates a TensorboardRun.", - "canonical": true, - "file": "tensorboard_service.update_tensorboard_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTensorboardRun", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.UpdateTensorboardRun", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "tensorboard_run", - "type": ".google.cloud.aiplatform.v1beta1.TensorboardRun" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TensorboardRun", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "UpdateTensorboardRun", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.UpdateTensorboardRun", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_ListTensorboardRuns_async", - "title": "DatasetService listTensorboardRuns Sample", - "origin": "API_DEFINITION", - "description": " Lists TensorboardRuns in a Location.", - "canonical": true, - "file": "tensorboard_service.list_tensorboard_runs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTensorboardRuns", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardRuns", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListTensorboardRunsResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "ListTensorboardRuns", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardRuns", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboardRun_async", - "title": "DatasetService deleteTensorboardRun Sample", - "origin": "API_DEFINITION", - "description": " Deletes a TensorboardRun.", - "canonical": true, - "file": "tensorboard_service.delete_tensorboard_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTensorboardRun", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.DeleteTensorboardRun", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "DeleteTensorboardRun", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.DeleteTensorboardRun", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_BatchCreateTensorboardTimeSeries_async", - "title": "DatasetService batchCreateTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.", - "canonical": true, - "file": "tensorboard_service.batch_create_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchCreateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.BatchCreateTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.BatchCreateTensorboardTimeSeriesResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "BatchCreateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.BatchCreateTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_CreateTensorboardTimeSeries_async", - "title": "DatasetService createTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Creates a TensorboardTimeSeries.", - "canonical": true, - "file": "tensorboard_service.create_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.CreateTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tensorboard_time_series_id", - "type": "TYPE_STRING" - }, - { - "name": "tensorboard_time_series", - "type": ".google.cloud.aiplatform.v1beta1.TensorboardTimeSeries" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TensorboardTimeSeries", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "CreateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.CreateTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_GetTensorboardTimeSeries_async", - "title": "DatasetService getTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Gets a TensorboardTimeSeries.", - "canonical": true, - "file": "tensorboard_service.get_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.GetTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TensorboardTimeSeries", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "GetTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.GetTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboardTimeSeries_async", - "title": "DatasetService updateTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Updates a TensorboardTimeSeries.", - "canonical": true, - "file": "tensorboard_service.update_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.UpdateTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "tensorboard_time_series", - "type": ".google.cloud.aiplatform.v1beta1.TensorboardTimeSeries" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.TensorboardTimeSeries", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "UpdateTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.UpdateTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_ListTensorboardTimeSeries_async", - "title": "DatasetService listTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Lists TensorboardTimeSeries in a Location.", - "canonical": true, - "file": "tensorboard_service.list_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListTensorboardTimeSeriesResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "ListTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboardTimeSeries_async", - "title": "DatasetService deleteTensorboardTimeSeries Sample", - "origin": "API_DEFINITION", - "description": " Deletes a TensorboardTimeSeries.", - "canonical": true, - "file": "tensorboard_service.delete_tensorboard_time_series.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.DeleteTensorboardTimeSeries", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "DeleteTensorboardTimeSeries", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.DeleteTensorboardTimeSeries", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_BatchReadTensorboardTimeSeriesData_async", - "title": "DatasetService batchReadTensorboardTimeSeriesData Sample", - "origin": "API_DEFINITION", - "description": " Reads multiple TensorboardTimeSeries' data. The data point number limit is 1000 for scalars, 100 for tensors and blob references. If the number of data points stored is less than the limit, all data will be returned. Otherwise, that limit number of data points will be randomly selected from this time series and returned.", - "canonical": true, - "file": "tensorboard_service.batch_read_tensorboard_time_series_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchReadTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.BatchReadTensorboardTimeSeriesData", - "async": true, - "parameters": [ - { - "name": "tensorboard", - "type": "TYPE_STRING" - }, - { - "name": "time_series", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.BatchReadTensorboardTimeSeriesDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "BatchReadTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.BatchReadTensorboardTimeSeriesData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardTimeSeriesData_async", - "title": "DatasetService readTensorboardTimeSeriesData Sample", - "origin": "API_DEFINITION", - "description": " Reads a TensorboardTimeSeries' data. By default, if the number of data points stored is less than 1000, all data will be returned. Otherwise, 1000 data points will be randomly selected from this time series and returned. This value can be changed by changing max_data_points, which can't be greater than 10k.", - "canonical": true, - "file": "tensorboard_service.read_tensorboard_time_series_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardTimeSeriesData", - "async": true, - "parameters": [ - { - "name": "tensorboard_time_series", - "type": "TYPE_STRING" - }, - { - "name": "max_data_points", - "type": "TYPE_INT32" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ReadTensorboardTimeSeriesDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "ReadTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardTimeSeriesData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardBlobData_async", - "title": "DatasetService readTensorboardBlobData Sample", - "origin": "API_DEFINITION", - "description": " Gets bytes of TensorboardBlobs. This is to allow reading blob data stored in consumer project's Cloud Storage bucket without users having to obtain Cloud Storage access permission.", - "canonical": true, - "file": "tensorboard_service.read_tensorboard_blob_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadTensorboardBlobData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardBlobData", - "async": true, - "parameters": [ - { - "name": "time_series", - "type": "TYPE_STRING" - }, - { - "name": "blob_ids", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ReadTensorboardBlobDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "ReadTensorboardBlobData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardBlobData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_WriteTensorboardExperimentData_async", - "title": "DatasetService writeTensorboardExperimentData Sample", - "origin": "API_DEFINITION", - "description": " Write time series data points of multiple TensorboardTimeSeries in multiple TensorboardRun's. If any data fail to be ingested, an error will be returned.", - "canonical": true, - "file": "tensorboard_service.write_tensorboard_experiment_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "WriteTensorboardExperimentData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.WriteTensorboardExperimentData", - "async": true, - "parameters": [ - { - "name": "tensorboard_experiment", - "type": "TYPE_STRING" - }, - { - "name": "write_run_data_requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.WriteTensorboardExperimentDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "WriteTensorboardExperimentData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.WriteTensorboardExperimentData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_WriteTensorboardRunData_async", - "title": "DatasetService writeTensorboardRunData Sample", - "origin": "API_DEFINITION", - "description": " Write time series data points into multiple TensorboardTimeSeries under a TensorboardRun. If any data fail to be ingested, an error will be returned.", - "canonical": true, - "file": "tensorboard_service.write_tensorboard_run_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "WriteTensorboardRunData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.WriteTensorboardRunData", - "async": true, - "parameters": [ - { - "name": "tensorboard_run", - "type": "TYPE_STRING" - }, - { - "name": "time_series_data", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.WriteTensorboardRunDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "WriteTensorboardRunData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.WriteTensorboardRunData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_ExportTensorboardTimeSeriesData_async", - "title": "DatasetService exportTensorboardTimeSeriesData Sample", - "origin": "API_DEFINITION", - "description": " Exports a TensorboardTimeSeries' data. Data is returned in paginated responses.", - "canonical": true, - "file": "tensorboard_service.export_tensorboard_time_series_data.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData", - "async": true, - "parameters": [ - { - "name": "tensorboard_time_series", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ExportTensorboardTimeSeriesDataResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "ExportTensorboardTimeSeriesData", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_CreateStudy_async", - "title": "DatasetService createStudy Sample", - "origin": "API_DEFINITION", - "description": " Creates a Study. A resource name will be generated after creation of the Study.", - "canonical": true, - "file": "vizier_service.create_study.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateStudy", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.CreateStudy", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "study", - "type": ".google.cloud.aiplatform.v1beta1.Study" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Study", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "CreateStudy", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.CreateStudy", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_GetStudy_async", - "title": "DatasetService getStudy Sample", - "origin": "API_DEFINITION", - "description": " Gets a Study by name.", - "canonical": true, - "file": "vizier_service.get_study.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetStudy", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.GetStudy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Study", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "GetStudy", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.GetStudy", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_ListStudies_async", - "title": "DatasetService listStudies Sample", - "origin": "API_DEFINITION", - "description": " Lists all the studies in a region for an associated project.", - "canonical": true, - "file": "vizier_service.list_studies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListStudies", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.ListStudies", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListStudiesResponse", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "ListStudies", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.ListStudies", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_DeleteStudy_async", - "title": "DatasetService deleteStudy Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Study.", - "canonical": true, - "file": "vizier_service.delete_study.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteStudy", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.DeleteStudy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "DeleteStudy", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.DeleteStudy", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_LookupStudy_async", - "title": "DatasetService lookupStudy Sample", - "origin": "API_DEFINITION", - "description": " Looks a study up using the user-defined display_name field instead of the fully qualified resource name.", - "canonical": true, - "file": "vizier_service.lookup_study.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "LookupStudy", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.LookupStudy", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "display_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Study", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "LookupStudy", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.LookupStudy", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_SuggestTrials_async", - "title": "DatasetService suggestTrials Sample", - "origin": "API_DEFINITION", - "description": " Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier. Returns a long-running operation associated with the generation of Trial suggestions. When this long-running operation succeeds, it will contain a [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].", - "canonical": true, - "file": "vizier_service.suggest_trials.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SuggestTrials", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.SuggestTrials", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "suggestion_count", - "type": "TYPE_INT32" - }, - { - "name": "client_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "SuggestTrials", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.SuggestTrials", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_CreateTrial_async", - "title": "DatasetService createTrial Sample", - "origin": "API_DEFINITION", - "description": " Adds a user provided Trial to a Study.", - "canonical": true, - "file": "vizier_service.create_trial.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTrial", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.CreateTrial", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "trial", - "type": ".google.cloud.aiplatform.v1beta1.Trial" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Trial", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "CreateTrial", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.CreateTrial", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_GetTrial_async", - "title": "DatasetService getTrial Sample", - "origin": "API_DEFINITION", - "description": " Gets a Trial.", - "canonical": true, - "file": "vizier_service.get_trial.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTrial", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.GetTrial", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Trial", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "GetTrial", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.GetTrial", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_ListTrials_async", - "title": "DatasetService listTrials Sample", - "origin": "API_DEFINITION", - "description": " Lists the Trials associated with a Study.", - "canonical": true, - "file": "vizier_service.list_trials.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTrials", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.ListTrials", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListTrialsResponse", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "ListTrials", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.ListTrials", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_AddTrialMeasurement_async", - "title": "DatasetService addTrialMeasurement Sample", - "origin": "API_DEFINITION", - "description": " Adds a measurement of the objective metrics to a Trial. This measurement is assumed to have been taken before the Trial is complete.", - "canonical": true, - "file": "vizier_service.add_trial_measurement.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AddTrialMeasurement", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.AddTrialMeasurement", - "async": true, - "parameters": [ - { - "name": "trial_name", - "type": "TYPE_STRING" - }, - { - "name": "measurement", - "type": ".google.cloud.aiplatform.v1beta1.Measurement" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Trial", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "AddTrialMeasurement", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.AddTrialMeasurement", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_CompleteTrial_async", - "title": "DatasetService completeTrial Sample", - "origin": "API_DEFINITION", - "description": " Marks a Trial as complete.", - "canonical": true, - "file": "vizier_service.complete_trial.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CompleteTrial", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.CompleteTrial", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "final_measurement", - "type": ".google.cloud.aiplatform.v1beta1.Measurement" - }, - { - "name": "trial_infeasible", - "type": "TYPE_BOOL" - }, - { - "name": "infeasible_reason", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Trial", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "CompleteTrial", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.CompleteTrial", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_DeleteTrial_async", - "title": "DatasetService deleteTrial Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Trial.", - "canonical": true, - "file": "vizier_service.delete_trial.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTrial", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.DeleteTrial", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "DeleteTrial", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.DeleteTrial", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_CheckTrialEarlyStoppingState_async", - "title": "DatasetService checkTrialEarlyStoppingState Sample", - "origin": "API_DEFINITION", - "description": " Checks whether a Trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse].", - "canonical": true, - "file": "vizier_service.check_trial_early_stopping_state.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckTrialEarlyStoppingState", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.CheckTrialEarlyStoppingState", - "async": true, - "parameters": [ - { - "name": "trial_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "CheckTrialEarlyStoppingState", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.CheckTrialEarlyStoppingState", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_StopTrial_async", - "title": "DatasetService stopTrial Sample", - "origin": "API_DEFINITION", - "description": " Stops a Trial.", - "canonical": true, - "file": "vizier_service.stop_trial.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StopTrial", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.StopTrial", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.Trial", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "StopTrial", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.StopTrial", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - }, - { - "regionTag": "aiplatform_v1beta1_generated_VizierService_ListOptimalTrials_async", - "title": "DatasetService listOptimalTrials Sample", - "origin": "API_DEFINITION", - "description": " Lists the pareto-optimal Trials for multi-objective Study or the optimal Trials for single-objective Study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency", - "canonical": true, - "file": "vizier_service.list_optimal_trials.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListOptimalTrials", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.ListOptimalTrials", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ListOptimalTrialsResponse", - "client": { - "shortName": "VizierServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.VizierServiceClient" - }, - "method": { - "shortName": "ListOptimalTrials", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService.ListOptimalTrials", - "service": { - "shortName": "VizierService", - "fullName": "google.cloud.aiplatform.v1beta1.VizierService" - } - } - } - } - ] -} \ No newline at end of file diff --git a/samples/generated/v1beta1/specialist_pool_service.create_specialist_pool.js b/samples/generated/v1beta1/specialist_pool_service.create_specialist_pool.js deleted file mode 100644 index 3adcd396..00000000 --- a/samples/generated/v1beta1/specialist_pool_service.create_specialist_pool.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, specialistPool) { - // [START aiplatform_v1beta1_generated_SpecialistPoolService_CreateSpecialistPool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent Project name for the new SpecialistPool. - * The form is `projects/{project}/locations/{location}`. - */ - // const parent = 'abc123' - /** - * Required. The SpecialistPool to create. - */ - // const specialistPool = {} - - // Imports the Aiplatform library - const {SpecialistPoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new SpecialistPoolServiceClient(); - - async function callCreateSpecialistPool() { - // Construct request - const request = { - parent, - specialistPool, - }; - - // Run request - const [operation] = await aiplatformClient.createSpecialistPool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateSpecialistPool(); - // [END aiplatform_v1beta1_generated_SpecialistPoolService_CreateSpecialistPool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/specialist_pool_service.delete_specialist_pool.js b/samples/generated/v1beta1/specialist_pool_service.delete_specialist_pool.js deleted file mode 100644 index 1201df40..00000000 --- a/samples/generated/v1beta1/specialist_pool_service.delete_specialist_pool.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_SpecialistPoolService_DeleteSpecialistPool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the SpecialistPool to delete. Format: - * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}` - */ - // const name = 'abc123' - /** - * If set to true, any specialist managers in this SpecialistPool will also be - * deleted. (Otherwise, the request will only work if the SpecialistPool has - * no specialist managers.) - */ - // const force = true - - // Imports the Aiplatform library - const {SpecialistPoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new SpecialistPoolServiceClient(); - - async function callDeleteSpecialistPool() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteSpecialistPool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteSpecialistPool(); - // [END aiplatform_v1beta1_generated_SpecialistPoolService_DeleteSpecialistPool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/specialist_pool_service.get_specialist_pool.js b/samples/generated/v1beta1/specialist_pool_service.get_specialist_pool.js deleted file mode 100644 index e5dff722..00000000 --- a/samples/generated/v1beta1/specialist_pool_service.get_specialist_pool.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_SpecialistPoolService_GetSpecialistPool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the SpecialistPool resource. - * The form is - * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`. - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {SpecialistPoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new SpecialistPoolServiceClient(); - - async function callGetSpecialistPool() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getSpecialistPool(request); - console.log(response); - } - - callGetSpecialistPool(); - // [END aiplatform_v1beta1_generated_SpecialistPoolService_GetSpecialistPool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/specialist_pool_service.list_specialist_pools.js b/samples/generated/v1beta1/specialist_pool_service.list_specialist_pools.js deleted file mode 100644 index 18e48844..00000000 --- a/samples/generated/v1beta1/specialist_pool_service.list_specialist_pools.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_SpecialistPoolService_ListSpecialistPools_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the SpecialistPool's parent resource. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * The standard list page size. - */ - // const pageSize = 1234 - /** - * The standard list page token. - * Typically obtained by ListSpecialistPoolsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListSpecialistPoolsResponse.next_page_token of - * the previous SpecialistPoolService.ListSpecialistPools google.cloud.aiplatform.v1beta1.SpecialistPoolService.ListSpecialistPools call. Return - * first page if empty. - */ - // const pageToken = 'abc123' - /** - * Mask specifying which fields to read. FieldMask represents a set of - */ - // const readMask = {} - - // Imports the Aiplatform library - const {SpecialistPoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new SpecialistPoolServiceClient(); - - async function callListSpecialistPools() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listSpecialistPoolsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListSpecialistPools(); - // [END aiplatform_v1beta1_generated_SpecialistPoolService_ListSpecialistPools_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/specialist_pool_service.update_specialist_pool.js b/samples/generated/v1beta1/specialist_pool_service.update_specialist_pool.js deleted file mode 100644 index 2bcb18f8..00000000 --- a/samples/generated/v1beta1/specialist_pool_service.update_specialist_pool.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(specialistPool, updateMask) { - // [START aiplatform_v1beta1_generated_SpecialistPoolService_UpdateSpecialistPool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The SpecialistPool which replaces the resource on the server. - */ - // const specialistPool = {} - /** - * Required. The update mask applies to the resource. - */ - // const updateMask = {} - - // Imports the Aiplatform library - const {SpecialistPoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new SpecialistPoolServiceClient(); - - async function callUpdateSpecialistPool() { - // Construct request - const request = { - specialistPool, - updateMask, - }; - - // Run request - const [operation] = await aiplatformClient.updateSpecialistPool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateSpecialistPool(); - // [END aiplatform_v1beta1_generated_SpecialistPoolService_UpdateSpecialistPool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_runs.js b/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_runs.js deleted file mode 100644 index 180c7e68..00000000 --- a/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_runs.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, requests) { - // [START aiplatform_v1beta1_generated_TensorboardService_BatchCreateTensorboardRuns_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardExperiment to create the - * TensorboardRuns in. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - * The parent field in the CreateTensorboardRunRequest messages must match - * this field. - */ - // const parent = 'abc123' - /** - * Required. The request message specifying the TensorboardRuns to create. - * A maximum of 1000 TensorboardRuns can be created in a batch. - */ - // const requests = 1234 - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callBatchCreateTensorboardRuns() { - // Construct request - const request = { - parent, - requests, - }; - - // Run request - const response = await aiplatformClient.batchCreateTensorboardRuns(request); - console.log(response); - } - - callBatchCreateTensorboardRuns(); - // [END aiplatform_v1beta1_generated_TensorboardService_BatchCreateTensorboardRuns_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_time_series.js b/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_time_series.js deleted file mode 100644 index e8566dcd..00000000 --- a/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_time_series.js +++ /dev/null @@ -1,73 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, requests) { - // [START aiplatform_v1beta1_generated_TensorboardService_BatchCreateTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardExperiment to create the - * TensorboardTimeSeries in. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - * The TensorboardRuns referenced by the parent fields in the - * CreateTensorboardTimeSeriesRequest messages must be sub resources of this - * TensorboardExperiment. - */ - // const parent = 'abc123' - /** - * Required. The request message specifying the TensorboardTimeSeries to create. - * A maximum of 1000 TensorboardTimeSeries can be created in a batch. - */ - // const requests = 1234 - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callBatchCreateTensorboardTimeSeries() { - // Construct request - const request = { - parent, - requests, - }; - - // Run request - const response = await aiplatformClient.batchCreateTensorboardTimeSeries(request); - console.log(response); - } - - callBatchCreateTensorboardTimeSeries(); - // [END aiplatform_v1beta1_generated_TensorboardService_BatchCreateTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.batch_read_tensorboard_time_series_data.js b/samples/generated/v1beta1/tensorboard_service.batch_read_tensorboard_time_series_data.js deleted file mode 100644 index c660faf0..00000000 --- a/samples/generated/v1beta1/tensorboard_service.batch_read_tensorboard_time_series_data.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tensorboard, timeSeries) { - // [START aiplatform_v1beta1_generated_TensorboardService_BatchReadTensorboardTimeSeriesData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Tensorboard containing TensorboardTimeSeries to - * read data from. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}`. - * The TensorboardTimeSeries referenced by time_series google.cloud.aiplatform.v1beta1.BatchReadTensorboardTimeSeriesDataRequest.time_series must be sub - * resources of this Tensorboard. - */ - // const tensorboard = 'abc123' - /** - * Required. The resource names of the TensorboardTimeSeries to read data from. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const timeSeries = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callBatchReadTensorboardTimeSeriesData() { - // Construct request - const request = { - tensorboard, - timeSeries, - }; - - // Run request - const response = await aiplatformClient.batchReadTensorboardTimeSeriesData(request); - console.log(response); - } - - callBatchReadTensorboardTimeSeriesData(); - // [END aiplatform_v1beta1_generated_TensorboardService_BatchReadTensorboardTimeSeriesData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.create_tensorboard.js b/samples/generated/v1beta1/tensorboard_service.create_tensorboard.js deleted file mode 100644 index b0ba37fd..00000000 --- a/samples/generated/v1beta1/tensorboard_service.create_tensorboard.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, tensorboard) { - // [START aiplatform_v1beta1_generated_TensorboardService_CreateTensorboard_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the Tensorboard in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The Tensorboard to create. - */ - // const tensorboard = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callCreateTensorboard() { - // Construct request - const request = { - parent, - tensorboard, - }; - - // Run request - const [operation] = await aiplatformClient.createTensorboard(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateTensorboard(); - // [END aiplatform_v1beta1_generated_TensorboardService_CreateTensorboard_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.create_tensorboard_experiment.js b/samples/generated/v1beta1/tensorboard_service.create_tensorboard_experiment.js deleted file mode 100644 index 60c0e504..00000000 --- a/samples/generated/v1beta1/tensorboard_service.create_tensorboard_experiment.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, tensorboardExperimentId) { - // [START aiplatform_v1beta1_generated_TensorboardService_CreateTensorboardExperiment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Tensorboard to create the TensorboardExperiment - * in. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - */ - // const parent = 'abc123' - /** - * The TensorboardExperiment to create. - */ - // const tensorboardExperiment = {} - /** - * Required. The ID to use for the Tensorboard experiment, which will become the final - * component of the Tensorboard experiment's resource name. - * This value should be 1-128 characters, and valid characters - * are /[a-z][0-9]-/. - */ - // const tensorboardExperimentId = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callCreateTensorboardExperiment() { - // Construct request - const request = { - parent, - tensorboardExperimentId, - }; - - // Run request - const response = await aiplatformClient.createTensorboardExperiment(request); - console.log(response); - } - - callCreateTensorboardExperiment(); - // [END aiplatform_v1beta1_generated_TensorboardService_CreateTensorboardExperiment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.create_tensorboard_run.js b/samples/generated/v1beta1/tensorboard_service.create_tensorboard_run.js deleted file mode 100644 index a2f63d51..00000000 --- a/samples/generated/v1beta1/tensorboard_service.create_tensorboard_run.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, tensorboardRun, tensorboardRunId) { - // [START aiplatform_v1beta1_generated_TensorboardService_CreateTensorboardRun_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardExperiment to create the TensorboardRun - * in. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - */ - // const parent = 'abc123' - /** - * Required. The TensorboardRun to create. - */ - // const tensorboardRun = {} - /** - * Required. The ID to use for the Tensorboard run, which will become the final - * component of the Tensorboard run's resource name. - * This value should be 1-128 characters, and valid characters - * are /[a-z][0-9]-/. - */ - // const tensorboardRunId = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callCreateTensorboardRun() { - // Construct request - const request = { - parent, - tensorboardRun, - tensorboardRunId, - }; - - // Run request - const response = await aiplatformClient.createTensorboardRun(request); - console.log(response); - } - - callCreateTensorboardRun(); - // [END aiplatform_v1beta1_generated_TensorboardService_CreateTensorboardRun_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.create_tensorboard_time_series.js b/samples/generated/v1beta1/tensorboard_service.create_tensorboard_time_series.js deleted file mode 100644 index 5f83b15e..00000000 --- a/samples/generated/v1beta1/tensorboard_service.create_tensorboard_time_series.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, tensorboardTimeSeries) { - // [START aiplatform_v1beta1_generated_TensorboardService_CreateTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardRun to create the - * TensorboardTimeSeries in. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` - */ - // const parent = 'abc123' - /** - * Optional. The user specified unique ID to use for the TensorboardTimeSeries, which - * will become the final component of the TensorboardTimeSeries's resource - * name. - * This value should match "[a-z0-9][a-z0-9-]{0, 127}" - */ - // const tensorboardTimeSeriesId = 'abc123' - /** - * Required. The TensorboardTimeSeries to create. - */ - // const tensorboardTimeSeries = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callCreateTensorboardTimeSeries() { - // Construct request - const request = { - parent, - tensorboardTimeSeries, - }; - - // Run request - const response = await aiplatformClient.createTensorboardTimeSeries(request); - console.log(response); - } - - callCreateTensorboardTimeSeries(); - // [END aiplatform_v1beta1_generated_TensorboardService_CreateTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.delete_tensorboard.js b/samples/generated/v1beta1/tensorboard_service.delete_tensorboard.js deleted file mode 100644 index db8c965f..00000000 --- a/samples/generated/v1beta1/tensorboard_service.delete_tensorboard.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboard_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Tensorboard to be deleted. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callDeleteTensorboard() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteTensorboard(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTensorboard(); - // [END aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboard_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_experiment.js b/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_experiment.js deleted file mode 100644 index 2bac02c2..00000000 --- a/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_experiment.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboardExperiment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardExperiment to be deleted. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callDeleteTensorboardExperiment() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteTensorboardExperiment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTensorboardExperiment(); - // [END aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboardExperiment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_run.js b/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_run.js deleted file mode 100644 index a544165a..00000000 --- a/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_run.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboardRun_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardRun to be deleted. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callDeleteTensorboardRun() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteTensorboardRun(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTensorboardRun(); - // [END aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboardRun_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_time_series.js b/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_time_series.js deleted file mode 100644 index 9b269b8e..00000000 --- a/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_time_series.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardTimeSeries to be deleted. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callDeleteTensorboardTimeSeries() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await aiplatformClient.deleteTensorboardTimeSeries(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTensorboardTimeSeries(); - // [END aiplatform_v1beta1_generated_TensorboardService_DeleteTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js b/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js deleted file mode 100644 index c83147c3..00000000 --- a/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js +++ /dev/null @@ -1,90 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tensorboardTimeSeries) { - // [START aiplatform_v1beta1_generated_TensorboardService_ExportTensorboardTimeSeriesData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardTimeSeries to export data from. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const tensorboardTimeSeries = 'abc123' - /** - * Exports the TensorboardTimeSeries' data that match the filter expression. - */ - // const filter = 'abc123' - /** - * The maximum number of data points to return per page. - * The default page_size will be 1000. Values must be between 1 and 10000. - * Values above 10000 will be coerced to 10000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * TensorboardService.ExportTensorboardTimeSeries call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * TensorboardService.ExportTensorboardTimeSeries must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Field to use to sort the TensorboardTimeSeries' data. - * By default, TensorboardTimeSeries' data will be returned in a pseudo random - * order. - */ - // const orderBy = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callExportTensorboardTimeSeriesData() { - // Construct request - const request = { - tensorboardTimeSeries, - }; - - // Run request - const iterable = await aiplatformClient.exportTensorboardTimeSeriesDataAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callExportTensorboardTimeSeriesData(); - // [END aiplatform_v1beta1_generated_TensorboardService_ExportTensorboardTimeSeriesData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.get_tensorboard.js b/samples/generated/v1beta1/tensorboard_service.get_tensorboard.js deleted file mode 100644 index d803ada8..00000000 --- a/samples/generated/v1beta1/tensorboard_service.get_tensorboard.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_TensorboardService_GetTensorboard_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Tensorboard resource. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callGetTensorboard() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTensorboard(request); - console.log(response); - } - - callGetTensorboard(); - // [END aiplatform_v1beta1_generated_TensorboardService_GetTensorboard_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.get_tensorboard_experiment.js b/samples/generated/v1beta1/tensorboard_service.get_tensorboard_experiment.js deleted file mode 100644 index 3ccbd39e..00000000 --- a/samples/generated/v1beta1/tensorboard_service.get_tensorboard_experiment.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_TensorboardService_GetTensorboardExperiment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardExperiment resource. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callGetTensorboardExperiment() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTensorboardExperiment(request); - console.log(response); - } - - callGetTensorboardExperiment(); - // [END aiplatform_v1beta1_generated_TensorboardService_GetTensorboardExperiment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.get_tensorboard_run.js b/samples/generated/v1beta1/tensorboard_service.get_tensorboard_run.js deleted file mode 100644 index 14df8157..00000000 --- a/samples/generated/v1beta1/tensorboard_service.get_tensorboard_run.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_TensorboardService_GetTensorboardRun_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardRun resource. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callGetTensorboardRun() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTensorboardRun(request); - console.log(response); - } - - callGetTensorboardRun(); - // [END aiplatform_v1beta1_generated_TensorboardService_GetTensorboardRun_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.get_tensorboard_time_series.js b/samples/generated/v1beta1/tensorboard_service.get_tensorboard_time_series.js deleted file mode 100644 index 4c20724f..00000000 --- a/samples/generated/v1beta1/tensorboard_service.get_tensorboard_time_series.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_TensorboardService_GetTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TensorboardTimeSeries resource. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callGetTensorboardTimeSeries() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTensorboardTimeSeries(request); - console.log(response); - } - - callGetTensorboardTimeSeries(); - // [END aiplatform_v1beta1_generated_TensorboardService_GetTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.list_tensorboard_experiments.js b/samples/generated/v1beta1/tensorboard_service.list_tensorboard_experiments.js deleted file mode 100644 index 1d93e6c1..00000000 --- a/samples/generated/v1beta1/tensorboard_service.list_tensorboard_experiments.js +++ /dev/null @@ -1,93 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_TensorboardService_ListTensorboardExperiments_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Tensorboard to list TensorboardExperiments. - * Format: - * 'projects/{project}/locations/{location}/tensorboards/{tensorboard}' - */ - // const parent = 'abc123' - /** - * Lists the TensorboardExperiments that match the filter expression. - */ - // const filter = 'abc123' - /** - * The maximum number of TensorboardExperiments to return. The service may - * return fewer than this value. If unspecified, at most 50 - * TensorboardExperiments will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * TensorboardService.ListTensorboardExperiments google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardExperiments call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * TensorboardService.ListTensorboardExperiments google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardExperiments must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callListTensorboardExperiments() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTensorboardExperimentsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTensorboardExperiments(); - // [END aiplatform_v1beta1_generated_TensorboardService_ListTensorboardExperiments_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.list_tensorboard_runs.js b/samples/generated/v1beta1/tensorboard_service.list_tensorboard_runs.js deleted file mode 100644 index 5bcd80b0..00000000 --- a/samples/generated/v1beta1/tensorboard_service.list_tensorboard_runs.js +++ /dev/null @@ -1,93 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_TensorboardService_ListTensorboardRuns_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardExperiment to list TensorboardRuns. - * Format: - * 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}' - */ - // const parent = 'abc123' - /** - * Lists the TensorboardRuns that match the filter expression. - */ - // const filter = 'abc123' - /** - * The maximum number of TensorboardRuns to return. The service may return - * fewer than this value. If unspecified, at most 50 TensorboardRuns will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * TensorboardService.ListTensorboardRuns google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardRuns call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * TensorboardService.ListTensorboardRuns google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardRuns must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callListTensorboardRuns() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTensorboardRunsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTensorboardRuns(); - // [END aiplatform_v1beta1_generated_TensorboardService_ListTensorboardRuns_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.list_tensorboard_time_series.js b/samples/generated/v1beta1/tensorboard_service.list_tensorboard_time_series.js deleted file mode 100644 index 19c420d5..00000000 --- a/samples/generated/v1beta1/tensorboard_service.list_tensorboard_time_series.js +++ /dev/null @@ -1,93 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_TensorboardService_ListTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardRun to list TensorboardTimeSeries. - * Format: - * 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}' - */ - // const parent = 'abc123' - /** - * Lists the TensorboardTimeSeries that match the filter expression. - */ - // const filter = 'abc123' - /** - * The maximum number of TensorboardTimeSeries to return. The service may - * return fewer than this value. If unspecified, at most 50 - * TensorboardTimeSeries will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * TensorboardService.ListTensorboardTimeSeries google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardTimeSeries call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * TensorboardService.ListTensorboardTimeSeries google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboardTimeSeries must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callListTensorboardTimeSeries() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTensorboardTimeSeriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTensorboardTimeSeries(); - // [END aiplatform_v1beta1_generated_TensorboardService_ListTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.list_tensorboards.js b/samples/generated/v1beta1/tensorboard_service.list_tensorboards.js deleted file mode 100644 index 762b5915..00000000 --- a/samples/generated/v1beta1/tensorboard_service.list_tensorboards.js +++ /dev/null @@ -1,93 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_TensorboardService_ListTensorboards_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list Tensorboards. - * Format: - * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Lists the Tensorboards that match the filter expression. - */ - // const filter = 'abc123' - /** - * The maximum number of Tensorboards to return. The service may return - * fewer than this value. If unspecified, at most 100 Tensorboards will be - * returned. The maximum value is 100; values above 100 will be coerced to - * 100. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous - * TensorboardService.ListTensorboards google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboards call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * TensorboardService.ListTensorboards google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboards must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - /** - * Mask specifying which fields to read. - */ - // const readMask = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callListTensorboards() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTensorboardsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTensorboards(); - // [END aiplatform_v1beta1_generated_TensorboardService_ListTensorboards_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.read_tensorboard_blob_data.js b/samples/generated/v1beta1/tensorboard_service.read_tensorboard_blob_data.js deleted file mode 100644 index 0092407c..00000000 --- a/samples/generated/v1beta1/tensorboard_service.read_tensorboard_blob_data.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(timeSeries) { - // [START aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardBlobData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardTimeSeries to list Blobs. - * Format: - * 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}' - */ - // const timeSeries = 'abc123' - /** - * IDs of the blobs to read. - */ - // const blobIds = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callReadTensorboardBlobData() { - // Construct request - const request = { - timeSeries, - }; - - // Run request - const stream = await aiplatformClient.readTensorboardBlobData(request); - stream.on('data', (response) => { console.log(response) }); - stream.on('error', (err) => { throw(err) }); - stream.on('end', () => { /* API call completed */ }); - } - - callReadTensorboardBlobData(); - // [END aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardBlobData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.read_tensorboard_time_series_data.js b/samples/generated/v1beta1/tensorboard_service.read_tensorboard_time_series_data.js deleted file mode 100644 index 9e5f79fd..00000000 --- a/samples/generated/v1beta1/tensorboard_service.read_tensorboard_time_series_data.js +++ /dev/null @@ -1,73 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tensorboardTimeSeries) { - // [START aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardTimeSeriesData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardTimeSeries to read data from. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const tensorboardTimeSeries = 'abc123' - /** - * The maximum number of TensorboardTimeSeries' data to return. - * This value should be a positive integer. - * This value can be set to -1 to return all data. - */ - // const maxDataPoints = 1234 - /** - * Reads the TensorboardTimeSeries' data that match the filter expression. - */ - // const filter = 'abc123' - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callReadTensorboardTimeSeriesData() { - // Construct request - const request = { - tensorboardTimeSeries, - }; - - // Run request - const response = await aiplatformClient.readTensorboardTimeSeriesData(request); - console.log(response); - } - - callReadTensorboardTimeSeriesData(); - // [END aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardTimeSeriesData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.update_tensorboard.js b/samples/generated/v1beta1/tensorboard_service.update_tensorboard.js deleted file mode 100644 index ba8f468d..00000000 --- a/samples/generated/v1beta1/tensorboard_service.update_tensorboard.js +++ /dev/null @@ -1,74 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, tensorboard) { - // [START aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboard_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Tensorboard resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten if new - * values are specified. - */ - // const updateMask = {} - /** - * Required. The Tensorboard's `name` field is used to identify the - * Tensorboard to be updated. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - */ - // const tensorboard = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callUpdateTensorboard() { - // Construct request - const request = { - updateMask, - tensorboard, - }; - - // Run request - const [operation] = await aiplatformClient.updateTensorboard(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateTensorboard(); - // [END aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboard_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.update_tensorboard_experiment.js b/samples/generated/v1beta1/tensorboard_service.update_tensorboard_experiment.js deleted file mode 100644 index bd6bbeaa..00000000 --- a/samples/generated/v1beta1/tensorboard_service.update_tensorboard_experiment.js +++ /dev/null @@ -1,73 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, tensorboardExperiment) { - // [START aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboardExperiment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * TensorboardExperiment resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten if new - * values are specified. - */ - // const updateMask = {} - /** - * Required. The TensorboardExperiment's `name` field is used to identify the - * TensorboardExperiment to be updated. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - */ - // const tensorboardExperiment = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callUpdateTensorboardExperiment() { - // Construct request - const request = { - updateMask, - tensorboardExperiment, - }; - - // Run request - const response = await aiplatformClient.updateTensorboardExperiment(request); - console.log(response); - } - - callUpdateTensorboardExperiment(); - // [END aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboardExperiment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.update_tensorboard_run.js b/samples/generated/v1beta1/tensorboard_service.update_tensorboard_run.js deleted file mode 100644 index d250a3a1..00000000 --- a/samples/generated/v1beta1/tensorboard_service.update_tensorboard_run.js +++ /dev/null @@ -1,73 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, tensorboardRun) { - // [START aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboardRun_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * TensorboardRun resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten if new - * values are specified. - */ - // const updateMask = {} - /** - * Required. The TensorboardRun's `name` field is used to identify the TensorboardRun to - * be updated. Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` - */ - // const tensorboardRun = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callUpdateTensorboardRun() { - // Construct request - const request = { - updateMask, - tensorboardRun, - }; - - // Run request - const response = await aiplatformClient.updateTensorboardRun(request); - console.log(response); - } - - callUpdateTensorboardRun(); - // [END aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboardRun_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.update_tensorboard_time_series.js b/samples/generated/v1beta1/tensorboard_service.update_tensorboard_time_series.js deleted file mode 100644 index fb384b47..00000000 --- a/samples/generated/v1beta1/tensorboard_service.update_tensorboard_time_series.js +++ /dev/null @@ -1,74 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, tensorboardTimeSeries) { - // [START aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboardTimeSeries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * TensorboardTimeSeries resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten if new - * values are specified. - */ - // const updateMask = {} - /** - * Required. The TensorboardTimeSeries' `name` field is used to identify the - * TensorboardTimeSeries to be updated. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}` - */ - // const tensorboardTimeSeries = {} - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callUpdateTensorboardTimeSeries() { - // Construct request - const request = { - updateMask, - tensorboardTimeSeries, - }; - - // Run request - const response = await aiplatformClient.updateTensorboardTimeSeries(request); - console.log(response); - } - - callUpdateTensorboardTimeSeries(); - // [END aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboardTimeSeries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.write_tensorboard_experiment_data.js b/samples/generated/v1beta1/tensorboard_service.write_tensorboard_experiment_data.js deleted file mode 100644 index 9d7b69e4..00000000 --- a/samples/generated/v1beta1/tensorboard_service.write_tensorboard_experiment_data.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tensorboardExperiment, writeRunDataRequests) { - // [START aiplatform_v1beta1_generated_TensorboardService_WriteTensorboardExperimentData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardExperiment to write data to. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}` - */ - // const tensorboardExperiment = 'abc123' - /** - * Required. Requests containing per-run TensorboardTimeSeries data to write. - */ - // const writeRunDataRequests = 1234 - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callWriteTensorboardExperimentData() { - // Construct request - const request = { - tensorboardExperiment, - writeRunDataRequests, - }; - - // Run request - const response = await aiplatformClient.writeTensorboardExperimentData(request); - console.log(response); - } - - callWriteTensorboardExperimentData(); - // [END aiplatform_v1beta1_generated_TensorboardService_WriteTensorboardExperimentData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/tensorboard_service.write_tensorboard_run_data.js b/samples/generated/v1beta1/tensorboard_service.write_tensorboard_run_data.js deleted file mode 100644 index 28617125..00000000 --- a/samples/generated/v1beta1/tensorboard_service.write_tensorboard_run_data.js +++ /dev/null @@ -1,72 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tensorboardRun, timeSeriesData) { - // [START aiplatform_v1beta1_generated_TensorboardService_WriteTensorboardRunData_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the TensorboardRun to write data to. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}` - */ - // const tensorboardRun = 'abc123' - /** - * Required. The TensorboardTimeSeries data to write. - * Values with in a time series are indexed by their step value. - * Repeated writes to the same step will overwrite the existing value for that - * step. - * The upper limit of data points per write request is 5000. - */ - // const timeSeriesData = 1234 - - // Imports the Aiplatform library - const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new TensorboardServiceClient(); - - async function callWriteTensorboardRunData() { - // Construct request - const request = { - tensorboardRun, - timeSeriesData, - }; - - // Run request - const response = await aiplatformClient.writeTensorboardRunData(request); - console.log(response); - } - - callWriteTensorboardRunData(); - // [END aiplatform_v1beta1_generated_TensorboardService_WriteTensorboardRunData_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.add_trial_measurement.js b/samples/generated/v1beta1/vizier_service.add_trial_measurement.js deleted file mode 100644 index 28271abf..00000000 --- a/samples/generated/v1beta1/vizier_service.add_trial_measurement.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(trialName, measurement) { - // [START aiplatform_v1beta1_generated_VizierService_AddTrialMeasurement_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the trial to add measurement. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const trialName = 'abc123' - /** - * Required. The measurement to be added to a Trial. - */ - // const measurement = {} - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callAddTrialMeasurement() { - // Construct request - const request = { - trialName, - measurement, - }; - - // Run request - const response = await aiplatformClient.addTrialMeasurement(request); - console.log(response); - } - - callAddTrialMeasurement(); - // [END aiplatform_v1beta1_generated_VizierService_AddTrialMeasurement_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.check_trial_early_stopping_state.js b/samples/generated/v1beta1/vizier_service.check_trial_early_stopping_state.js deleted file mode 100644 index 27989052..00000000 --- a/samples/generated/v1beta1/vizier_service.check_trial_early_stopping_state.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(trialName) { - // [START aiplatform_v1beta1_generated_VizierService_CheckTrialEarlyStoppingState_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Trial's name. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const trialName = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callCheckTrialEarlyStoppingState() { - // Construct request - const request = { - trialName, - }; - - // Run request - const [operation] = await aiplatformClient.checkTrialEarlyStoppingState(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCheckTrialEarlyStoppingState(); - // [END aiplatform_v1beta1_generated_VizierService_CheckTrialEarlyStoppingState_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.complete_trial.js b/samples/generated/v1beta1/vizier_service.complete_trial.js deleted file mode 100644 index fc2447df..00000000 --- a/samples/generated/v1beta1/vizier_service.complete_trial.js +++ /dev/null @@ -1,79 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_VizierService_CompleteTrial_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Trial's name. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const name = 'abc123' - /** - * Optional. If provided, it will be used as the completed Trial's - * final_measurement; Otherwise, the service will auto-select a - * previously reported measurement as the final-measurement - */ - // const finalMeasurement = {} - /** - * Optional. True if the Trial cannot be run with the given Parameter, and - * final_measurement will be ignored. - */ - // const trialInfeasible = true - /** - * Optional. A human readable reason why the trial was infeasible. This should - * only be provided if `trial_infeasible` is true. - */ - // const infeasibleReason = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callCompleteTrial() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.completeTrial(request); - console.log(response); - } - - callCompleteTrial(); - // [END aiplatform_v1beta1_generated_VizierService_CompleteTrial_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.create_study.js b/samples/generated/v1beta1/vizier_service.create_study.js deleted file mode 100644 index f6cdaba4..00000000 --- a/samples/generated/v1beta1/vizier_service.create_study.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, study) { - // [START aiplatform_v1beta1_generated_VizierService_CreateStudy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to create the CustomJob in. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The Study configuration used to create the Study. - */ - // const study = {} - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callCreateStudy() { - // Construct request - const request = { - parent, - study, - }; - - // Run request - const response = await aiplatformClient.createStudy(request); - console.log(response); - } - - callCreateStudy(); - // [END aiplatform_v1beta1_generated_VizierService_CreateStudy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.create_trial.js b/samples/generated/v1beta1/vizier_service.create_trial.js deleted file mode 100644 index f8afe5b1..00000000 --- a/samples/generated/v1beta1/vizier_service.create_trial.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, trial) { - // [START aiplatform_v1beta1_generated_VizierService_CreateTrial_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Study to create the Trial in. - * Format: `projects/{project}/locations/{location}/studies/{study}` - */ - // const parent = 'abc123' - /** - * Required. The Trial to create. - */ - // const trial = {} - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callCreateTrial() { - // Construct request - const request = { - parent, - trial, - }; - - // Run request - const response = await aiplatformClient.createTrial(request); - console.log(response); - } - - callCreateTrial(); - // [END aiplatform_v1beta1_generated_VizierService_CreateTrial_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.delete_study.js b/samples/generated/v1beta1/vizier_service.delete_study.js deleted file mode 100644 index 8ff5fcdc..00000000 --- a/samples/generated/v1beta1/vizier_service.delete_study.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_VizierService_DeleteStudy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Study resource to be deleted. - * Format: `projects/{project}/locations/{location}/studies/{study}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callDeleteStudy() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.deleteStudy(request); - console.log(response); - } - - callDeleteStudy(); - // [END aiplatform_v1beta1_generated_VizierService_DeleteStudy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.delete_trial.js b/samples/generated/v1beta1/vizier_service.delete_trial.js deleted file mode 100644 index b33de2c3..00000000 --- a/samples/generated/v1beta1/vizier_service.delete_trial.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_VizierService_DeleteTrial_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Trial's name. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callDeleteTrial() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.deleteTrial(request); - console.log(response); - } - - callDeleteTrial(); - // [END aiplatform_v1beta1_generated_VizierService_DeleteTrial_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.get_study.js b/samples/generated/v1beta1/vizier_service.get_study.js deleted file mode 100644 index 0eccef49..00000000 --- a/samples/generated/v1beta1/vizier_service.get_study.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_VizierService_GetStudy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Study resource. - * Format: `projects/{project}/locations/{location}/studies/{study}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callGetStudy() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getStudy(request); - console.log(response); - } - - callGetStudy(); - // [END aiplatform_v1beta1_generated_VizierService_GetStudy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.get_trial.js b/samples/generated/v1beta1/vizier_service.get_trial.js deleted file mode 100644 index d1ff22d3..00000000 --- a/samples/generated/v1beta1/vizier_service.get_trial.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_VizierService_GetTrial_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Trial resource. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callGetTrial() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.getTrial(request); - console.log(response); - } - - callGetTrial(); - // [END aiplatform_v1beta1_generated_VizierService_GetTrial_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.list_optimal_trials.js b/samples/generated/v1beta1/vizier_service.list_optimal_trials.js deleted file mode 100644 index dcd6452d..00000000 --- a/samples/generated/v1beta1/vizier_service.list_optimal_trials.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_VizierService_ListOptimalTrials_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Study that the optimal Trial belongs to. - */ - // const parent = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callListOptimalTrials() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await aiplatformClient.listOptimalTrials(request); - console.log(response); - } - - callListOptimalTrials(); - // [END aiplatform_v1beta1_generated_VizierService_ListOptimalTrials_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.list_studies.js b/samples/generated/v1beta1/vizier_service.list_studies.js deleted file mode 100644 index b61e2496..00000000 --- a/samples/generated/v1beta1/vizier_service.list_studies.js +++ /dev/null @@ -1,74 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_VizierService_ListStudies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to list the Study from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. A page token to request the next page of results. - * If unspecified, there are no subsequent pages. - */ - // const pageToken = 'abc123' - /** - * Optional. The maximum number of studies to return per "page" of results. - * If unspecified, service will pick an appropriate default. - */ - // const pageSize = 1234 - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callListStudies() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listStudiesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListStudies(); - // [END aiplatform_v1beta1_generated_VizierService_ListStudies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.list_trials.js b/samples/generated/v1beta1/vizier_service.list_trials.js deleted file mode 100644 index ad56495e..00000000 --- a/samples/generated/v1beta1/vizier_service.list_trials.js +++ /dev/null @@ -1,74 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START aiplatform_v1beta1_generated_VizierService_ListTrials_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Study to list the Trial from. - * Format: `projects/{project}/locations/{location}/studies/{study}` - */ - // const parent = 'abc123' - /** - * Optional. A page token to request the next page of results. - * If unspecified, there are no subsequent pages. - */ - // const pageToken = 'abc123' - /** - * Optional. The number of Trials to retrieve per "page" of results. - * If unspecified, the service will pick an appropriate default. - */ - // const pageSize = 1234 - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callListTrials() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await aiplatformClient.listTrialsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTrials(); - // [END aiplatform_v1beta1_generated_VizierService_ListTrials_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.lookup_study.js b/samples/generated/v1beta1/vizier_service.lookup_study.js deleted file mode 100644 index c77ec93a..00000000 --- a/samples/generated/v1beta1/vizier_service.lookup_study.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, displayName) { - // [START aiplatform_v1beta1_generated_VizierService_LookupStudy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location to get the Study from. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The user-defined display name of the Study - */ - // const displayName = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callLookupStudy() { - // Construct request - const request = { - parent, - displayName, - }; - - // Run request - const response = await aiplatformClient.lookupStudy(request); - console.log(response); - } - - callLookupStudy(); - // [END aiplatform_v1beta1_generated_VizierService_LookupStudy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.stop_trial.js b/samples/generated/v1beta1/vizier_service.stop_trial.js deleted file mode 100644 index e0ae4bc4..00000000 --- a/samples/generated/v1beta1/vizier_service.stop_trial.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START aiplatform_v1beta1_generated_VizierService_StopTrial_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Trial's name. - * Format: - * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}` - */ - // const name = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callStopTrial() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await aiplatformClient.stopTrial(request); - console.log(response); - } - - callStopTrial(); - // [END aiplatform_v1beta1_generated_VizierService_StopTrial_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/vizier_service.suggest_trials.js b/samples/generated/v1beta1/vizier_service.suggest_trials.js deleted file mode 100644 index 7d8cbc0e..00000000 --- a/samples/generated/v1beta1/vizier_service.suggest_trials.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, suggestionCount, clientId) { - // [START aiplatform_v1beta1_generated_VizierService_SuggestTrials_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location that the Study belongs to. - * Format: `projects/{project}/locations/{location}/studies/{study}` - */ - // const parent = 'abc123' - /** - * Required. The number of suggestions requested. It must be positive. - */ - // const suggestionCount = 1234 - /** - * Required. The identifier of the client that is requesting the suggestion. - * If multiple SuggestTrialsRequests have the same `client_id`, - * the service will return the identical suggested Trial if the Trial is - * pending, and provide a new Trial if the last suggested Trial was completed. - */ - // const clientId = 'abc123' - - // Imports the Aiplatform library - const {VizierServiceClient} = require('@google-cloud/aiplatform').v1beta1; - - // Instantiates a client - const aiplatformClient = new VizierServiceClient(); - - async function callSuggestTrials() { - // Construct request - const request = { - parent, - suggestionCount, - clientId, - }; - - // Run request - const [operation] = await aiplatformClient.suggestTrials(request); - const [response] = await operation.promise(); - console.log(response); - } - - callSuggestTrials(); - // [END aiplatform_v1beta1_generated_VizierService_SuggestTrials_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/get-batch-prediction-job.js b/samples/get-batch-prediction-job.js deleted file mode 100644 index a263b9e1..00000000 --- a/samples/get-batch-prediction-job.js +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ -'use strict'; - -async function main(batchPredictionJobId, project, location = 'us-central1') { - // [START aiplatform_get_batch_prediction_job_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const batchPredictionJobId = 'YOUR_BATCH_PREDICTION_JOB_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function getBatchPredictionJob() { - // Configure the parent resource - const name = `projects/${project}/locations/${location}/batchPredictionJobs/${batchPredictionJobId}`; - const request = { - name, - }; - - // Get batch prediction request - const [response] = await jobServiceClient.getBatchPredictionJob(request); - - console.log('Get batch prediction job response'); - console.log(`\tName : ${response.name}`); - console.log(`\tDisplayName : ${response.displayName}`); - console.log(`\tModel : ${response.model}`); - console.log(`\tModel parameters : ${response.modelParameters}`); - console.log(`\tGenerate explanation : ${response.generateExplanation}`); - console.log(`\tState : ${response.state}`); - console.log(`\tCreate Time : ${JSON.stringify(response.createTime)}`); - console.log(`\tStart Time : ${JSON.stringify(response.startTime)}`); - console.log(`\tEnd Time : ${JSON.stringify(response.endTime)}`); - console.log(`\tUpdate Time : ${JSON.stringify(response.updateTime)}`); - console.log(`\tLabels : ${JSON.stringify(response.labels)}`); - - const inputConfig = response.inputConfig; - console.log('\tInput config'); - console.log(`\t\tInstances format : ${inputConfig.instancesFormat}`); - - const gcsSource = inputConfig.gcsSource; - console.log('\t\tGcs source'); - console.log(`\t\t\tUris : ${gcsSource.uris}`); - - const bigquerySource = inputConfig.bigquerySource; - console.log('\t\tBigQuery Source'); - if (!bigquerySource) { - console.log('\t\t\tInput Uri : {}'); - } else { - console.log(`\t\t\tInput Uri : ${bigquerySource.inputUri}`); - } - - const outputConfig = response.outputConfig; - console.log('\t\tOutput config'); - console.log(`\t\tPredictions format : ${outputConfig.predictionsFormat}`); - - const gcsDestination = outputConfig.gcsDestination; - console.log('\t\tGcs Destination'); - console.log(`\t\t\tOutput uri prefix : ${gcsDestination.outputUriPrefix}`); - - const bigqueryDestination = outputConfig.bigqueryDestination; - if (!bigqueryDestination) { - console.log('\t\tBigquery Destination'); - console.log('\t\t\tOutput uri : {}'); - } else { - console.log('\t\tBigquery Destination'); - console.log(`\t\t\tOutput uri : ${bigqueryDestination.outputUri}`); - } - - const outputInfo = response.outputInfo; - if (!outputInfo) { - console.log('\tOutput info'); - console.log('\t\tGcs output directory : {}'); - console.log('\t\tBigquery_output_dataset : {}'); - } else { - console.log('\tOutput info'); - console.log( - `\t\tGcs output directory : ${outputInfo.gcsOutputDirectory}` - ); - console.log(`\t\tBigquery_output_dataset : - ${outputInfo.bigqueryOutputDataset}`); - } - - const error = response.error; - console.log('\tError'); - console.log(`\t\tCode : ${error.code}`); - console.log(`\t\tMessage : ${error.message}`); - - const details = error.details; - console.log(`\t\tDetails : ${details}`); - - const partialFailures = response.partialFailures; - console.log('\tPartial failure'); - console.log(partialFailures); - - const resourcesConsumed = response.resourcesConsumed; - console.log('\tResource consumed'); - if (!resourcesConsumed) { - console.log('\t\tReplica Hours: {}'); - } else { - console.log(`\t\tReplica Hours: ${resourcesConsumed.replicaHours}`); - } - - const completionStats = response.completionStats; - console.log('\tCompletion status'); - if (!completionStats) { - console.log('\t\tSuccessful count: {}'); - console.log('\t\tFailed count: {}'); - console.log('\t\tIncomplete count: {}'); - } else { - console.log(`\t\tSuccessful count: ${completionStats.successfulCount}`); - console.log(`\t\tFailed count: ${completionStats.failedCount}`); - console.log(`\t\tIncomplete count: ${completionStats.incompleteCount}`); - } - } - getBatchPredictionJob(); - // [END aiplatform_get_batch_prediction_job_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-custom-job.js b/samples/get-custom-job.js deleted file mode 100644 index 7589a725..00000000 --- a/samples/get-custom-job.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(customJobId, project, location = 'us-central1') { - // [START aiplatform_get_custom_job_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - */ - - // const customJobId = 'YOUR_CUSTOM_JOB_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Job Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function getCustomJob() { - // Configure the name resource - const name = `projects/${project}/locations/${location}/customJobs/${customJobId}`; - const request = { - name, - }; - - // Get custom job request - const [response] = await jobServiceClient.getCustomJob(request); - - console.log('Get custom job response'); - console.log(`\t${JSON.stringify(response)}`); - } - getCustomJob(); - // [END aiplatform_get_custom_job_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-entity-type-sample.js b/samples/get-entity-type-sample.js deleted file mode 100644 index 7123bb34..00000000 --- a/samples/get-entity-type-sample.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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 - * - * https://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 EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 5000 -) { - // [START aiplatform_get_entity_type_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function getEntityType() { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const request = { - name: name, - }; - - // Get EntityType request - const [response] = await featurestoreServiceClient.getEntityType(request, { - timeout: Number(timeout), - }); - - console.log('Get entity type response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - getEntityType(); - // [END aiplatform_get_entity_type_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-feature-sample.js b/samples/get-feature-sample.js deleted file mode 100644 index e89fcdc3..00000000 --- a/samples/get-feature-sample.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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 - * - * https://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 Feature. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - featureId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_get_feature_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const featureId = 'YOUR_FEATURE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function getFeature() { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}/features/${featureId}`; - - const request = { - name: name, - }; - - // Get Feature request - const [response] = await featurestoreServiceClient.getFeature(request, { - timeout: Number(timeout), - }); - - console.log('Get feature response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - getFeature(); - // [END aiplatform_get_feature_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-featurestore-sample.js b/samples/get-featurestore-sample.js deleted file mode 100644 index fe6e38f3..00000000 --- a/samples/get-featurestore-sample.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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 - * - * https://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 - */ - -'use strict'; - -async function main( - project, - featurestoreId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 5000 -) { - // [START aiplatform_get_featurestore_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function getFeaturestore() { - // Configure the parent resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const request = { - name: name, - }; - - // Get Featurestore request - const [response] = await featurestoreServiceClient.getFeaturestore( - request, - {timeout: Number(timeout)} - ); - - console.log('Get featurestore response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - getFeaturestore(); - // [END aiplatform_get_featurestore_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-hyperparameter-tuning-job.js b/samples/get-hyperparameter-tuning-job.js deleted file mode 100644 index 9331f0d9..00000000 --- a/samples/get-hyperparameter-tuning-job.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -async function main(tuningJobId, project, location = 'us-central1') { - // [START aiplatform_get_hyperparameter_tuning_job_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const tuningJobId = 'YOUR_TUNING_JOB_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {JobServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const jobServiceClient = new JobServiceClient(clientOptions); - - async function getHyperparameterTuningJob() { - // Configure the parent resource - const name = jobServiceClient.hyperparameterTuningJobPath( - project, - location, - tuningJobId - ); - const request = { - name, - }; - // Get and print out a list of all the endpoints for this resource - const [response] = await jobServiceClient.getHyperparameterTuningJob( - request - ); - - console.log('Get hyperparameter tuning job response'); - console.log(`\tDisplay name: ${response.displayName}`); - console.log(`\tTuning job resource name: ${response.name}`); - console.log(`\tJob status: ${response.state}`); - } - getHyperparameterTuningJob(); - // [END aiplatform_get_hyperparameter_tuning_job_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-image-classification.js b/samples/get-model-evaluation-image-classification.js deleted file mode 100644 index 0b67c1cf..00000000 --- a/samples/get-model-evaluation-image-classification.js +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_image_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationImageClassification() { - // Configure the name resources - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - name, - }; - - // Create get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation image classification response'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tMetrics : ${JSON.stringify(response.metrics)}`); - console.log(`\tCreate time : ${JSON.stringify(response.createTime)}`); - console.log(`\tSlice dimensions : ${response.sliceDimensions}`); - - const modelExplanation = response.modelExplanation; - if (modelExplanation === null) { - console.log(`\tModel explanation: ${JSON.stringify(modelExplanation)}`); - } else { - const meanAttributions = modelExplanation.meanAttributions; - for (const meanAttribution of meanAttributions) { - console.log('\t\tMean attribution'); - console.log( - `\t\t\tBaseline output value : \ - ${meanAttribution.baselineOutputValue}` - ); - console.log( - `\t\t\tInstance output value : \ - ${meanAttribution.instanceOutputValue}` - ); - console.log( - `\t\t\tFeature attributions : \ - ${JSON.stringify(meanAttribution.featureAttributions)}` - ); - console.log(`\t\t\tOutput index : ${meanAttribution.outputIndex}`); - console.log( - `\t\t\tOutput display name : \ - ${meanAttribution.outputDisplayName}` - ); - console.log( - `\t\t\tApproximation error : \ - ${meanAttribution.approximationError}` - ); - } - } - } - getModelEvaluationImageClassification(); - // [END aiplatform_get_model_evaluation_image_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-image-object-detection.js b/samples/get-model-evaluation-image-object-detection.js deleted file mode 100644 index fc60fc7a..00000000 --- a/samples/get-model-evaluation-image-object-detection.js +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_image_object_detection_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationImageObjectDetection() { - // Configure the name resources - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - name, - }; - - // Create get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation image object detection response'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tCreate time : ${JSON.stringify(response.createTime)}`); - console.log(`\tSlice dimensions : ${response.sliceDimensions}`); - - const modelExplanation = response.modelExplanation; - console.log('\tModel explanation'); - if (modelExplanation === null) { - console.log('\t\t{}'); - } else { - const meanAttributions = modelExplanation.meanAttributions; - if (meanAttributions === null) { - console.log('\t\t\t []'); - } else { - for (const meanAttribution of meanAttributions) { - console.log('\t\tMean attribution'); - console.log( - `\t\t\tBaseline output value : \ - ${meanAttribution.baselineOutputValue}` - ); - console.log( - `\t\t\tInstance output value : \ - ${meanAttribution.instanceOutputValue}` - ); - console.log( - `\t\t\tFeature attributions : \ - ${meanAttribution.featureAttributions}` - ); - console.log(`\t\t\tOutput index : ${meanAttribution.outputIndex}`); - console.log( - `\t\t\tOutput display name : \ - ${meanAttribution.outputDisplayName}` - ); - console.log( - `\t\t\tApproximation error : \ - ${meanAttribution.approximationError}` - ); - } - } - } - } - getModelEvaluationImageObjectDetection(); - // [END aiplatform_get_model_evaluation_image_object_detection_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-slice.js b/samples/get-model-evaluation-slice.js deleted file mode 100644 index e31d60c3..00000000 --- a/samples/get-model-evaluation-slice.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - modelId, - evaluationId, - sliceId, - project, - location = 'us-central1' -) { - // [START aiplatform_get_model_evaluation_slice_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const sliceId = 'YOUR_SLICE_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - // Specifies the location of the api endpoint - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationSlice() { - // Configure the parent resource - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}/slices/${sliceId}`; - const request = { - name, - }; - - // Get and print out a list of all the endpoints for this resource - const [response] = await modelServiceClient.getModelEvaluationSlice( - request - ); - - console.log('Get model evaluation slice'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics_Schema_Uri : ${response.metricsSchemaUri}`); - console.log(`\tMetrics : ${JSON.stringify(response.metrics)}`); - console.log(`\tCreate time : ${JSON.stringify(response.createTime)}`); - - console.log('Slice'); - const slice = response.slice; - console.log(`\tDimension :${slice.dimension}`); - console.log(`\tValue :${slice.value}`); - } - getModelEvaluationSlice(); - // [END aiplatform_get_model_evaluation_slice_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-tabular-classification.js b/samples/get-model-evaluation-tabular-classification.js deleted file mode 100644 index 63f0c98c..00000000 --- a/samples/get-model-evaluation-tabular-classification.js +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_tabular_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationTabularClassification() { - // Configure the parent resources - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - name, - }; - - // Get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation tabular classification response'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tMetrics : ${JSON.stringify(response.metrics)}`); - console.log(`\tCreate time : ${JSON.stringify(response.createTime)}`); - console.log(`\tSlice dimensions : ${response.sliceDimensions}`); - - const modelExplanation = response.modelExplanation; - console.log('\tModel explanation'); - if (!modelExplanation) { - console.log('\t\t{}'); - } else { - const meanAttributions = modelExplanation.meanAttributions; - if (!meanAttributions) { - console.log('\t\t\t []'); - } else { - for (const meanAttribution of meanAttributions) { - console.log('\t\tMean attribution'); - console.log( - `\t\t\tBaseline output value : \ - ${meanAttribution.baselineOutputValue}` - ); - console.log( - `\t\t\tInstance output value : \ - ${meanAttribution.instanceOutputValue}` - ); - console.log( - `\t\t\tFeature attributions : \ - ${JSON.stringify(meanAttribution.featureAttributions)}` - ); - console.log(`\t\t\tOutput index : ${meanAttribution.outputIndex}`); - console.log( - `\t\t\tOutput display name : \ - ${meanAttribution.outputDisplayName}` - ); - console.log( - `\t\t\tApproximation error : \ - ${meanAttribution.approximationError}` - ); - } - } - } - } - getModelEvaluationTabularClassification(); - // [END aiplatform_get_model_evaluation_tabular_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-tabular-regression.js b/samples/get-model-evaluation-tabular-regression.js deleted file mode 100644 index 55766745..00000000 --- a/samples/get-model-evaluation-tabular-regression.js +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_tabular_regression_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationTabularRegression() { - // Configure the parent resources - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - name, - }; - - // Get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation tabular regression response'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tMetrics : ${JSON.stringify(response.metrics)}`); - console.log(`\tCreate time : ${JSON.stringify(response.createTime)}`); - console.log(`\tSlice dimensions : ${response.sliceDimensions}`); - - const modelExplanation = response.modelExplanation; - console.log('\tModel explanation'); - if (!modelExplanation) { - console.log('\t\t{}'); - } else { - const meanAttributions = modelExplanation.meanAttributions; - if (!meanAttributions) { - console.log('\t\t\t []'); - } else { - for (const meanAttribution of meanAttributions) { - console.log('\t\tMean attribution'); - console.log( - `\t\t\tBaseline output value : \ - ${meanAttribution.baselineOutputValue}` - ); - console.log( - `\t\t\tInstance output value : \ - ${meanAttribution.instanceOutputValue}` - ); - console.log( - `\t\t\tFeature attributions : \ - ${JSON.stringify(meanAttribution.featureAttributions)}` - ); - console.log(`\t\t\tOutput index : ${meanAttribution.outputIndex}`); - console.log( - `\t\t\tOutput display name : \ - ${meanAttribution.outputDisplayName}` - ); - console.log( - `\t\t\tApproximation error : \ - ${meanAttribution.approximationError}` - ); - } - } - } - } - getModelEvaluationTabularRegression(); - // [END aiplatform_get_model_evaluation_tabular_regression_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-text-classification.js b/samples/get-model-evaluation-text-classification.js deleted file mode 100644 index bb28b0a2..00000000 --- a/samples/get-model-evaluation-text-classification.js +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_text_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationTextClassification() { - // Configure the resources - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - name, - }; - - // Get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation text classification response :'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tMetrics : ${JSON.stringify(response.metrics)}`); - - const modelExplanation = response.modelExplanation; - console.log('\tModel explanation'); - if (modelExplanation === null) { - console.log('\t\t{}'); - } else { - const meanAttributions = modelExplanation.meanAttributions; - if (meanAttributions === null) { - console.log('\t\t\t []'); - } else { - for (const meanAttribution of meanAttributions) { - console.log('\t\tMean attribution'); - console.log( - `\t\t\tBaseline output value : \ - ${meanAttribution.baselineOutputValue}` - ); - console.log( - `\t\t\tInstance output value : \ - ${meanAttribution.instanceOutputValue}` - ); - console.log( - `\t\t\tFeature attributions : \ - ${JSON.stringify(meanAttribution.featureAttributions)}` - ); - console.log(`\t\t\tOutput index : ${meanAttribution.outputIndex}`); - console.log( - `\t\t\tOutput display name : \ - ${meanAttribution.outputDisplayName}` - ); - console.log( - `\t\t\tApproximation error : \ - ${meanAttribution.approximationError}` - ); - } - } - } - } - getModelEvaluationTextClassification(); - // [END aiplatform_get_model_evaluation_text_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-text-entity-extraction.js b/samples/get-model-evaluation-text-entity-extraction.js deleted file mode 100644 index b5182362..00000000 --- a/samples/get-model-evaluation-text-entity-extraction.js +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_text_entity_extraction_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationTextEntityExtraction() { - // Configure the resources - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - name, - }; - - // Get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation text entity extraction response :'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tMetrics : ${JSON.stringify(response.metrics)}`); - - const modelExplanation = response.modelExplanation; - console.log('\tModel explanation'); - if (modelExplanation === null) { - console.log('\t\t{}'); - } else { - const meanAttributions = modelExplanation.meanAttributions; - if (meanAttributions === null) { - console.log('\t\t\t []'); - } else { - for (const meanAttribution of meanAttributions) { - console.log('\t\tMean attribution'); - console.log( - `\t\t\tBaseline output value : \ - ${meanAttribution.baselineOutputValue}` - ); - console.log( - `\t\t\tInstance output value : \ - ${meanAttribution.instanceOutputValue}` - ); - console.log( - `\t\t\tFeature attributions : \ - ${JSON.stringify(meanAttribution.featureAttributions)}` - ); - console.log(`\t\t\tOutput index : ${meanAttribution.outputIndex}`); - console.log( - `\t\t\tOutput display name : \ - ${meanAttribution.outputDisplayName}` - ); - console.log( - `\t\t\tApproximation error : \ - ${meanAttribution.approximationError}` - ); - } - } - } - } - getModelEvaluationTextEntityExtraction(); - // [END aiplatform_get_model_evaluation_text_entity_extraction_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-text-sentiment-analysis.js b/samples/get-model-evaluation-text-sentiment-analysis.js deleted file mode 100644 index 09565191..00000000 --- a/samples/get-model-evaluation-text-sentiment-analysis.js +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_text_sentiment_analysis_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationTextSentimentAnalysis() { - // Configure the resources - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - name, - }; - - // Get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation text sentiment analysis response :'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tMetrics : ${JSON.stringify(response.metrics)}`); - - const modelExplanation = response.modelExplanation; - console.log('\tModel explanation'); - if (modelExplanation === null) { - console.log('\t\t{}'); - } else { - const meanAttributions = modelExplanation.meanAttributions; - if (meanAttributions === null) { - console.log('\t\t\t []'); - } else { - for (const meanAttribution of meanAttributions) { - console.log('\t\tMean attribution'); - console.log( - `\t\t\tBaseline output value : \ - ${meanAttribution.baselineOutputValue}` - ); - console.log( - `\t\t\tInstance output value : \ - ${meanAttribution.instanceOutputValue}` - ); - console.log( - `\t\t\tFeature attributions : \ - ${JSON.stringify(meanAttribution.featureAttributions)}` - ); - console.log(`\t\t\tOutput index : ${meanAttribution.outputIndex}`); - console.log( - `\t\t\tOutput display name : \ - ${meanAttribution.outputDisplayName}` - ); - console.log( - `\t\t\tApproximation error : \ - ${meanAttribution.approximationError}` - ); - } - } - } - } - getModelEvaluationTextSentimentAnalysis(); - // [END aiplatform_get_model_evaluation_text_sentiment_analysis_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-video-action-recognition.js b/samples/get-model-evaluation-video-action-recognition.js deleted file mode 100644 index 8b67cc9f..00000000 --- a/samples/get-model-evaluation-video-action-recognition.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_video_action_recognition_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationVideoActionRecognition() { - // Configure the parent resources - const name = modelServiceClient.modelEvaluationPath( - project, - location, - modelId, - evaluationId - ); - const request = { - name, - }; - - // Create get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation video action recognition response'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tMetrics : ${JSON.stringify(response.metrics)}`); - console.log(`\tCreate time : ${JSON.stringify(response.createTime)}`); - console.log(`\tSlice dimensions : ${response.sliceDimensions}`); - } - getModelEvaluationVideoActionRecognition(); - // [END aiplatform_get_model_evaluation_video_action_recognition_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-video-classification.js b/samples/get-model-evaluation-video-classification.js deleted file mode 100644 index 2a98fa36..00000000 --- a/samples/get-model-evaluation-video-classification.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_video_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationVideoClassification() { - // Configure the parent resources - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - name, - }; - - // Create get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation video classification response'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tMetrics : ${JSON.stringify(response.metrics)}`); - console.log(`\tCreate time : ${JSON.stringify(response.createTime)}`); - console.log(`\tSlice dimensions : ${response.sliceDimensions}`); - } - getModelEvaluationVideoClassification(); - // [END aiplatform_get_model_evaluation_video_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation-video-object-tracking.js b/samples/get-model-evaluation-video-object-tracking.js deleted file mode 100644 index 76198ce5..00000000 --- a/samples/get-model-evaluation-video-object-tracking.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_video_object_tracking_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluationVideoObjectTracking() { - // Configure the parent resources - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - name, - }; - - // Create get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation video object tracking response'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tMetrics : ${JSON.stringify(response.metrics)}`); - console.log(`\tCreate time : ${JSON.stringify(response.createTime)}`); - console.log(`\tSlice dimensions : ${response.sliceDimensions}`); - } - getModelEvaluationVideoObjectTracking(); - // [END aiplatform_get_model_evaluation_video_object_tracking_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model-evaluation.js b/samples/get-model-evaluation.js deleted file mode 100644 index c8a4a8f4..00000000 --- a/samples/get-model-evaluation.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_get_model_evaluation_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - (Not necessary if passing values as arguments) - */ - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModelEvaluation() { - // Configure the parent resources - const name = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - name, - }; - - // Create get model evaluation request - const [response] = await modelServiceClient.getModelEvaluation(request); - - console.log('Get model evaluation response'); - console.log(`\tName : ${response.name}`); - console.log(`\tMetrics schema uri : ${response.metricsSchemaUri}`); - console.log(`\tCreate time : ${JSON.stringify(response.createTime)}`); - console.log(`\tSlice dimensions : ${response.sliceDimensions}`); - } - getModelEvaluation(); - // [END aiplatform_get_model_evaluation_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-model.js b/samples/get-model.js deleted file mode 100644 index 5723c278..00000000 --- a/samples/get-model.js +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, project, location = 'us-central1') { - // [START aiplatform_get_model_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const modelId = 'YOUR_MODEL_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function getModel() { - // Configure the parent resource - const name = `projects/${project}/locations/${location}/models/${modelId}`; - const request = { - name, - }; - // Get and print out a list of all the endpoints for this resource - const [response] = await modelServiceClient.getModel(request); - - console.log('Get model response'); - console.log(`\tName : ${response.name}`); - console.log(`\tDisplayName : ${response.displayName}`); - console.log(`\tDescription : ${response.description}`); - console.log(`\tMetadata schema uri : ${response.metadataSchemaUri}`); - console.log(`\tMetadata : ${JSON.stringify(response.metadata)}`); - console.log(`\tTraining pipeline : ${response.trainingPipeline}`); - console.log(`\tArtifact uri : ${response.artifactUri}`); - console.log( - `\tSupported deployment resource types : \ - ${response.supportedDeploymentResourceTypes}` - ); - console.log( - `\tSupported input storage formats : \ - ${response.supportedInputStorageFormats}` - ); - console.log( - `\tSupported output storage formats : \ - ${response.supportedOutputStoragFormats}` - ); - console.log(`\tCreate time : ${JSON.stringify(response.createTime)}`); - console.log(`\tUpdate time : ${JSON.stringify(response.updateTime)}`); - console.log(`\tLabels : ${JSON.stringify(response.labels)}`); - - const predictSchemata = response.predictSchemata; - console.log('\tPredict schemata'); - console.log(`\tInstance schema uri : ${predictSchemata.instanceSchemaUri}`); - console.log( - `\tParameters schema uri : ${predictSchemata.prametersSchemaUri}` - ); - console.log( - `\tPrediction schema uri : ${predictSchemata.predictionSchemaUri}` - ); - - const [supportedExportFormats] = response.supportedExportFormats; - console.log('\tSupported export formats'); - console.log(`\t${supportedExportFormats}`); - - const containerSpec = response.containerSpec; - console.log('\tContainer Spec'); - if (!containerSpec) { - console.log(`\t\t${JSON.stringify(containerSpec)}`); - console.log('\t\tImage uri : {}'); - console.log('\t\tCommand : {}'); - console.log('\t\tArgs : {}'); - console.log('\t\tPredict route : {}'); - console.log('\t\tHealth route : {}'); - console.log('\t\tEnv'); - console.log('\t\t\t{}'); - console.log('\t\tPort'); - console.log('\t\t{}'); - } else { - console.log(`\t\t${JSON.stringify(containerSpec)}`); - console.log(`\t\tImage uri : ${containerSpec.imageUri}`); - console.log(`\t\tCommand : ${containerSpec.command}`); - console.log(`\t\tArgs : ${containerSpec.args}`); - console.log(`\t\tPredict route : ${containerSpec.predictRoute}`); - console.log(`\t\tHealth route : ${containerSpec.healthRoute}`); - const env = containerSpec.env; - console.log('\t\tEnv'); - console.log(`\t\t\t${JSON.stringify(env)}`); - const ports = containerSpec.ports; - console.log('\t\tPort'); - console.log(`\t\t\t${JSON.stringify(ports)}`); - } - - const [deployedModels] = response.deployedModels; - console.log('\tDeployed models'); - console.log('\t\t', deployedModels); - } - getModel(); - // [END aiplatform_get_model_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/get-training-pipeline.js b/samples/get-training-pipeline.js deleted file mode 100644 index eca150c5..00000000 --- a/samples/get-training-pipeline.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -async function main(trainingPipelineId, project, location = 'us-central1') { - // [START aiplatform_get_training_pipeline_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const trainingPipelineId = 'YOUR_MODEL_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {PipelineServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const pipelineServiceClient = new PipelineServiceClient(clientOptions); - - async function getTrainingPipeline() { - // Configure the parent resource - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - const request = { - name, - }; - // Get and print out a list of all the endpoints for this resource - const [response] = await pipelineServiceClient.getTrainingPipeline(request); - - console.log('Get training pipeline response'); - console.log(`\tTraining pipeline name: ${response.displayName}`); - console.log(`\tTraining pipeline state: ${response.state}`); - } - getTrainingPipeline(); - // [END aiplatform_get_training_pipeline_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/import-data-image-classification.js b/samples/import-data-image-classification.js deleted file mode 100644 index a6571850..00000000 --- a/samples/import-data-image-classification.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - gcsSourceUri, - project, - location = 'us-central1' -) { - // [START aiplatform_import_data_image_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = "YOUR_DATASET_ID"; - // const gcsSourceUri = "YOUR_GCS_SOURCE_URI"; - // eg. "gs:////[file.csv/file.jsonl]" - // const project = "YOUR_PROJECT_ID"; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function importDataImageClassification() { - const name = datasetServiceClient.datasetPath(project, location, datasetId); - // Here we use only one import config with one source - const importConfigs = [ - { - gcsSource: {uris: [gcsSourceUri]}, - importSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/ioformat/image_classification_single_label_io_format_1.0.0.yaml', - }, - ]; - const request = { - name, - importConfigs, - }; - - // Create Import Data Request - const [response] = await datasetServiceClient.importData(request); - console.log(`Long running operation: ${response.name}`); - - // Wait for operation to complete - const [importDataResponse] = await response.promise(); - - console.log( - `Import data image classification response : \ - ${JSON.stringify(importDataResponse)}` - ); - } - importDataImageClassification(); - // [END aiplatform_import_data_image_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/import-data-image-object-detection.js b/samples/import-data-image-object-detection.js deleted file mode 100644 index fd974560..00000000 --- a/samples/import-data-image-object-detection.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - gcsSourceUri, - project, - location = 'us-central1' -) { - // [START aiplatform_import_data_image_object_detection_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = "YOUR_DATASET_ID"; - // const gcsSourceUri = "YOUR_GCS_SOURCE_URI"; - // eg. "gs:////[file.csv/file.jsonl]" - // const project = "YOUR_PROJECT_ID"; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function importDataImageObjectDetection() { - const name = datasetServiceClient.datasetPath(project, location, datasetId); - // Here we use only one import config with one source - const importConfigs = [ - { - gcsSource: {uris: [gcsSourceUri]}, - importSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/ioformat/image_bounding_box_io_format_1.0.0.yaml', - }, - ]; - const request = { - name, - importConfigs, - }; - - // Create Import Data Request - const [response] = await datasetServiceClient.importData(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - - console.log( - `Import data image object detection response : \ - ${JSON.stringify(response.result)}` - ); - } - importDataImageObjectDetection(); - // [END aiplatform_import_data_image_object_detection_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/import-data-text-classification-single-label.js b/samples/import-data-text-classification-single-label.js deleted file mode 100644 index 71140183..00000000 --- a/samples/import-data-text-classification-single-label.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - gcsSourceUri, - project, - location = 'us-central1' -) { - // [START aiplatform_import_data_text_classification_single_label_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = "YOUR_DATASET_ID"; - // const gcsSourceUri = "YOUR_GCS_SOURCE_URI"; - // eg. "gs:////[file.csv/file.jsonl]" - // const project = "YOUR_PROJECT_ID"; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function importDataTextClassificationSingleLabel() { - const name = datasetServiceClient.datasetPath(project, location, datasetId); - // Here we use only one import config with one source - const importConfigs = [ - { - gcsSource: {uris: [gcsSourceUri]}, - importSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/ioformat/text_classification_single_label_io_format_1.0.0.yaml', - }, - ]; - const request = { - name, - importConfigs, - }; - - // Import data request - const [response] = await datasetServiceClient.importData(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - const [importDataResponse] = await response.promise(); - - console.log( - `Import data text classification single label response : \ - ${JSON.stringify(importDataResponse.result)}` - ); - } - importDataTextClassificationSingleLabel(); - // [END aiplatform_import_data_text_classification_single_label_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/import-data-text-entity-extraction.js b/samples/import-data-text-entity-extraction.js deleted file mode 100644 index 743b3646..00000000 --- a/samples/import-data-text-entity-extraction.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - gcsSourceUri, - project, - location = 'us-central1' -) { - // [START aiplatform_import_data_text_entity_extraction_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - */ - - // const datasetId = "YOUR_DATASET_ID"; - // const gcsSourceUri = "YOUR_GCS_SOURCE_URI"; - // eg. "gs:////[file.csv/file.jsonl]" - // const project = "YOUR_PROJECT_ID"; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function importDataTextEntityExtraction() { - const name = datasetServiceClient.datasetPath(project, location, datasetId); - // Here we use only one import config with one source - const importConfigs = [ - { - gcsSource: {uris: [gcsSourceUri]}, - importSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/ioformat/text_extraction_io_format_1.0.0.yaml', - }, - ]; - const request = { - name, - importConfigs, - }; - - // Import data request - const [response] = await datasetServiceClient.importData(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - const [importDataResponse] = await response.promise(); - - console.log( - `Import data text entity extraction response : \ - ${JSON.stringify(importDataResponse.result)}` - ); - } - importDataTextEntityExtraction(); - // [END aiplatform_import_data_text_entity_extraction_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/import-data-text-sentiment-analysis.js b/samples/import-data-text-sentiment-analysis.js deleted file mode 100644 index c455fdb2..00000000 --- a/samples/import-data-text-sentiment-analysis.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - gcsSourceUri, - project, - location = 'us-central1' -) { - // [START aiplatform_import_data_text_sentiment_analysis_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - */ - - // const datasetId = "YOUR_DATASET_ID"; - // const gcsSourceUri = "YOUR_GCS_SOURCE_URI"; - // eg. "gs:////[file.csv/file.jsonl]" - // const project = "YOUR_PROJECT_ID"; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function importDataTextSentimentAnalysis() { - const name = datasetServiceClient.datasetPath(project, location, datasetId); - // Here we use only one import config with one source - const importConfigs = [ - { - gcsSource: {uris: [gcsSourceUri]}, - importSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/ioformat/text_sentiment_io_format_1.0.0.yaml', - }, - ]; - const request = { - name, - importConfigs, - }; - - // Import data request - const [response] = await datasetServiceClient.importData(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - const [importDataResponse] = await response.promise(); - - console.log( - `Import data text sentiment analysis response : \ - ${JSON.stringify(importDataResponse.result, null, 2)}` - ); - } - importDataTextSentimentAnalysis(); - // [END aiplatform_import_data_text_sentiment_analysis_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/import-data-video-action-recognition.js b/samples/import-data-video-action-recognition.js deleted file mode 100644 index 6c44cdc2..00000000 --- a/samples/import-data-video-action-recognition.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - gcsSourceUri, - project, - location = 'us-central1' -) { - // [START aiplatform_import_data_video_action_recognition_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const gcsSourceUri = 'YOUR_GCS_SOURCE_URI'; - // eg. 'gs:////[file.csv/file.jsonl]' - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function importDataVideoActionRecognition() { - const name = datasetServiceClient.datasetPath(project, location, datasetId); - // Here we use only one import config with one source - const importConfigs = [ - { - gcsSource: {uris: [gcsSourceUri]}, - importSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/ioformat/video_action_recognition_io_format_1.0.0.yaml', - }, - ]; - const request = { - name, - importConfigs, - }; - - // Create Import Data Request - const [response] = await datasetServiceClient.importData(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - - console.log( - `Import data video action recognition response : \ - ${JSON.stringify(response.result)}` - ); - } - importDataVideoActionRecognition(); - // [END aiplatform_import_data_video_action_recognition_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/import-data-video-classification.js b/samples/import-data-video-classification.js deleted file mode 100644 index 7439bb8c..00000000 --- a/samples/import-data-video-classification.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - gcsSourceUri, - project, - location = 'us-central1' -) { - // [START aiplatform_import_data_video_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const gcsSourceUri = 'YOUR_GCS_SOURCE_URI'; - // eg. 'gs:////[file.csv/file.jsonl]' - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function importDataVideoClassification() { - const name = datasetServiceClient.datasetPath(project, location, datasetId); - // Here we use only one import config with one source - const importConfigs = [ - { - gcsSource: {uris: [gcsSourceUri]}, - importSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/ioformat/video_classification_io_format_1.0.0.yaml', - }, - ]; - const request = { - name, - importConfigs, - }; - - // Create Import Data Request - const [response] = await datasetServiceClient.importData(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - - console.log( - `Import data video classification response : \ - ${JSON.stringify(response.result)}` - ); - } - importDataVideoClassification(); - // [END aiplatform_import_data_video_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/import-data-video-object-tracking.js b/samples/import-data-video-object-tracking.js deleted file mode 100644 index b447fa29..00000000 --- a/samples/import-data-video-object-tracking.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - gcsSourceUri, - project, - location = 'us-central1' -) { - // [START aiplatform_import_data_video_object_tracking_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - */ - - // const datasetId = 'YOUR_DATASET_ID'; - // const gcsSourceUri = 'YOUR_GCS_SOURCE_URI'; - // eg. 'gs:////[file.csv/file.jsonl]' - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function importDataVideoObjectTracking() { - const name = datasetServiceClient.datasetPath(project, location, datasetId); - // Here we use only one import config with one source - const importConfigs = [ - { - gcsSource: {uris: [gcsSourceUri]}, - importSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/ioformat/video_object_tracking_io_format_1.0.0.yaml', - }, - ]; - const request = { - name, - importConfigs, - }; - - // Create Import Data Request - const [response] = await datasetServiceClient.importData(request); - console.log(`Long running operation: ${JSON.stringify(response.name)}`); - - // Wait for operation to complete - const [importDataResponse] = await response.promise(); - - console.log( - `Import data video object tracking response : \ - ${JSON.stringify(importDataResponse)}` - ); - } - importDataVideoObjectTracking(); - // [END aiplatform_import_data_video_object_tracking_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/import-data.js b/samples/import-data.js deleted file mode 100644 index 4b9f46b0..00000000 --- a/samples/import-data.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - datasetId, - gcsSourceUri, - importSchemaUri, - project, - location = 'us-central1' -) { - // [START aiplatform_import_data_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - */ - - // const datasetId = "YOUR_DATASET_ID"; - // const gcsSourceUri = "YOUR_GCS_SOURCE_URI"; - // eg. "gs:////[file.csv/file.jsonl]" - // const importSchemaUri = "YOUR_IMPORT_SCHEMA_URI"; - // const project = "YOUR_PROJECT_ID"; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Dataset Service Client library - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - const datasetServiceClient = new DatasetServiceClient(clientOptions); - - async function importData() { - const name = datasetServiceClient.datasetPath(project, location, datasetId); - // Here we use only one import config with one source - const importConfigs = [ - { - gcsSource: {uris: [gcsSourceUri]}, - importSchemaUri: importSchemaUri, - }, - ]; - const request = { - name, - importConfigs, - }; - - // Create Import Data Request - const [response] = await datasetServiceClient.importData(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - - console.log(`Import data response : ${JSON.stringify(response.result)}`); - } - importData(); - // [END aiplatform_import_data_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/import-feature-values-sample.js b/samples/import-feature-values-sample.js deleted file mode 100644 index 01a174bf..00000000 --- a/samples/import-feature-values-sample.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Imports Feature values into the Featurestore from a source storage. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - avroGcsUri, - entityIdField, - featureTimeField, - workerCount = 2, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_import_feature_values_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const avroGcsUri = 'AVRO_FILE_IN_THE_GCS_URI'; - // const entityIdField = 'ENTITY_ID_FIELD_IN_AVRO'; - // const featureTimeField = 'TIMESTAMP_FIELD_IN_AVRO'; - // const workerCount = ; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function importFeatureValues() { - // Configure the entityType resource - const entityType = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const avroSource = { - gcsSource: { - uris: [avroGcsUri], - }, - }; - - const featureSpecs = [{id: 'age'}, {id: 'gender'}, {id: 'liked_genres'}]; - - const request = { - entityType: entityType, - avroSource: avroSource, - entityIdField: entityIdField, - featureSpecs: featureSpecs, - featureTimeField: featureTimeField, - workerCount: Number(workerCount), - }; - - // Import Feature Values Request - const [operation] = await featurestoreServiceClient.importFeatureValues( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Import feature values response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - importFeatureValues(); - // [END aiplatform_import_feature_values_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-endpoints.js b/samples/list-endpoints.js deleted file mode 100644 index 01e42591..00000000 --- a/samples/list-endpoints.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright 2020, 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. - */ - -'use strict'; - -async function main(projectId, location = 'us-central1') { - // [START aiplatform_list_endpoints_sample] - /** - * TODO(developer): Uncomment these variables before running the sample. - */ - // const projectId = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - const {EndpointServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - const client = new EndpointServiceClient(clientOptions); - - async function listEndpoints() { - // Configure the parent resource - const parent = `projects/${projectId}/locations/${location}`; - const request = { - parent, - }; - - // Get and print out a list of all the endpoints for this resource - const [result] = await client.listEndpoints(request); - for (const endpoint of result) { - console.log(`\nEndpoint name: ${endpoint.name}`); - console.log(`Display name: ${endpoint.displayName}`); - if (endpoint.deployedModels[0]) { - console.log( - `First deployed model: ${endpoint.deployedModels[0].model}` - ); - } - } - } - listEndpoints(); - // [END aiplatform_list_endpoints_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-entity-types-async-sample.js b/samples/list-entity-types-async-sample.js deleted file mode 100644 index c6b1c740..00000000 --- a/samples/list-entity-types-async-sample.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Lists EntityTypes Asynchronously in a given Featurestore. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 5000 -) { - // [START aiplatform_list_entity_types_async_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function listEntityTypesAsync() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const request = { - parent: parent, - }; - - // List EntityTypes Async request - const iterable = await featurestoreServiceClient.listEntityTypesAsync( - request, - {timeout: Number(timeout)} - ); - - console.log('List entity types async response'); - console.log('Raw response:'); - for await (const response of iterable) { - console.log(JSON.stringify(response, null, 2)); - } - } - listEntityTypesAsync(); - // [END aiplatform_list_entity_types_async_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-entity-types-sample.js b/samples/list-entity-types-sample.js deleted file mode 100644 index 716842a0..00000000 --- a/samples/list-entity-types-sample.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Lists EntityTypes in a given Featurestore. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 5000 -) { - // [START aiplatform_list_entity_types_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function listEntityTypes() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const request = { - parent: parent, - }; - - // List EntityTypes request - const [response] = await featurestoreServiceClient.listEntityTypes( - request, - {timeout: Number(timeout)} - ); - - console.log('List entity types response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - listEntityTypes(); - // [END aiplatform_list_entity_types_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-entity-types-stream-sample.js b/samples/list-entity-types-stream-sample.js deleted file mode 100644 index 5197d79f..00000000 --- a/samples/list-entity-types-stream-sample.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Lists EntityTypes using streaming in a given Featurestore. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 5000 -) { - // [START aiplatform_list_entity_types_stream_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function listEntityTypesStream() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const request = { - parent: parent, - }; - - // List EntityTypes stream request - const streamObject = await featurestoreServiceClient.listEntityTypesStream( - request, - {timeout: Number(timeout)} - ); - - console.log('List entity types stream response'); - console.log('Raw response:'); - streamObject.on('data', response => { - console.log(JSON.stringify(response, null, 2)); - }); - - streamObject.on('end', () => { - console.log('No more data to read'); - }); - - streamObject.on('close', () => { - console.log('Stream object listEntityTypesStream is closed'); - }); - } - listEntityTypesStream(); - // [END aiplatform_list_entity_types_stream_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-features-async-sample.js b/samples/list-features-async-sample.js deleted file mode 100644 index 5df6446f..00000000 --- a/samples/list-features-async-sample.js +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Lists Features Asynchronously in a given EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_list_features_async_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function listFeaturesAsync() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const request = { - parent: parent, - }; - - // List Features async request - const iterable = await featurestoreServiceClient.listFeaturesAsync( - request, - { - timeout: Number(timeout), - } - ); - - console.log('List features async response'); - console.log('Raw response:'); - for await (const response of iterable) { - console.log(JSON.stringify(response, null, 2)); - } - } - listFeaturesAsync(); - // [END aiplatform_list_features_async_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-features-sample.js b/samples/list-features-sample.js deleted file mode 100644 index da75bfdf..00000000 --- a/samples/list-features-sample.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Lists Features in a given EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_list_features_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function listFeatures() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const request = { - parent: parent, - }; - - // List Features request - const [response] = await featurestoreServiceClient.listFeatures(request, { - timeout: Number(timeout), - }); - - console.log('List features response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - listFeatures(); - // [END aiplatform_list_features_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-features-stream-sample.js b/samples/list-features-stream-sample.js deleted file mode 100644 index c85e3f54..00000000 --- a/samples/list-features-stream-sample.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Lists Features using streaming in a given EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_list_features_stream_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function listFeaturesStream() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const request = { - parent: parent, - }; - - // List Features stream request - const streamObject = await featurestoreServiceClient.listFeaturesStream( - request, - { - timeout: Number(timeout), - } - ); - - console.log('List features stream response'); - console.log('Raw response:'); - streamObject.on('data', response => { - console.log(JSON.stringify(response, null, 2)); - }); - - streamObject.on('end', () => { - console.log('No more data to read'); - }); - - streamObject.on('close', () => { - console.log('Stream object listFeaturesStream is closed'); - }); - } - listFeaturesStream(); - // [END aiplatform_list_features_stream_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-featurestores-async-sample.js b/samples/list-featurestores-async-sample.js deleted file mode 100644 index 16bbc8f7..00000000 --- a/samples/list-featurestores-async-sample.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Lists Featurestores asynchronously in a given project and location. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 5000 -) { - // [START aiplatform_list_featurestores_async_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function listFeaturestoresAsync() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const request = { - parent: parent, - }; - - // List featurestores async request - const iterable = await featurestoreServiceClient.listFeaturestoresAsync( - request, - {timeout: Number(timeout)} - ); - - console.log('List featurestores async response'); - console.log('Raw response:'); - for await (const response of iterable) { - console.log(JSON.stringify(response, null, 2)); - } - } - listFeaturestoresAsync(); - // [END aiplatform_list_featurestores_async_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-featurestores-sample.js b/samples/list-featurestores-sample.js deleted file mode 100644 index 1bacda43..00000000 --- a/samples/list-featurestores-sample.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Lists Featurestores in a given project and location. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 5000 -) { - // [START aiplatform_list_featurestores_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function listFeaturestores() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const request = { - parent: parent, - }; - - // List featurestores request - const [response] = await featurestoreServiceClient.listFeaturestores( - request, - {timeout: Number(timeout)} - ); - - console.log('List featurestores response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - listFeaturestores(); - // [END aiplatform_list_featurestores_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-featurestores-stream-sample.js b/samples/list-featurestores-stream-sample.js deleted file mode 100644 index f8515464..00000000 --- a/samples/list-featurestores-stream-sample.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Lists Featurestores using stream in a given project and location. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 5000 -) { - // [START aiplatform_list_featurestores_stream_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function listFeaturestoresStream() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const request = { - parent: parent, - }; - - // List featurestores stream request - const streamObject = - await featurestoreServiceClient.listFeaturestoresStream(request, { - timeout: Number(timeout), - }); - - console.log('List featurestores stream response'); - console.log('Raw response:'); - - streamObject.on('data', response => { - console.log(JSON.stringify(response, null, 2)); - }); - - streamObject.on('end', () => { - console.log('No more data to read'); - }); - - streamObject.on('close', () => { - console.log('Stream object listFeaturestoresStream is closed'); - }); - } - listFeaturestoresStream(); - // [END aiplatform_list_featurestores_stream_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/list-model-evaluation-slices.js b/samples/list-model-evaluation-slices.js deleted file mode 100644 index e59bf191..00000000 --- a/samples/list-model-evaluation-slices.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(modelId, evaluationId, project, location = 'us-central1') { - // [START aiplatform_list_model_evaluation_slices_sample] - /** - * TODO(developer): Uncomment these variables before running the sample - * (not necessary if passing values as arguments). To obtain evaluationId, - * instantiate the client and run the following the commands. - */ - // const parentName = `projects/${project}/locations/${location}/models/${modelId}`; - // const evalRequest = { - // parent: parentName - // }; - // const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest); - // console.log(evalResponse); - - // const modelId = 'YOUR_MODEL_ID'; - // const evaluationId = 'YOUR_EVALUATION_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function listModelEvaluationSlices() { - // Configure the parent resources - const parent = `projects/${project}/locations/${location}/models/${modelId}/evaluations/${evaluationId}`; - const request = { - parent, - }; - - // Get and print out a list of all the evaluation slices for this resource - const [response] = await modelServiceClient.listModelEvaluationSlices( - request - ); - console.log('List model evaluation response', response); - console.log(response); - } - listModelEvaluationSlices(); - // [END aiplatform_list_model_evaluation_slices_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/package.json b/samples/package.json deleted file mode 100644 index 0ec292b2..00000000 --- a/samples/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "nodejs-aiplatform-samples", - "private": true, - "license": "Apache-2.0", - "author": "Google LLC", - "engines": { - "node": ">=12.0.0" - }, - "files": [ - "*.js" - ], - "scripts": { - "test": "mocha --timeout 1200000 test/*.js" - }, - "dependencies": { - "@google-cloud/aiplatform": "^2.3.0", - "@google-cloud/storage": "^5.5.0", - "@google-cloud/bigquery": "^6.0.0" - }, - "devDependencies": { - "chai": "^4.2.0", - "mocha": "^8.0.0", - "uuid": "^9.0.0" - } -} diff --git a/samples/predict-custom-trained-model.js b/samples/predict-custom-trained-model.js deleted file mode 100644 index 24f8ccbc..00000000 --- a/samples/predict-custom-trained-model.js +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(filename, endpointId, project, location = 'us-central1') { - // [START aiplatform_predict_custom_trained_model_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const filename = "YOUR_PREDICTION_FILE_NAME"; - // const endpointId = "YOUR_ENDPOINT_ID"; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const util = require('util'); - const {readFile} = require('fs'); - const readFileAsync = util.promisify(readFile); - - // Imports the Google Cloud Prediction Service Client library - const {PredictionServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const predictionServiceClient = new PredictionServiceClient(clientOptions); - - async function predictCustomTrainedModel() { - // Configure the parent resource - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - const parameters = { - structValue: { - fields: {}, - }, - }; - const instanceDict = await readFileAsync(filename, 'utf8'); - const instanceValue = JSON.parse(instanceDict); - const instance = { - structValue: { - fields: { - Age: {stringValue: instanceValue['Age']}, - Balance: {stringValue: instanceValue['Balance']}, - Campaign: {stringValue: instanceValue['Campaign']}, - Contact: {stringValue: instanceValue['Contact']}, - Day: {stringValue: instanceValue['Day']}, - Default: {stringValue: instanceValue['Default']}, - Deposit: {stringValue: instanceValue['Deposit']}, - Duration: {stringValue: instanceValue['Duration']}, - Housing: {stringValue: instanceValue['Housing']}, - Job: {stringValue: instanceValue['Job']}, - Loan: {stringValue: instanceValue['Loan']}, - MaritalStatus: {stringValue: instanceValue['MaritalStatus']}, - Month: {stringValue: instanceValue['Month']}, - PDays: {stringValue: instanceValue['PDays']}, - POutcome: {stringValue: instanceValue['POutcome']}, - Previous: {stringValue: instanceValue['Previous']}, - }, - }, - }; - - const instances = [instance]; - const request = { - endpoint, - instances, - parameters, - }; - - // Predict request - const [response] = await predictionServiceClient.predict(request); - - console.log('Predict custom trained model response'); - console.log(`\tDeployed model id : ${response.deployedModelId}`); - const predictions = response.predictions; - console.log('\tPredictions :'); - for (const prediction of predictions) { - console.log(`\t\tPrediction : ${JSON.stringify(prediction)}`); - } - } - predictCustomTrainedModel(); - // [END aiplatform_predict_custom_trained_model_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/predict-image-classification.js b/samples/predict-image-classification.js deleted file mode 100644 index 6be66857..00000000 --- a/samples/predict-image-classification.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -function main(filename, endpointId, project, location = 'us-central1') { - // [START aiplatform_predict_image_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const filename = "YOUR_PREDICTION_FILE_NAME"; - // const endpointId = "YOUR_ENDPOINT_ID"; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {instance, params, prediction} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.predict; - - // Imports the Google Cloud Prediction Service Client library - const {PredictionServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const predictionServiceClient = new PredictionServiceClient(clientOptions); - - async function predictImageClassification() { - // Configure the endpoint resource - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - - const parametersObj = new params.ImageClassificationPredictionParams({ - confidenceThreshold: 0.5, - maxPredictions: 5, - }); - const parameters = parametersObj.toValue(); - - const fs = require('fs'); - const image = fs.readFileSync(filename, 'base64'); - const instanceObj = new instance.ImageClassificationPredictionInstance({ - content: image, - }); - const instanceValue = instanceObj.toValue(); - - const instances = [instanceValue]; - const request = { - endpoint, - instances, - parameters, - }; - - // Predict request - const [response] = await predictionServiceClient.predict(request); - - console.log('Predict image classification response'); - console.log(`\tDeployed model id : ${response.deployedModelId}`); - const predictions = response.predictions; - console.log('\tPredictions :'); - for (const predictionValue of predictions) { - const predictionResultObj = - prediction.ClassificationPredictionResult.fromValue(predictionValue); - for (const [i, label] of predictionResultObj.displayNames.entries()) { - console.log(`\tDisplay name: ${label}`); - console.log(`\tConfidences: ${predictionResultObj.confidences[i]}`); - console.log(`\tIDs: ${predictionResultObj.ids[i]}\n\n`); - } - } - } - predictImageClassification(); - // [END aiplatform_predict_image_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/predict-image-object-detection.js b/samples/predict-image-object-detection.js deleted file mode 100644 index ed6fdd5d..00000000 --- a/samples/predict-image-object-detection.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(filename, endpointId, project, location = 'us-central1') { - // [START aiplatform_predict_image_object_detection_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const filename = "YOUR_PREDICTION_FILE_NAME"; - // const endpointId = "YOUR_ENDPOINT_ID"; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {instance, params, prediction} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.predict; - - // Imports the Google Cloud Prediction Service Client library - const {PredictionServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const predictionServiceClient = new PredictionServiceClient(clientOptions); - - async function predictImageObjectDetection() { - // Configure the endpoint resource - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - - const parametersObj = new params.ImageObjectDetectionPredictionParams({ - confidenceThreshold: 0.5, - maxPredictions: 5, - }); - const parameters = parametersObj.toValue(); - - const fs = require('fs'); - const image = fs.readFileSync(filename, 'base64'); - const instanceObj = new instance.ImageObjectDetectionPredictionInstance({ - content: image, - }); - - const instanceVal = instanceObj.toValue(); - const instances = [instanceVal]; - const request = { - endpoint, - instances, - parameters, - }; - - // Predict request - const [response] = await predictionServiceClient.predict(request); - - console.log('Predict image object detection response'); - console.log(`\tDeployed model id : ${response.deployedModelId}`); - const predictions = response.predictions; - console.log('Predictions :'); - for (const predictionResultVal of predictions) { - const predictionResultObj = - prediction.ImageObjectDetectionPredictionResult.fromValue( - predictionResultVal - ); - for (const [i, label] of predictionResultObj.displayNames.entries()) { - console.log(`\tDisplay name: ${label}`); - console.log(`\tConfidences: ${predictionResultObj.confidences[i]}`); - console.log(`\tIDs: ${predictionResultObj.ids[i]}`); - console.log(`\tBounding boxes: ${predictionResultObj.bboxes[i]}\n\n`); - } - } - } - predictImageObjectDetection(); - // [END aiplatform_predict_image_object_detection_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/predict-tabular-classification.js b/samples/predict-tabular-classification.js deleted file mode 100644 index c5fd9efb..00000000 --- a/samples/predict-tabular-classification.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(endpointId, project, location = 'us-central1') { - // [START aiplatform_predict_tabular_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const endpointId = 'YOUR_ENDPOINT_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {prediction} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.predict; - - // Imports the Google Cloud Prediction service client - const {PredictionServiceClient} = aiplatform.v1; - - // Import the helper module for converting arbitrary protobuf.Value objects. - const {helpers} = aiplatform; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const predictionServiceClient = new PredictionServiceClient(clientOptions); - - async function predictTablesClassification() { - // Configure the endpoint resource - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - const parameters = helpers.toValue({}); - - const instance = helpers.toValue({ - petal_length: '1.4', - petal_width: '1.3', - sepal_length: '5.1', - sepal_width: '2.8', - }); - - const instances = [instance]; - const request = { - endpoint, - instances, - parameters, - }; - - // Predict request - const [response] = await predictionServiceClient.predict(request); - - console.log('Predict tabular classification response'); - console.log(`\tDeployed model id : ${response.deployedModelId}\n`); - const predictions = response.predictions; - console.log('Predictions :'); - for (const predictionResultVal of predictions) { - const predictionResultObj = - prediction.TabularClassificationPredictionResult.fromValue( - predictionResultVal - ); - for (const [i, class_] of predictionResultObj.classes.entries()) { - console.log(`\tClass: ${class_}`); - console.log(`\tScore: ${predictionResultObj.scores[i]}\n\n`); - } - } - } - predictTablesClassification(); - // [END aiplatform_predict_tabular_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/predict-tabular-regression.js b/samples/predict-tabular-regression.js deleted file mode 100644 index 5ef754f5..00000000 --- a/samples/predict-tabular-regression.js +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(endpointId, project, location = 'us-central1') { - // [START aiplatform_predict_tabular_regression_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const endpointId = 'YOUR_ENDPOINT_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {prediction} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.predict; - - // Imports the Google Cloud Prediction service client - const {PredictionServiceClient} = aiplatform.v1; - - // Import the helper module for converting arbitrary protobuf.Value objects. - const {helpers} = aiplatform; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const predictionServiceClient = new PredictionServiceClient(clientOptions); - - async function predictTablesRegression() { - // Configure the endpoint resource - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - const parameters = helpers.toValue({}); - - // TODO (erschmid): Make this less painful - const instance = helpers.toValue({ - BOOLEAN_2unique_NULLABLE: false, - DATETIME_1unique_NULLABLE: '2019-01-01 00:00:00', - DATE_1unique_NULLABLE: '2019-01-01', - FLOAT_5000unique_NULLABLE: 1611, - FLOAT_5000unique_REPEATED: [2320, 1192], - INTEGER_5000unique_NULLABLE: '8', - NUMERIC_5000unique_NULLABLE: 16, - STRING_5000unique_NULLABLE: 'str-2', - STRUCT_NULLABLE: { - BOOLEAN_2unique_NULLABLE: false, - DATE_1unique_NULLABLE: '2019-01-01', - DATETIME_1unique_NULLABLE: '2019-01-01 00:00:00', - FLOAT_5000unique_NULLABLE: 1308, - FLOAT_5000unique_REPEATED: [2323, 1178], - FLOAT_5000unique_REQUIRED: 3089, - INTEGER_5000unique_NULLABLE: '1777', - NUMERIC_5000unique_NULLABLE: 3323, - TIME_1unique_NULLABLE: '23:59:59.999999', - STRING_5000unique_NULLABLE: 'str-49', - TIMESTAMP_1unique_NULLABLE: '1546387199999999', - }, - TIMESTAMP_1unique_NULLABLE: '1546387199999999', - TIME_1unique_NULLABLE: '23:59:59.999999', - }); - - const instances = [instance]; - const request = { - endpoint, - instances, - parameters, - }; - - // Predict request - const [response] = await predictionServiceClient.predict(request); - - console.log('Predict tabular regression response'); - console.log(`\tDeployed model id : ${response.deployedModelId}`); - const predictions = response.predictions; - console.log('\tPredictions :'); - for (const predictionResultVal of predictions) { - const predictionResultObj = - prediction.TabularRegressionPredictionResult.fromValue( - predictionResultVal - ); - console.log(`\tUpper bound: ${predictionResultObj.upper_bound}`); - console.log(`\tLower bound: ${predictionResultObj.lower_bound}`); - console.log(`\tLower bound: ${predictionResultObj.value}`); - } - } - predictTablesRegression(); - // [END aiplatform_predict_tabular_regression_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/predict-text-classification.js b/samples/predict-text-classification.js deleted file mode 100644 index 22433ee0..00000000 --- a/samples/predict-text-classification.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(text, endpointId, project, location) { - // [START aiplatform_predict_text_classification_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const text = 'YOUR_PREDICTION_TEXT'; - // const endpointId = 'YOUR_ENDPOINT_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {instance, prediction} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.predict; - - // Imports the Google Cloud Model Service Client library - const {PredictionServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const predictionServiceClient = new PredictionServiceClient(clientOptions); - - async function predictTextClassification() { - // Configure the resources - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - - const predictionInstance = - new instance.TextClassificationPredictionInstance({ - content: text, - }); - const instanceValue = predictionInstance.toValue(); - - const instances = [instanceValue]; - const request = { - endpoint, - instances, - }; - - const [response] = await predictionServiceClient.predict(request); - console.log('Predict text classification response'); - console.log(`\tDeployed model id : ${response.deployedModelId}\n\n`); - - console.log('Prediction results:'); - - for (const predictionResultValue of response.predictions) { - const predictionResult = - prediction.ClassificationPredictionResult.fromValue( - predictionResultValue - ); - - for (const [i, label] of predictionResult.displayNames.entries()) { - console.log(`\tDisplay name: ${label}`); - console.log(`\tConfidences: ${predictionResult.confidences[i]}`); - console.log(`\tIDs: ${predictionResult.ids[i]}\n\n`); - } - } - } - predictTextClassification(); - // [END aiplatform_predict_text_classification_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/predict-text-entity-extraction.js b/samples/predict-text-entity-extraction.js deleted file mode 100644 index 4a6f318a..00000000 --- a/samples/predict-text-entity-extraction.js +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(text, endpointId, project, location = 'us-central1') { - // [START aiplatform_predict_text_entity_extraction_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const text = "YOUR_PREDICTION_TEXT"; - // const endpointId = "YOUR_ENDPOINT_ID"; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {instance, prediction} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.predict; - - // Imports the Google Cloud Model Service Client library - const {PredictionServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const predictionServiceClient = new PredictionServiceClient(clientOptions); - - async function predictTextEntityExtraction() { - // Configure the endpoint resource - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - - const instanceObj = new instance.TextExtractionPredictionInstance({ - content: text, - }); - const instanceVal = instanceObj.toValue(); - const instances = [instanceVal]; - - const request = { - endpoint, - instances, - }; - - // Predict request - const [response] = await predictionServiceClient.predict(request); - - console.log('Predict text entity extraction response :'); - console.log(`\tDeployed model id : ${response.deployedModelId}`); - - console.log('\nPredictions :'); - for (const predictionResultValue of response.predictions) { - const predictionResult = - prediction.TextExtractionPredictionResult.fromValue( - predictionResultValue - ); - - for (const [i, label] of predictionResult.displayNames.entries()) { - const textStartOffset = parseInt( - predictionResult.textSegmentStartOffsets[i] - ); - const textEndOffset = parseInt( - predictionResult.textSegmentEndOffsets[i] - ); - const entity = text.substring(textStartOffset, textEndOffset); - console.log(`\tEntity: ${entity}`); - console.log(`\tEntity type: ${label}`); - console.log(`\tConfidences: ${predictionResult.confidences[i]}`); - console.log(`\tIDs: ${predictionResult.ids[i]}\n\n`); - } - } - } - predictTextEntityExtraction(); - // [END aiplatform_predict_text_entity_extraction_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/predict-text-sentiment-analysis.js b/samples/predict-text-sentiment-analysis.js deleted file mode 100644 index 9bbbe3ce..00000000 --- a/samples/predict-text-sentiment-analysis.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main(text, endpointId, project, location = 'us-central1') { - // [START aiplatform_predict_text_sentiment_analysis_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const text = "YOUR_PREDICTION_TEXT"; - // const endpointId = "YOUR_ENDPOINT_ID"; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - const aiplatform = require('@google-cloud/aiplatform'); - const {instance, prediction} = - aiplatform.protos.google.cloud.aiplatform.v1.schema.predict; - - // Imports the Google Cloud Model Service Client library - const {PredictionServiceClient} = aiplatform.v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const predictionServiceClient = new PredictionServiceClient(clientOptions); - - async function predictTextSentimentAnalysis() { - // Configure the endpoint resource - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - - const instanceObj = new instance.TextSentimentPredictionInstance({ - content: text, - }); - const instanceVal = instanceObj.toValue(); - - const instances = [instanceVal]; - const request = { - endpoint, - instances, - }; - - // Predict request - const [response] = await predictionServiceClient.predict(request); - - console.log('Predict text sentiment analysis response:'); - console.log(`\tDeployed model id : ${response.deployedModelId}`); - - console.log('\nPredictions :'); - for (const predictionResultValue of response.predictions) { - const predictionResult = - prediction.TextSentimentPredictionResult.fromValue( - predictionResultValue - ); - console.log(`\tSentiment measure: ${predictionResult.sentiment}`); - } - } - predictTextSentimentAnalysis(); - // [END aiplatform_predict_text_sentiment_analysis_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/quickstart.js b/samples/quickstart.js deleted file mode 100644 index 4f59d857..00000000 --- a/samples/quickstart.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2019 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. - -'use strict'; - -/** - * TODO: add an actual quickstart example. - */ -async function main() { - // [START aiplatform_quickstart_sample] - const {DatasetServiceClient} = require('@google-cloud/aiplatform'); - const client = new DatasetServiceClient(); - - // Do something with DatasetServiceClient. - console.info(client); - - // [END aiplatform_quickstart_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/read-feature-values-sample.js b/samples/read-feature-values-sample.js deleted file mode 100644 index df4f5a37..00000000 --- a/samples/read-feature-values-sample.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Reads Feature values of a specific entity of an EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - entityId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_read_feature_values_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const entityId = 'ENTITY_ID_TO_SERVE'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreOnlineServingServiceClient} = - require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreOnlineServingServiceClient = - new FeaturestoreOnlineServingServiceClient(clientOptions); - - async function readFeatureValues() { - // Configure the entityType resource - const entityType = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - const featureSelector = { - idMatcher: { - ids: ['age', 'gender', 'liked_genres'], - }, - }; - - const request = { - entityType: entityType, - entityId: entityId, - featureSelector: featureSelector, - }; - - // Read Feature Values Request - const [response] = - await featurestoreOnlineServingServiceClient.readFeatureValues(request, { - timeout: Number(timeout), - }); - - console.log('Read feature values response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - readFeatureValues(); - // [END aiplatform_read_feature_values_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/resources/caprese_salad.jpg b/samples/resources/caprese_salad.jpg deleted file mode 100644 index 7957ca94..00000000 Binary files a/samples/resources/caprese_salad.jpg and /dev/null differ diff --git a/samples/resources/daisy.jpg b/samples/resources/daisy.jpg deleted file mode 100644 index ae01cae9..00000000 Binary files a/samples/resources/daisy.jpg and /dev/null differ diff --git a/samples/search-features-async-sample.js b/samples/search-features-async-sample.js deleted file mode 100644 index c2a74fb1..00000000 --- a/samples/search-features-async-sample.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Searches Features matching a query in a given project Asyncronously. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - query, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_search_features_async_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function searchFeaturesAsync() { - // Configure the locationResource resource - const locationResource = `projects/${project}/locations/${location}`; - - const request = { - location: locationResource, - query: query, - }; - - // Search Features async request - const iterable = await featurestoreServiceClient.searchFeaturesAsync( - request, - { - timeout: Number(timeout), - } - ); - - console.log('Search features async response'); - console.log('Raw response:'); - for await (const response of iterable) { - console.log(JSON.stringify(response, null, 2)); - } - } - searchFeaturesAsync(); - // [END aiplatform_search_features_async_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/search-features-sample.js b/samples/search-features-sample.js deleted file mode 100644 index 56a1dff4..00000000 --- a/samples/search-features-sample.js +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Searches Features matching a query in a given project. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - query, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_search_features_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function searchFeatures() { - // Configure the locationResource resource - const locationResource = `projects/${project}/locations/${location}`; - - const request = { - location: locationResource, - query: query, - }; - - // Search Features request - const [response] = await featurestoreServiceClient.searchFeatures(request, { - timeout: Number(timeout), - }); - - console.log('Search features response'); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - searchFeatures(); - // [END aiplatform_search_features_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/search-features-stream-sample.js b/samples/search-features-stream-sample.js deleted file mode 100644 index 798dadfc..00000000 --- a/samples/search-features-stream-sample.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -/* - * Searches Features matching a query in a given project using streaming. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - query, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_search_features_stream_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function searchFeaturesStream() { - // Configure the locationResource resource - const locationResource = `projects/${project}/locations/${location}`; - - const request = { - location: locationResource, - query: query, - }; - - // Search Features stream request - const streamObject = await featurestoreServiceClient.searchFeaturesStream( - request, - { - timeout: Number(timeout), - } - ); - - console.log('Search features stream response'); - console.log('Raw response:'); - streamObject.on('data', response => { - console.log(JSON.stringify(response, null, 2)); - }); - - streamObject.on('end', () => { - console.log('No more data to read'); - }); - - streamObject.on('close', () => { - console.log('Stream object searchFeaturesStream is closed'); - }); - } - searchFeaturesStream(); - // [END aiplatform_search_features_stream_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/test/create-batch-prediction-job-text-classification.test.js b/samples/test/create-batch-prediction-job-text-classification.test.js deleted file mode 100644 index ac285ad4..00000000 --- a/samples/test/create-batch-prediction-job-text-classification.test.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const jobServiceClient = new aiplatform.v1.JobServiceClient(clientOptions); - -const batchPredictionDisplayName = `temp_create_batch_prediction_text_classification_test${uuid()}`; -const modelId = '7827432074230366208'; -const gcsSourceUri = - 'gs://ucaip-samples-test-output/inputs/batch_predict_TCN/tcn_inputs.jsonl'; -const gcsDestinationOutputUriPrefix = 'gs://ucaip-samples-test-output/'; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let batchPredictionJobId; - -describe('AI platform create batch prediction job text classification', () => { - it('should create a text classification batch prediction job', async () => { - const stdout = execSync( - `node ./create-batch-prediction-job-text-classification.js ${batchPredictionDisplayName} ${modelId} ${gcsSourceUri} ${gcsDestinationOutputUriPrefix} ${project} ${location}` - ); - assert.match( - stdout, - /Create batch prediction job text classification response/ - ); - batchPredictionJobId = stdout - .split('/locations/us-central1/batchPredictionJobs/')[1] - .split('\n')[0]; - }); - after('should cancel delete the batch prediction job', async () => { - const name = jobServiceClient.batchPredictionJobPath( - project, - location, - batchPredictionJobId - ); - - const cancelRequest = { - name, - }; - - jobServiceClient.cancelBatchPredictionJob(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return jobServiceClient.deleteBatchPredictionJob(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-batch-prediction-job-text-entity-extraction.test.js b/samples/test/create-batch-prediction-job-text-entity-extraction.test.js deleted file mode 100644 index bb630905..00000000 --- a/samples/test/create-batch-prediction-job-text-entity-extraction.test.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const jobServiceClient = new aiplatform.v1.JobServiceClient(clientOptions); - -const batchPredictionDisplayName = `temp_create_batch_prediction_text_entity_extraction_test${uuid()}`; -const modelId = '6305215400179138560'; -const gcsSourceUri = - 'gs://ucaip-samples-test-output/inputs/batch_predict_TEN/ten_inputs.jsonl'; -const gcsDestinationOutputUriPrefix = 'gs://ucaip-samples-test-output/'; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let batchPredictionJobId; - -describe('AI platform create batch prediction job text entity extraction', () => { - it('should create a text entity extraction batch prediction job', async () => { - const stdout = execSync( - `node ./create-batch-prediction-job-text-entity-extraction.js ${batchPredictionDisplayName} ${modelId} ${gcsSourceUri} ${gcsDestinationOutputUriPrefix} ${project} ${location}` - ); - assert.match( - stdout, - /Create batch prediction job text entity extraction response/ - ); - batchPredictionJobId = stdout - .split('/locations/us-central1/batchPredictionJobs/')[1] - .split('\n')[0]; - }); - after('should cancel delete the batch prediction job', async () => { - const name = jobServiceClient.batchPredictionJobPath( - project, - location, - batchPredictionJobId - ); - - const cancelRequest = { - name, - }; - - jobServiceClient.cancelBatchPredictionJob(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return jobServiceClient.deleteBatchPredictionJob(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-batch-prediction-job-text-sentiment-analysis.test.js b/samples/test/create-batch-prediction-job-text-sentiment-analysis.test.js deleted file mode 100644 index c9d18326..00000000 --- a/samples/test/create-batch-prediction-job-text-sentiment-analysis.test.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const jobServiceClient = new aiplatform.v1.JobServiceClient(clientOptions); - -const batchPredictionDisplayName = `temp_create_batch_prediction_text_sentiment_analysis_test${uuid()}`; -const modelId = '4792568875336073216'; -const gcsSourceUri = - 'gs://ucaip-samples-test-output/inputs/batch_predict_TSN/tsn_inputs.jsonl'; -const gcsDestinationOutputUriPrefix = 'gs://ucaip-samples-test-output/'; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let batchPredictionJobId; - -describe('AI platform create batch prediction job text sentiment analysis', () => { - it('should create a text sentiment analysis batch prediction job', async () => { - const stdout = execSync( - `node ./create-batch-prediction-job-text-sentiment-analysis.js ${batchPredictionDisplayName} ${modelId} ${gcsSourceUri} ${gcsDestinationOutputUriPrefix} ${project} ${location}` - ); - assert.match( - stdout, - /Create batch prediction job text sentiment analysis response/ - ); - batchPredictionJobId = stdout - .split('/locations/us-central1/batchPredictionJobs/')[1] - .split('\n')[0]; - }); - after('should cancel delete the batch prediction job', async () => { - const name = jobServiceClient.batchPredictionJobPath( - project, - location, - batchPredictionJobId - ); - - const cancelRequest = { - name, - }; - - jobServiceClient.cancelBatchPredictionJob(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return jobServiceClient.deleteBatchPredictionJob(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-batch-prediction-job-video-action-recognition.test.js b/samples/test/create-batch-prediction-job-video-action-recognition.test.js deleted file mode 100644 index db447807..00000000 --- a/samples/test/create-batch-prediction-job-video-action-recognition.test.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const jobServiceClient = new aiplatform.v1.JobServiceClient(clientOptions); - -const batchPredictionDisplayName = `temp_create_batch_prediction_video_action_recognition_test${uuid()}`; -const modelId = '3530998029718913024'; -const gcsSourceUri = 'gs://automl-video-demo-data/ucaip-var/swimrun_bp.jsonl'; -const gcsDestinationOutputUriPrefix = 'gs://ucaip-samples-test-output/'; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let batchPredictionJobId; - -describe('AI platform create batch prediction job video action recognition', () => { - it('should create a video action recognition batch prediction job', async () => { - const stdout = execSync( - `node ./create-batch-prediction-job-video-action-recognition.js \ - ${batchPredictionDisplayName} \ - ${modelId} ${gcsSourceUri} \ - ${gcsDestinationOutputUriPrefix} \ - ${project} ${location}` - ); - assert.match( - stdout, - /Create batch prediction job video action recognition response/ - ); - batchPredictionJobId = stdout - .split('/locations/us-central1/batchPredictionJobs/')[1] - .split('\n')[0]; - }); - after('should cancel delete the batch prediction job', async () => { - const name = jobServiceClient.batchPredictionJobPath( - project, - location, - batchPredictionJobId - ); - - const cancelRequest = { - name, - }; - - jobServiceClient.cancelBatchPredictionJob(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return jobServiceClient.deleteBatchPredictionJob(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-batch-prediction-job-video-classification.test.js b/samples/test/create-batch-prediction-job-video-classification.test.js deleted file mode 100644 index 16f8ceaf..00000000 --- a/samples/test/create-batch-prediction-job-video-classification.test.js +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const jobServiceClient = new aiplatform.v1.JobServiceClient(clientOptions); - -const batchPredictionDisplayName = `temp_create_batch_prediction_video_classification_test${uuid()}`; -const modelId = '8596984660557299712'; -const gcsSourceUri = - 'gs://ucaip-samples-test-output/inputs/vcn_40_batch_prediction_input.jsonl'; -const gcsDestinationOutputUriPrefix = 'gs://ucaip-samples-test-output/'; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let batchPredictionJobId; - -describe('AI platform create batch prediction job video classification', () => { - it('should create a video classification batch prediction job', async () => { - const stdout = execSync( - `node ./create-batch-prediction-job-video-classification.js \ - ${batchPredictionDisplayName} \ - ${modelId} ${gcsSourceUri} \ - ${gcsDestinationOutputUriPrefix} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Create batch prediction job video classification response/ - ); - batchPredictionJobId = stdout - .split('/locations/us-central1/batchPredictionJobs/')[1] - .split('\n')[0]; - }); - after('should cancel delete the batch prediction job', async () => { - const name = jobServiceClient.batchPredictionJobPath( - project, - location, - batchPredictionJobId - ); - - const cancelRequest = { - name, - }; - - jobServiceClient.cancelBatchPredictionJob(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return jobServiceClient.deleteBatchPredictionJob(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-batch-prediction-job-video-object-tracking.test.js b/samples/test/create-batch-prediction-job-video-object-tracking.test.js deleted file mode 100644 index 5c3a1888..00000000 --- a/samples/test/create-batch-prediction-job-video-object-tracking.test.js +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const jobServiceClient = new aiplatform.v1.JobServiceClient(clientOptions); - -const batchPredictionDisplayName = `temp_create_batch_prediction_video_object_tracking_test${uuid()}`; -const modelId = '8609932509485989888'; -const gcsSourceUri = - 'gs://ucaip-samples-test-output/inputs/vot_batch_prediction_input.jsonl'; -const gcsDestinationOutputUriPrefix = 'gs://ucaip-samples-test-output/'; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let batchPredictionJobId; - -describe('AI platform create batch prediction job video object tracking', () => { - it('should create a video object tracking batch prediction job', async () => { - const stdout = execSync( - `node ./create-batch-prediction-job-video-object-tracking.js \ - ${batchPredictionDisplayName} \ - ${modelId} ${gcsSourceUri} \ - ${gcsDestinationOutputUriPrefix} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Create batch prediction job video object tracking response/ - ); - batchPredictionJobId = stdout - .split('/locations/us-central1/batchPredictionJobs/')[1] - .split('\n')[0]; - }); - after('should cancel delete the batch prediction job', async () => { - const name = jobServiceClient.batchPredictionJobPath( - project, - location, - batchPredictionJobId - ); - - const cancelRequest = { - name, - }; - - jobServiceClient.cancelBatchPredictionJob(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return jobServiceClient.deleteBatchPredictionJob(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-custom-job.test.js b/samples/test/create-custom-job.test.js deleted file mode 100644 index ac87d2e9..00000000 --- a/samples/test/create-custom-job.test.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const customJobDisplayName = `temp_create_custom_job_test${uuid()}`; -const containerImageUri = - 'gcr.io/ucaip-sample-tests/ucaip-training-test:latest'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -function parseResponse(stdout) { - let res = {}; - for (let i = 0; i < stdout.length; i++) { - if (stdout[i] === '{') { - res = JSON.parse(stdout.substr(i)); - break; - } - } - return res; -} - -let customJobId; - -describe('AI platform create custom job', async function () { - this.retries(2); - it('should create a new custom job', async () => { - const stdout = execSync( - `node ./create-custom-job.js ${customJobDisplayName} \ - ${containerImageUri} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create custom job response/); - customJobId = parseResponse(stdout).name.split('/').pop(); - }); - - after('should cancel the customJob and delete it', async () => { - execSync( - `node ./cancel-custom-job.js ${customJobId} ${project} \ - ${location}`, - { - cwd, - } - ); - execSync( - `node ./delete-custom-job.js ${customJobId} ${project} \ - ${location}`, - { - cwd, - } - ); - }); -}); diff --git a/samples/test/create-dataset-image.test.js b/samples/test/create-dataset-image.test.js deleted file mode 100644 index bd9ea481..00000000 --- a/samples/test/create-dataset-image.test.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const datasetDisplayName = `temp_create_dataset_image_test_${uuid()}`; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -let datasetId; - -describe('AI platform create dataset image', () => { - it('should create a new image dataset in the parent resource', async () => { - const stdout = execSync( - `node ./create-dataset-image.js ${datasetDisplayName} ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create dataset image response/); - datasetId = stdout - .split('/locations/us-central1/datasets/')[1] - .split('\n')[0] - .split('/')[0]; - }); - after('should delete the created dataset', async () => { - execSync(`node ./delete-dataset.js ${datasetId} ${project} ${location}`, { - cwd, - }); - }); -}); diff --git a/samples/test/create-dataset-tabular-bigquery.test.js b/samples/test/create-dataset-tabular-bigquery.test.js deleted file mode 100644 index 829da9dd..00000000 --- a/samples/test/create-dataset-tabular-bigquery.test.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const datasetDisplayName = `temp_create_dataset_tables_bigquery_test_${uuid()}`; -const bigquerySourceUri = 'bq://ucaip-sample-tests.table_test.all_bq_types'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -let datasetId; - -describe('AI platform create dataset tabular bigquery', () => { - it('should create a new bigquery tabular dataset in the parent resource', async () => { - const stdout = execSync( - `node ./create-dataset-tabular-bigquery.js ${datasetDisplayName} \ - ${bigquerySourceUri} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create dataset tabular bigquery response/); - datasetId = stdout - .split(`/locations/${location}/datasets/`)[1] - .split('/')[0] - .split('/')[0]; - }); - after('should delete created dataset', async () => { - execSync(`node ./delete-dataset.js ${datasetId} ${project} ${location}`, { - cwd, - }); - }); -}); diff --git a/samples/test/create-dataset-tabular-gcs.test.js b/samples/test/create-dataset-tabular-gcs.test.js deleted file mode 100644 index 08ab73a8..00000000 --- a/samples/test/create-dataset-tabular-gcs.test.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const datasetDisplayName = `temp_create_dataset_tables_gcs_test_${uuid()}`; -const gcsSourceUri = 'gs://cloud-ml-tables-data/bank-marketing.csv'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -let datasetId; - -describe('AI platform create dataset tabular gcs', () => { - it('should create a new gcs tabular dataset in the parent resource', async () => { - const stdout = execSync( - `node ./create-dataset-tabular-gcs.js ${datasetDisplayName} \ - ${gcsSourceUri} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create dataset tabular gcs response/); - datasetId = stdout - .split('/locations/us-central1/datasets/')[1] - .split('/')[0] - .split('/')[0]; - }); - after('should delete created dataset', async () => { - execSync(`node ./delete-dataset.js ${datasetId} ${project} ${location}`, { - cwd, - }); - }); -}); diff --git a/samples/test/create-dataset-text.test.js b/samples/test/create-dataset-text.test.js deleted file mode 100644 index 43e84656..00000000 --- a/samples/test/create-dataset-text.test.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const displayName = `temp_create_dataset_text_test_${uuid()}`; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -let datasetId; - -describe('AI platform create dataset text', () => { - it('should create a new dataset in the parent resource', async () => { - const stdout = execSync( - `node ./create-dataset-text.js ${displayName} ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create dataset text response/); - datasetId = stdout - .split('/locations/us-central1/datasets/')[1] - .split('\n')[0] - .split('/')[0]; - }); - after('should delete the created dataset', async () => { - execSync(`node ./delete-dataset.js ${datasetId} ${project} ${location}`, { - cwd, - }); - }); -}); diff --git a/samples/test/create-dataset-video.test.js b/samples/test/create-dataset-video.test.js deleted file mode 100644 index cae62a2a..00000000 --- a/samples/test/create-dataset-video.test.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const datasetDisplayName = `temp_create_dataset_video_test_${uuid()}`; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -let datasetId; - -describe('AI platform create dataset video', () => { - it('should create a new video dataset in the parent resource', async () => { - const stdout = execSync( - `node ./create-dataset-video.js ${datasetDisplayName} ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create dataset video response/); - datasetId = stdout - .split('/locations/us-central1/datasets/')[1] - .split('\n')[0] - .split('/')[0]; - }); - after('should delete the created dataset', async () => { - execSync(`node ./delete-dataset.js ${datasetId} ${project} ${location}`, { - cwd, - }); - }); -}); diff --git a/samples/test/create-dataset.test.js b/samples/test/create-dataset.test.js deleted file mode 100644 index 99075b54..00000000 --- a/samples/test/create-dataset.test.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const datasetDisplayName = `temp_create_dataset_test_${uuid()}`; -const metadataSchemaUri = - 'gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -let datasetId; - -describe('AI platform create dataset', () => { - it('should create a new dataset in the parent resource', async () => { - const stdout = execSync( - `node ./create-dataset.js ${datasetDisplayName} ${metadataSchemaUri} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create dataset response/); - datasetId = stdout - .split('/locations/us-central1/datasets/')[1] - .split('\n')[0] - .split('/')[0]; - }); - after('should delete created dataset', async () => { - execSync(`node ./delete-dataset.js ${datasetId} ${project} ${location}`, { - cwd, - }); - }); -}); diff --git a/samples/test/create-endpoint.test.js b/samples/test/create-endpoint.test.js deleted file mode 100644 index b989d96a..00000000 --- a/samples/test/create-endpoint.test.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const endpointDisplayName = `temp_create_endpoint_test_${uuid()}`; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; -let endpointId; - -describe('AI platform create endpoint', () => { - it('should create a new endpoint', async () => { - const stdout = execSync( - `node ./create-endpoint.js ${endpointDisplayName} ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Create endpoint response/); - endpointId = stdout - .split('/locations/us-central1/endpoints/')[1] - .split('\n')[0] - .split('/')[0]; - }); - after('delete created endpoint', async () => { - execSync(`node ./delete-endpoint.js ${endpointId} ${project} ${location}`, { - cwd, - }); - }); -}); diff --git a/samples/test/create-featurestore-fixed-nodes-sample.test.js b/samples/test/create-featurestore-fixed-nodes-sample.test.js deleted file mode 100644 index 566a62fd..00000000 --- a/samples/test/create-featurestore-fixed-nodes-sample.test.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; -const {after, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const project = process.env.CAIP_PROJECT_ID; -const featurestoreId = `featurestore_sample_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; -const fixedNodeCount = 1; -const location = 'us-central1'; -const apiEndpoint = 'us-central1-aiplatform.googleapis.com'; - -// Instantiates a featurestore clients -const featurestoreServiceClient = new FeaturestoreServiceClient({ - apiEndpoint: apiEndpoint, -}); - -const deleteFeaturestore = async () => { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const request = { - name: name, - force: true, - }; - - // Delete Featurestore request - const [operation] = await featurestoreServiceClient.deleteFeaturestore( - request, - {timeout: 60000} - ); - await operation.promise(); -}; - -describe('AI platform create featurestore with fixed nodes', async function () { - this.retries(2); - it('should create a featurestore', async () => { - const stdout = execSync( - `node ./create-featurestore-fixed-nodes-sample.js ${project} ${featurestoreId} ${fixedNodeCount} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Create featurestore fixed nodes response/); - }); - after('should delete the created featurestore', async () => { - await deleteFeaturestore(); - }); -}); diff --git a/samples/test/create-featurestore-sample.test.js b/samples/test/create-featurestore-sample.test.js deleted file mode 100644 index cb66466c..00000000 --- a/samples/test/create-featurestore-sample.test.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; -const {after, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const project = process.env.CAIP_PROJECT_ID; -const featurestoreId = `featurestore_sample_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; -const minNodeCount = 1; -const maxNodeCount = 5; -const location = 'us-central1'; -const apiEndpoint = 'us-central1-aiplatform.googleapis.com'; - -// Instantiates a featurestore clients -const featurestoreServiceClient = new FeaturestoreServiceClient({ - apiEndpoint: apiEndpoint, -}); - -const deleteFeaturestore = async () => { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const request = { - name: name, - force: true, - }; - - // Delete Featurestore request - const [operation] = await featurestoreServiceClient.deleteFeaturestore( - request, - {timeout: 60000} - ); - await operation.promise(); -}; - -describe('AI platform create featurestore', async function () { - this.retries(2); - it('should create a featurestore', async () => { - const stdout = execSync( - `node ./create-featurestore-sample.js ${project} ${featurestoreId} ${minNodeCount} ${maxNodeCount} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Create featurestore response/); - }); - after('should delete the created featurestore', async () => { - await deleteFeaturestore(); - }); -}); diff --git a/samples/test/create-hyperparameter-tuning-job.test.js b/samples/test/create-hyperparameter-tuning-job.test.js deleted file mode 100644 index 5d376255..00000000 --- a/samples/test/create-hyperparameter-tuning-job.test.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const jobServiceClient = new aiplatform.v1.JobServiceClient(clientOptions); - -const containerImageUri = - 'gcr.io/ucaip-sample-tests/ucaip-training-test:latest'; -const displayName = `temp_create_hyperparameter_tuning_job_test${uuid()}`; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let tuningJobId; - -describe('AI platform create hyperparameter tuning job', async function () { - this.retries(2); - it('should create a new hyperparameter tuning job', async () => { - const stdout = execSync( - `node ./create-hyperparameter-tuning-job.js ${displayName} ${containerImageUri} ${project} ${location}` - ); - assert.match( - stdout, - /\/locations\/us-central1\/hyperparameterTuningJobs\// - ); - tuningJobId = stdout - .split('/locations/us-central1/hyperparameterTuningJobs/')[1] - .split('\n')[0]; - }); - - after( - 'should cancel the hyperparameter tuning job and delete it', - async () => { - const name = jobServiceClient.hyperparameterTuningJobPath( - project, - location, - tuningJobId - ); - - const cancelRequest = { - name, - }; - - jobServiceClient.cancelHyperparameterTuningJob(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return jobServiceClient.deleteHyperparameterTuningJob(deleteRequest); - }); - } - ); -}); diff --git a/samples/test/create-training-pipeline-image-classification.test.js b/samples/test/create-training-pipeline-image-classification.test.js deleted file mode 100644 index 29e66437..00000000 --- a/samples/test/create-training-pipeline-image-classification.test.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const pipelineServiceClient = new aiplatform.v1.PipelineServiceClient( - clientOptions -); - -const datasetId = '1084241610289446912'; -const modelDisplayName = `temp_create_training_pipeline_image_classification_model_test${uuid()}`; -const trainingPipelineDisplayName = `temp_create_training_pipeline_image_classification_test_${uuid()}`; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let trainingPipelineId; - -describe('AI platform create training pipeline image classification', async function () { - this.retries(2); - it('should create a new image classification training pipeline', async () => { - const stdout = execSync( - `node ./create-training-pipeline-image-classification.js ${datasetId} ${modelDisplayName} ${trainingPipelineDisplayName} ${project} ${location}` - ); - assert.match(stdout, /\/locations\/us-central1\/trainingPipelines\//); - trainingPipelineId = stdout - .split('/locations/us-central1/trainingPipelines/')[1] - .split('\n')[0]; - }); - - after('should cancel the training pipeline and delete it', async () => { - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - - const cancelRequest = { - name, - }; - - pipelineServiceClient.cancelTrainingPipeline(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return pipelineServiceClient.deleteTrainingPipeline(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-training-pipeline-image-object-detection.test.js b/samples/test/create-training-pipeline-image-object-detection.test.js deleted file mode 100644 index e94ff323..00000000 --- a/samples/test/create-training-pipeline-image-object-detection.test.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const pipelineServiceClient = new aiplatform.v1.PipelineServiceClient( - clientOptions -); - -const datasetId = '3555732643297361920'; -const modelDisplayName = `temp_create_training_pipeline_image_object_detection_model_test${uuid()}`; -const trainingPipelineDisplayName = `temp_create_training_pipeline_image_object_detection_test_${uuid()}`; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let trainingPipelineId; - -describe('AI platform create training pipeline image object detection', async function () { - this.retries(2); - it('should create a new image object detection training pipeline', async () => { - const stdout = execSync( - `node ./create-training-pipeline-image-object-detection.js \ - ${datasetId} \ - ${modelDisplayName} \ - ${trainingPipelineDisplayName} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Create training pipeline image object detection response/ - ); - trainingPipelineId = stdout - .split('/locations/us-central1/trainingPipelines/')[1] - .split('\n')[0]; - }); - - after('should cancel the training pipeline and delete it', async () => { - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - - const cancelRequest = { - name, - }; - - pipelineServiceClient.cancelTrainingPipeline(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return pipelineServiceClient.deleteTrainingPipeline(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-training-pipeline-tabular-classification.test.js b/samples/test/create-training-pipeline-tabular-classification.test.js deleted file mode 100644 index 2409e343..00000000 --- a/samples/test/create-training-pipeline-tabular-classification.test.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const pipelineServiceClient = new aiplatform.v1.PipelineServiceClient( - clientOptions -); - -const datasetId = '2438839935709478912'; -const modelDisplayName = `temp_create_training_pipeline_tables_classification_model_test${uuid()}`; -const trainingPipelineDisplayName = `temp_create_training_pipeline_tables_classification_test_${uuid()}`; -const targetColumn = 'species'; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let trainingPipelineId; - -describe('AI platform create training pipeline tables classification', async function () { - this.retries(2); - it('should create a new tables classification training pipeline', async () => { - const stdout = execSync( - `node ./create-training-pipeline-tabular-classification.js \ - ${datasetId} \ - ${modelDisplayName} \ - ${trainingPipelineDisplayName} \ - ${targetColumn} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Create training pipeline tabular classification response/ - ); - trainingPipelineId = stdout - .split('/locations/us-central1/trainingPipelines/')[1] - .split('\n')[0]; - }); - - after('should cancel the training pipeline and delete it', async () => { - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - - const cancelRequest = { - name, - }; - - pipelineServiceClient.cancelTrainingPipeline(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return pipelineServiceClient.deleteTrainingPipeline(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-training-pipeline-tabular-regression.test.js b/samples/test/create-training-pipeline-tabular-regression.test.js deleted file mode 100644 index 4ded88a2..00000000 --- a/samples/test/create-training-pipeline-tabular-regression.test.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const pipelineServiceClient = new aiplatform.v1.PipelineServiceClient( - clientOptions -); - -const datasetId = '3019804287640272896'; -const modelDisplayName = `temp_create_training_pipeline_tables_regression_model_test${uuid()}`; -const trainingPipelineDisplayName = `temp_create_training_pipeline_tables_regression_test_${uuid()}`; -const targetColumn = 'FLOAT_5000unique_REQUIRED'; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let trainingPipelineId; - -describe('AI platform create training pipeline tabular regression', async function () { - this.retries(2); - it('should create a new tabular regression training pipeline', async () => { - const stdout = execSync( - `node ./create-training-pipeline-tabular-regression.js \ - ${datasetId} \ - ${modelDisplayName} \ - ${trainingPipelineDisplayName} \ - ${targetColumn} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Create training pipeline tabular regression response/ - ); - trainingPipelineId = stdout - .split('/locations/us-central1/trainingPipelines/')[1] - .split('\n')[0]; - }); - - after('should cancel the training pipeline and delete it', async () => { - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - - const cancelRequest = { - name, - }; - - pipelineServiceClient.cancelTrainingPipeline(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return pipelineServiceClient.deleteTrainingPipeline(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-training-pipeline-text-classification.test.js b/samples/test/create-training-pipeline-text-classification.test.js deleted file mode 100644 index 0e32c2f5..00000000 --- a/samples/test/create-training-pipeline-text-classification.test.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const pipelineServiceClient = new aiplatform.v1.PipelineServiceClient( - clientOptions -); - -const datasetId = '7051300010322821120'; -const modelDisplayName = `temp_create_training_pipeline_text_classification_model_test${uuid()}`; -const trainingPipelineDisplayName = `temp_create_training_pipeline_text_classification_test_${uuid()}`; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let trainingPipelineId; - -describe('AI platform create training pipeline text classification', async function () { - this.retries(2); - it('should create a new text classification training pipeline', async () => { - const stdout = execSync( - `node ./create-training-pipeline-text-classification.js \ - ${datasetId} \ - ${modelDisplayName} \ - ${trainingPipelineDisplayName} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Create training pipeline text classification response/ - ); - trainingPipelineId = stdout - .split('/locations/us-central1/trainingPipelines/')[1] - .split('\n')[0]; - }); - after('should cancel the training pipeline and delete it', async () => { - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - - const cancelRequest = { - name, - }; - - pipelineServiceClient.cancelTrainingPipeline(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return pipelineServiceClient.deleteTrainingPipeline(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-training-pipeline-text-entity-extraction.test.js b/samples/test/create-training-pipeline-text-entity-extraction.test.js deleted file mode 100644 index 01080bb0..00000000 --- a/samples/test/create-training-pipeline-text-entity-extraction.test.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const pipelineServiceClient = new aiplatform.v1.PipelineServiceClient( - clientOptions -); - -const datasetId = '6203215905493614592'; -const modelDisplayName = `temp_create_training_pipeline_entity_extraction_model_test${uuid()}`; -const trainingPipelineDisplayName = `temp_create_training_pipeline_entity_extraction_test_${uuid()}`; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let trainingPipelineId; - -describe('AI platform create training pipeline text entity extraction', async function () { - this.retries(2); - it('should create a new text entity extraction training pipeline', async () => { - const stdout = execSync( - `node ./create-training-pipeline-text-entity-extraction.js \ - ${datasetId} \ - ${modelDisplayName} \ - ${trainingPipelineDisplayName} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Create training pipeline text entity extraction response/ - ); - trainingPipelineId = stdout - .split('/locations/us-central1/trainingPipelines/')[1] - .split('\n')[0]; - }); - after('should cancel the training pipeline and delete it', async () => { - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - - const cancelRequest = { - name, - }; - - pipelineServiceClient.cancelTrainingPipeline(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return pipelineServiceClient.deleteTrainingPipeline(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-training-pipeline-text-sentiment-analysis.test.js b/samples/test/create-training-pipeline-text-sentiment-analysis.test.js deleted file mode 100644 index e8492fa1..00000000 --- a/samples/test/create-training-pipeline-text-sentiment-analysis.test.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const pipelineServiceClient = new aiplatform.v1.PipelineServiceClient( - clientOptions -); - -const datasetId = '5148529167758786560'; -const modelDisplayName = `temp_create_training_pipeline_sentiment_analysis_model_test${uuid()}`; -const trainingPipelineDisplayName = `temp_create_training_pipeline_sentiment_analysis_test_${uuid()}`; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let trainingPipelineId; - -describe('AI platform create training pipeline text sentiment analysis', async function () { - this.retries(2); - it('should create a new text sentiment analysis training pipeline', async () => { - const stdout = execSync( - `node ./create-training-pipeline-text-sentiment-analysis.js \ - ${datasetId} \ - ${modelDisplayName} \ - ${trainingPipelineDisplayName} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Create training pipeline text sentiment analysis response/ - ); - trainingPipelineId = stdout - .split('/locations/us-central1/trainingPipelines/')[1] - .split('\n')[0]; - }); - after('should cancel the training pipeline and delete it', async () => { - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - - const cancelRequest = { - name, - }; - - pipelineServiceClient.cancelTrainingPipeline(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return pipelineServiceClient.deleteTrainingPipeline(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-training-pipeline-video-action-recognition.test.js b/samples/test/create-training-pipeline-video-action-recognition.test.js deleted file mode 100644 index 33d5f472..00000000 --- a/samples/test/create-training-pipeline-video-action-recognition.test.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const pipelineServiceClient = new aiplatform.v1.PipelineServiceClient( - clientOptions -); - -const datasetId = '6881957627459272704'; -const modelDisplayName = `temp_create_training_pipeline_node_var_model_test_${uuid()}`; -const trainingPipelineDisplayName = `temp_create_training_pipeline_node_var_test_${uuid()}`; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let trainingPipelineId; - -describe('AI platform create training pipeline video action recognition', async function () { - this.retries(2); - it('should create a new video action-recognition training pipeline', async () => { - const stdout = execSync( - `node ./create-training-pipeline-video-action-recognition.js ${datasetId} ${modelDisplayName} ${trainingPipelineDisplayName} ${project} ${location}` - ); - assert.match( - stdout, - /Create training pipeline video action recognition response/ - ); - trainingPipelineId = stdout - .split('/locations/us-central1/trainingPipelines/')[1] - .split('\n')[0]; - }); - - after('should cancel the training pipeline and delete it', async () => { - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - - const cancelRequest = { - name, - }; - - pipelineServiceClient.cancelTrainingPipeline(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return pipelineServiceClient.deleteTrainingPipeline(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-training-pipeline-video-classification.test.js b/samples/test/create-training-pipeline-video-classification.test.js deleted file mode 100644 index 5a818b6f..00000000 --- a/samples/test/create-training-pipeline-video-classification.test.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const pipelineServiceClient = new aiplatform.v1.PipelineServiceClient( - clientOptions -); - -const datasetId = '3757409464110546944'; -const modelDisplayName = `temp_create_training_pipeline_video_classification_model_test${uuid()}`; -const trainingPipelineDisplayName = `temp_create_training_pipeline_video_classification_test_${uuid()}`; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let trainingPipelineId; - -describe('AI platform create training pipeline video classification', async function () { - this.retries(2); - it('should create a new video classification training pipeline', async () => { - const stdout = execSync( - `node ./create-training-pipeline-video-classification.js ${datasetId} \ - ${modelDisplayName} \ - ${trainingPipelineDisplayName} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Create training pipeline video classification response/ - ); - trainingPipelineId = stdout - .split('/locations/us-central1/trainingPipelines/')[1] - .split('\n')[0]; - }); - - after('should cancel the training pipeline and delete it', async () => { - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - - const cancelRequest = { - name, - }; - - pipelineServiceClient.cancelTrainingPipeline(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return pipelineServiceClient.deleteTrainingPipeline(deleteRequest); - }); - }); -}); diff --git a/samples/test/create-training-pipeline-video-object-tracking.test.js b/samples/test/create-training-pipeline-video-object-tracking.test.js deleted file mode 100644 index b6a89336..00000000 --- a/samples/test/create-training-pipeline-video-object-tracking.test.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const pipelineServiceClient = new aiplatform.v1.PipelineServiceClient( - clientOptions -); - -const datasetId = '1138566280794603520'; -const modelDisplayName = `temp_create_training_pipeline_video_object_tracking_model_test${uuid()}`; -const trainingPipelineDisplayName = `temp_create_training_pipeline_video_object_tracking_test_${uuid()}`; -const location = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -let trainingPipelineId; - -describe('AI platform create training pipeline object tracking', async function () { - this.retries(2); - it('should create a new object tracking training pipeline', async () => { - const stdout = execSync( - `node ./create-training-pipeline-video-object-tracking.js \ - ${datasetId} ${modelDisplayName} \ - ${trainingPipelineDisplayName} \ - ${project} ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Create training pipeline video object tracking response/ - ); - trainingPipelineId = stdout - .split('/locations/us-central1/trainingPipelines/')[1] - .split('\n')[0]; - }); - - after('should cancel the training pipeline and delete it', async () => { - const name = pipelineServiceClient.trainingPipelinePath( - project, - location, - trainingPipelineId - ); - - const cancelRequest = { - name, - }; - - pipelineServiceClient.cancelTrainingPipeline(cancelRequest).then(() => { - const deleteRequest = { - name, - }; - - return pipelineServiceClient.deleteTrainingPipeline(deleteRequest); - }); - }); -}); diff --git a/samples/test/deploy-model-custom-trained-model.test.js b/samples/test/deploy-model-custom-trained-model.test.js deleted file mode 100644 index e5451871..00000000 --- a/samples/test/deploy-model-custom-trained-model.test.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const endpointDisplayName = `temp_create_endpoint_test_${uuid()}`; - -const modelId = '6430031960164270080'; -const deployedModelDisplayName = `temp_deploy_model_custom_model_test_${uuid()}`; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; -let deployedModelId; -let endpointId; - -describe('AI platform deploy model custom model', () => { - it('should deploy the custom model in the specified endpoint', async () => { - const endOut = execSync( - `node ./create-endpoint.js ${endpointDisplayName} ${project} \ - ${location}` - ); - endpointId = endOut - .split('/locations/us-central1/endpoints/')[1] - .split('\n')[0] - .split('/')[0]; - const stdout = execSync( - `node ./deploy-model-custom-trained-model.js ${modelId} \ - ${deployedModelDisplayName} \ - ${endpointId} \ - ${project} ${location}` - ); - assert.match(stdout, /Deploy model response/); - deployedModelId = stdout.split('Id : ')[1].split('\n')[0]; - }); - - after('should undeploy the deployed custom model', async () => { - execSync( - `node ./undeploy-model.js ${deployedModelId} ${endpointId} ${project} \ - ${location}` - ); - execSync(`node ./delete-endpoint.js ${endpointId} ${project} ${location}`); - }); -}); diff --git a/samples/test/deploy-model.test.js b/samples/test/deploy-model.test.js deleted file mode 100644 index dcd84b91..00000000 --- a/samples/test/deploy-model.test.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const endpointDisplayName = `temp_create_endpoint_test_${uuid()}`; - -const modelId = '4190810559500779520'; -const deployedModelDisplayName = `temp_deploy_model_test_${uuid()}`; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; -let deployedModelId; -let endpointId; - -describe('AI platform deploy model', () => { - it('should deploy the model in the specified endpoint', async () => { - const endOut = - execSync(`node ./create-endpoint.js ${endpointDisplayName} ${project} \ - ${location}`); - endpointId = endOut - .split('/locations/us-central1/endpoints/')[1] - .split('\n')[0] - .split('/')[0]; - const stdout = - execSync(`node ./deploy-model.js ${modelId} ${deployedModelDisplayName} \ - ${endpointId} \ - ${project} ${location}`); - assert.match(stdout, /Deploy model response/); - deployedModelId = stdout.split('Id : ')[1].split('\n')[0]; - }); - - after('should undeploy the deployed model', async () => { - // If test failed, the attempt to undeploy will fail too. - // Check to see whether we have a deployedModelId - if (deployedModelId === undefined) { - return; - } - - execSync(`node ./undeploy-model.js ${deployedModelId} ${endpointId} ${project} \ - ${location}`); - execSync(`node ./delete-endpoint.js ${endpointId} ${project} ${location}`); - }); -}); diff --git a/samples/test/entity-type-samples.test.js b/samples/test/entity-type-samples.test.js deleted file mode 100644 index 50b7dc90..00000000 --- a/samples/test/entity-type-samples.test.js +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; -const {after, before, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const project = process.env.CAIP_PROJECT_ID; -const featurestoreId = `featurestore_sample_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; -const fixedNodeCount = 1; -const entityTypeId1 = `entity_type_sample_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; -const entityTypeId2 = `entity_type_sample_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; -const entityType1Description = - 'created during the entity type 1 sample testing'; -const entityType2Description = - 'created during the entity type 2 sample testing'; -const duration = 86400; -const updatedDuration = 172800; -const location = 'us-central1'; -const apiEndpoint = 'us-central1-aiplatform.googleapis.com'; - -// Instantiates a featurestore clients -const featurestoreServiceClient = new FeaturestoreServiceClient({ - apiEndpoint: apiEndpoint, -}); - -const deleteFeaturestore = async () => { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const request = { - name: name, - force: true, - }; - - // Delete Featurestore request - const [operation] = await featurestoreServiceClient.deleteFeaturestore( - request, - {timeout: 60000} - ); - await operation.promise(); -}; - -describe('AI platform entity type api samples test', async function () { - this.retries(2); - before('should create the featurestore', async () => { - execSync( - `node ./create-featurestore-fixed-nodes-sample.js ${project} ${featurestoreId} ${fixedNodeCount} ${location} ${apiEndpoint}` - ); - }); - it('should create the entity type', async () => { - const stdout = execSync( - `node ./create-entity-type-sample.js ${project} ${featurestoreId} ${entityTypeId1} "${entityType1Description}" ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Create entity type response/); - }); - it('should create the entity type with monitoring', async () => { - const stdout = execSync( - `node ./create-entity-type-monitoring-sample.js ${project} ${featurestoreId} ${entityTypeId2} "${entityType2Description}" ${duration} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Create entity type monitoring response/); - }); - it('should get the created entity type', async () => { - const stdout = execSync( - `node ./get-entity-type-sample.js ${project} ${featurestoreId} ${entityTypeId1} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Get entity type response/); - }); - it('should list the entity types', async () => { - const stdout = execSync( - `node ./list-entity-types-sample.js ${project} ${featurestoreId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /List entity types response/); - }); - it('should list the entity types asynchronously', async () => { - const stdout = execSync( - `node ./list-entity-types-async-sample.js ${project} ${featurestoreId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /List entity types async response/); - }); - it('should list the entity types in streaming', async () => { - const stdout = execSync( - `node ./list-entity-types-stream-sample.js ${project} ${featurestoreId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /List entity types stream response/); - }); - it('should update the entity type', async () => { - const stdout = execSync( - `node ./update-entity-type-sample.js ${project} ${featurestoreId} ${entityTypeId1} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Update entity type response/); - }); - it('should update the entity type monitoring', async () => { - const stdout = execSync( - `node ./update-entity-type-monitoring-sample.js ${project} ${featurestoreId} ${entityTypeId2} ${updatedDuration} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Update entity type monitoring response/); - }); - it('should delete the created entity type', async () => { - const stdout = execSync( - `node ./delete-entity-type-sample.js ${project} ${featurestoreId} ${entityTypeId1} true ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Delete entity type response/); - }); - after('should delete the created featurestore', async () => { - await deleteFeaturestore(); - }); -}); diff --git a/samples/test/export-model-tabular-classification.test.js b/samples/test/export-model-tabular-classification.test.js deleted file mode 100644 index c929b4d2..00000000 --- a/samples/test/export-model-tabular-classification.test.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const gcsDestinationOutputUriPrefix = 'gs://ucaip-samples-test-output'; -const modelId = '6036688272397172736'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform export data tabular classification', () => { - it('should export model', async () => { - const stdout = execSync( - `node ./export-model-tabular-classification.js \ - ${gcsDestinationOutputUriPrefix} \ - ${modelId} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Export model response/); - }); -}); diff --git a/samples/test/feature-samples.test.js b/samples/test/feature-samples.test.js deleted file mode 100644 index b2de671b..00000000 --- a/samples/test/feature-samples.test.js +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; -const {after, before, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const project = process.env.CAIP_PROJECT_ID; -const featurestoreId = `featurestore_sample_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; -const fixedNodeCount = 1; -const entityTypeId = `entity_type_sample_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; -const entityTypeDescription = 'created during create feature sample testing'; -const featureId = `feature_sample_${uuid().replace(/-/g, '_').slice(10, 20)}`; -const featureDescription = 'created during create feature sample testing'; -const valueType = 'STRING'; -const query = 'valueType=STRING'; -const location = 'us-central1'; -const apiEndpoint = 'us-central1-aiplatform.googleapis.com'; - -// Instantiates a featurestore clients -const featurestoreServiceClient = new FeaturestoreServiceClient({ - apiEndpoint: apiEndpoint, -}); - -const createFeaturestore = async () => { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}`; - - const featurestore = { - onlineServingConfig: { - fixedNodeCount: fixedNodeCount, - }, - }; - - const request = { - parent: parent, - featurestore: featurestore, - featurestoreId: featurestoreId, - }; - - // Create Featurestore request - const [operation] = await featurestoreServiceClient.createFeaturestore( - request, - {timeout: 900000} - ); - await operation.promise(); -}; - -const deleteFeaturestore = async () => { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const request = { - name: name, - force: true, - }; - - // Delete Featurestore request - const [operation] = await featurestoreServiceClient.deleteFeaturestore( - request, - {timeout: 60000} - ); - await operation.promise(); -}; - -const createEntityType = async () => { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const entityType = { - description: entityTypeDescription, - }; - - const request = { - parent: parent, - entityTypeId: entityTypeId, - entityType: entityType, - }; - - // CreateEntityType request - const [operation] = await featurestoreServiceClient.createEntityType( - request, - {timeout: 300000} - ); - await operation.promise(); -}; - -describe('AI platform feature api samples', async function () { - this.retries(2); - before('should create the featurestore', async () => { - await createFeaturestore(); - }); - before('should create the entity type', async () => { - await createEntityType(); - }); - it('should create feature', async () => { - const stdout = execSync( - `node ./create-feature-sample.js ${project} ${featurestoreId} ${entityTypeId} ${featureId} ${valueType} "${featureDescription}" ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Create feature response/); - }); - it('should batch create features', async () => { - const stdout = execSync( - `node ./batch-create-features-sample.js ${project} ${featurestoreId} ${entityTypeId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Batch create features response/); - }); - it('should get the created feature', async () => { - const stdout = execSync( - `node ./get-feature-sample.js ${project} ${featurestoreId} ${entityTypeId} ${featureId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Get feature response/); - }); - it('should list all the features', async () => { - const stdout = execSync( - `node ./list-features-sample.js ${project} ${featurestoreId} ${entityTypeId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /List features response/); - }); - it('should list all the features asynchronously', async () => { - const stdout = execSync( - `node ./list-features-async-sample.js ${project} ${featurestoreId} ${entityTypeId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /List features async response/); - }); - it('should list all the features in streaming', async () => { - const stdout = execSync( - `node ./list-features-stream-sample.js ${project} ${featurestoreId} ${entityTypeId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /List features stream response/); - }); - it('should search features', async () => { - const stdout = execSync( - `node ./search-features-sample.js ${project} "${query}" ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Search features response/); - }); - it('should search features asynchronously', async () => { - const stdout = execSync( - `node ./search-features-async-sample.js ${project} "${query}" ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Search features async response/); - }); - it('should search features in streaming', async () => { - const stdout = execSync( - `node ./search-features-stream-sample.js ${project} "${query}" ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Search features stream response/); - }); - it('should update the feature', async () => { - const stdout = execSync( - `node ./update-feature-sample.js ${project} ${featurestoreId} ${entityTypeId} ${featureId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Update feature response/); - }); - it('should delete the created feature', async () => { - const stdout = execSync( - `node ./delete-feature-sample.js ${project} ${featurestoreId} ${entityTypeId} ${featureId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Delete feature response/); - }); - after('should delete the created featurestore', async () => { - await deleteFeaturestore(); - }); -}); diff --git a/samples/test/feature-values-samples.test.js b/samples/test/feature-values-samples.test.js deleted file mode 100644 index 17ce0946..00000000 --- a/samples/test/feature-values-samples.test.js +++ /dev/null @@ -1,306 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -'use strict'; - -const {BigQuery} = require('@google-cloud/bigquery'); -const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; -const {assert} = require('chai'); -const {after, before, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const project = process.env.CAIP_PROJECT_ID; -const datasetName = `movie_predictions_nodejs_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; -const batchReadTableName = 'batch_serving_table'; -const exportTableName = 'export_table'; -const exportSnapshotTableName = 'export_snapshot_table'; - -const featurestoreId = `featurestore_sample_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; -const fixedNodeCount = 1; - -const entityTypeId1 = 'perm_users'; -const entityTypeDescription1 = 'Users Entity'; -const entityTypeId2 = 'perm_movies'; -const entityTypeDescription2 = 'Movies Entity'; -const entityId = 'alice'; - -const avroGcsUri1 = - 'gs://cloud-samples-data-us-central1/vertex-ai/feature-store/datasets/users.avro'; -const entityIdField1 = 'user_id'; - -const avroGcsUri2 = - 'gs://cloud-samples-data-us-central1/vertex-ai/feature-store/datasets/movies.avro'; -const entityIdField2 = 'movie_id'; - -const featureTimeField = 'update_time'; -const workerCount = 2; -const batchReadDestinationTableUri = `bq://${project}.${datasetName}.${batchReadTableName}`; -const inputCsvFile = - 'gs://cloud-samples-data-us-central1/vertex-ai/feature-store/datasets/movie_prediction_perm.csv'; - -const timestamp = 1629493102; -const exportDestinationTableUri = `bq://${project}.${datasetName}.${exportTableName}`; -const exportSnapshotDestinationTableUri = `bq://${project}.${datasetName}.${exportSnapshotTableName}`; - -const location = 'us-central1'; -const apiEndpoint = 'us-central1-aiplatform.googleapis.com'; - -// Instantiates a featurestore and bigquery clients -const featurestoreServiceClient = new FeaturestoreServiceClient({ - apiEndpoint: apiEndpoint, -}); -const bigqueryClient = new BigQuery({projectId: project}); - -const createEntityType = async (entityTypeId, entityTypeDescription) => { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const entityType = { - description: entityTypeDescription, - }; - - const request = { - parent: parent, - entityTypeId: entityTypeId, - entityType: entityType, - }; - - // CreateEntityType request - const [operation] = await featurestoreServiceClient.createEntityType( - request, - {timeout: 300000} - ); - await operation.promise(); -}; - -const createPermUsersFeatures = async () => { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId1}`; - - const ageFeature = { - valueType: 'INT64', - description: 'User age', - }; - - const ageFeatureRequest = { - feature: ageFeature, - featureId: 'age', - }; - - const genderFeature = { - valueType: 'STRING', - description: 'User gender', - }; - - const genderFeatureRequest = { - feature: genderFeature, - featureId: 'gender', - }; - - const likedGenresFeature = { - valueType: 'STRING_ARRAY', - description: 'An array of genres that this user liked', - }; - - const likedGenresFeatureRequest = { - feature: likedGenresFeature, - featureId: 'liked_genres', - }; - - const requests = [ - ageFeatureRequest, - genderFeatureRequest, - likedGenresFeatureRequest, - ]; - - const request = { - parent: parent, - requests: requests, - }; - - // Batch Create Features request - const [operation] = await featurestoreServiceClient.batchCreateFeatures( - request, - {timeout: 300000} - ); - await operation.promise(); -}; - -const createPermMoviesFeatures = async () => { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId2}`; - - const titleFeatureRequest = { - feature: { - valueType: 'STRING', - description: 'The title of the movie', - }, - featureId: 'title', - }; - - const genresFeatureRequest = { - feature: { - valueType: 'STRING', - description: 'The genres of the movie', - }, - featureId: 'genres', - }; - - const averageRatingFeatureRequest = { - feature: { - valueType: 'DOUBLE', - description: 'The average rating for the movie, range is [1.0-5.0]', - }, - featureId: 'average_rating', - }; - - const requests = [ - titleFeatureRequest, - genresFeatureRequest, - averageRatingFeatureRequest, - ]; - - const request = { - parent: parent, - requests: requests, - }; - - // Batch Create Features request - const [operation] = await featurestoreServiceClient.batchCreateFeatures( - request, - {timeout: 300000} - ); - await operation.promise(); -}; - -const importPermMoviesFeatures = async () => { - // Configure the entityType resource - const entityType = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId2}`; - - const avroSource = { - gcsSource: { - uris: [avroGcsUri2], - }, - }; - - const featureSpecs = [{id: 'title'}, {id: 'genres'}, {id: 'average_rating'}]; - - const request = { - entityType: entityType, - avroSource: avroSource, - entityIdField: entityIdField2, - featureSpecs: featureSpecs, - featureTimeField: featureTimeField, - workerCount: workerCount, - }; - - // Import Feature Values Request - const [operation] = await featurestoreServiceClient.importFeatureValues( - request, - {timeout: 300000} - ); - await operation.promise(); -}; - -const deleteFeaturestore = async () => { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const request = { - name: name, - force: true, - }; - - // Delete Featurestore request - const [operation] = await featurestoreServiceClient.deleteFeaturestore( - request, - {timeout: 60000} - ); - await operation.promise(); -}; - -describe('AI platform feature values apis', async function () { - this.retries(2); - before('should create the BigQuery Dataset', async () => { - await bigqueryClient.createDataset(datasetName, location); - }); - before('should create the featurestore', async () => { - execSync( - `node ./create-featurestore-fixed-nodes-sample.js ${project} ${featurestoreId} ${fixedNodeCount} ${location} ${apiEndpoint}` - ); - }); - before('should create the perm_users entity type', async () => { - await createEntityType(entityTypeId1, entityTypeDescription1); - }); - before('should create the perm_movies entity type', async () => { - await createEntityType(entityTypeId2, entityTypeDescription2); - }); - before('should create the perm_movies batch features', async () => { - await createPermMoviesFeatures(); - }); - before('should create the perm_users batch features', async () => { - await createPermUsersFeatures(); - }); - before('should import perm_movies feature values', async () => { - await importPermMoviesFeatures(); - }); - it('should import feature values', async () => { - const stdout = execSync( - `node ./import-feature-values-sample.js ${project} ${featurestoreId} ${entityTypeId1} "${avroGcsUri1}" ${entityIdField1} ${featureTimeField} ${workerCount} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Import feature values response/); - }); - it('should batch read feature values', async () => { - const stdout = execSync( - `node ./batch-read-feature-values-sample.js ${project} ${featurestoreId} ${inputCsvFile} "${batchReadDestinationTableUri}" ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Batch read feature values response/); - }); - it('should read feature values', async () => { - const stdout = execSync( - `node ./read-feature-values-sample.js ${project} ${featurestoreId} ${entityTypeId1} ${entityId} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Read feature values response/); - }); - it('should export feature values', async () => { - const stdout = execSync( - `node ./export-feature-values-sample.js ${project} ${featurestoreId} ${entityTypeId1} "${exportDestinationTableUri}" ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Export feature values response/); - }); - it('should export feature values using snapshot', async () => { - const stdout = execSync( - `node ./export-feature-values-snapshot-sample.js ${project} ${featurestoreId} ${entityTypeId1} "${exportSnapshotDestinationTableUri}" ${timestamp} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Export feature values snapshot response/); - }); - after('should delete the created featurestore', async () => { - await deleteFeaturestore(); - }); - - after('should delete the created dataset', async () => { - // Create a reference to the existing dataset - const dataset = bigqueryClient.dataset(datasetName); - // Delete the dataset and its contents - await dataset.delete({force: true}); - }); -}); diff --git a/samples/test/featurestore-samples.test.js b/samples/test/featurestore-samples.test.js deleted file mode 100644 index c759ba53..00000000 --- a/samples/test/featurestore-samples.test.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, before, describe, it} = require('mocha'); -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const project = process.env.CAIP_PROJECT_ID; -const featurestoreId1 = `featurestore_sample_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; -const featurestoreId2 = `featurestore_sample_${uuid() - .replace(/-/g, '_') - .slice(10, 20)}`; - -const fixedNodeCount = 1; -const updatedFixedNodeCount = 3; -const minNodeCount = 1; -const maxNodeCount = 3; -const updatedMinNodeCount = 2; -const updatedMaxNodeCount = 4; -const location = 'us-central1'; -const apiEndpoint = 'us-central1-aiplatform.googleapis.com'; - -describe('AI platform featurestore api samples test', async function () { - this.retries(2); - before('should create a featurestore with fixed nodes', async () => { - execSync( - `node ./create-featurestore-fixed-nodes-sample.js ${project} ${featurestoreId1} ${fixedNodeCount} ${location} ${apiEndpoint}` - ); - }); - before('should create a featurestore with autoscaling', async () => { - execSync( - `node ./create-featurestore-sample.js ${project} ${featurestoreId2} ${minNodeCount} ${maxNodeCount} ${location} ${apiEndpoint}` - ); - }); - it('should get the featurestore', async () => { - const stdout = execSync( - `node ./get-featurestore-sample.js ${project} ${featurestoreId1} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Get featurestore response/); - }); - it('should list the featurestores', async () => { - const stdout = execSync( - `node ./list-featurestores-sample.js ${project} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /List featurestores response/); - }); - it('should list the featurestores asynchronously', async () => { - const stdout = execSync( - `node ./list-featurestores-async-sample.js ${project} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /List featurestores async response/); - }); - it('should list the featurestores in streaming', async () => { - const stdout = execSync( - `node ./list-featurestores-stream-sample.js ${project} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /List featurestores stream response/); - }); - it('should update featurestores fixed nodes', async () => { - const stdout = execSync( - `node ./update-featurestore-fixed-nodes-sample.js ${project} ${featurestoreId1} ${updatedFixedNodeCount} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Update featurestore fixed nodes response/); - }); - it('should update featurestore autoscaling', async () => { - const stdout = execSync( - `node ./update-featurestore-sample.js ${project} ${featurestoreId2} ${updatedMinNodeCount} ${updatedMaxNodeCount} ${location} ${apiEndpoint}` - ); - assert.match(stdout, /Update featurestore response/); - }); - it('should delete the created featurestore', async () => { - const stdout = execSync( - `node ./delete-featurestore-sample.js ${project} ${featurestoreId1} true ${location}` - ); - assert.match(stdout, /Delete featurestore response/); - }); - after('should delete the created featurestore 2', async () => { - execSync( - `node ./delete-featurestore-sample.js ${project} ${featurestoreId2} true ${location}` - ); - }); -}); diff --git a/samples/test/get-custom-job.test.js b/samples/test/get-custom-job.test.js deleted file mode 100644 index f51fa2f9..00000000 --- a/samples/test/get-custom-job.test.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const customJobId = '7980906305281851392'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get custom job', () => { - it('should get the specified custom job', async () => { - const stdout = execSync( - `node ./get-custom-job.js ${customJobId} ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Get custom job response/); - }); -}); diff --git a/samples/test/get-hyperparameter-tuning-job.test.js b/samples/test/get-hyperparameter-tuning-job.test.js deleted file mode 100644 index a334a8e0..00000000 --- a/samples/test/get-hyperparameter-tuning-job.test.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const tuningJobId = '2216298782247616512'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get hyperparameter tuning job', () => { - it('should get the specified hyperparameter tuning job', async () => { - const stdout = execSync( - `node ./get-hyperparameter-tuning-job.js ${tuningJobId} ${project} ${location}` - ); - assert.match(stdout, /Get hyperparameter tuning job response/); - }); -}); diff --git a/samples/test/get-model-evaluation-slice.test.js b/samples/test/get-model-evaluation-slice.test.js deleted file mode 100644 index 85033539..00000000 --- a/samples/test/get-model-evaluation-slice.test.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const modelId = '3512561418744365056'; -const evaluationId = '9035588644970168320'; -const sliceId = '6481571820677004173'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get model evaluation slice', () => { - it('should get the evaluation slice from the specified model', async () => { - const stdout = execSync( - `node ./get-model-evaluation-slice.js ${modelId} ${evaluationId} \ - ${sliceId} ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Get model evaluation slice/); - }); -}); diff --git a/samples/test/get-model-evaluation-tabular-classification.test.js b/samples/test/get-model-evaluation-tabular-classification.test.js deleted file mode 100644 index b4ea49e9..00000000 --- a/samples/test/get-model-evaluation-tabular-classification.test.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const modelId = '6036688272397172736'; -const evaluationId = '1866113044163962838'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get tabular classification model evaluation', () => { - it('should get the evaluation from the specified model', async () => { - const stdout = execSync( - `node ./get-model-evaluation-tabular-classification.js ${modelId} \ - ${evaluationId} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match( - stdout, - /Get model evaluation tabular classification response/ - ); - }); -}); diff --git a/samples/test/get-model-evaluation-tabular-regression.test.js b/samples/test/get-model-evaluation-tabular-regression.test.js deleted file mode 100644 index 8bed8361..00000000 --- a/samples/test/get-model-evaluation-tabular-regression.test.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const modelId = '8842430840248991744'; -const evaluationId = '4944816689650806017'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get tabular regression model evaluation', () => { - it('should get the evaluation from the specified model', async () => { - const stdout = execSync( - `node ./get-model-evaluation-tabular-regression.js ${modelId} \ - ${evaluationId} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Get model evaluation tabular regression response/); - }); -}); diff --git a/samples/test/get-model-evaluation-video-action-recognition.test.js b/samples/test/get-model-evaluation-video-action-recognition.test.js deleted file mode 100644 index e2c66995..00000000 --- a/samples/test/get-model-evaluation-video-action-recognition.test.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const modelId = '3530998029718913024'; -const evaluationId = '305008923591573504'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get video action recognition model evaluation', () => { - it('should get the evaluation from the specified model', async () => { - const stdout = execSync( - `node ./get-model-evaluation-video-action-recognition.js ${modelId} \ - ${evaluationId} \ - ${project} \ - ${location}` - ); - assert.match( - stdout, - /Get model evaluation video action recognition response/ - ); - }); -}); diff --git a/samples/test/get-model-evaluation-video-classification.test.js b/samples/test/get-model-evaluation-video-classification.test.js deleted file mode 100644 index 8f0cc4f1..00000000 --- a/samples/test/get-model-evaluation-video-classification.test.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const modelId = '8596984660557299712'; -const evaluationId = '7092045712224944128'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get video classification model evaluation', () => { - it('should get the evaluation from the specified model', async () => { - const stdout = execSync( - `node ./get-model-evaluation-video-classification.js ${modelId} \ - ${evaluationId} \ - ${project} \ - ${location} `, - { - cwd, - } - ); - assert.match(stdout, /Get model evaluation video classification response/); - }); -}); diff --git a/samples/test/get-model-evaluation-video-object-tracking.test.js b/samples/test/get-model-evaluation-video-object-tracking.test.js deleted file mode 100644 index 01e3cded..00000000 --- a/samples/test/get-model-evaluation-video-object-tracking.test.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const modelId = '8609932509485989888'; -const evaluationId = '6016811301190238208'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get video object tracking model evaluation', () => { - it('should get the evaluation from the specified model', async () => { - const stdout = execSync( - `node ./get-model-evaluation-video-object-tracking.js ${modelId} \ - ${evaluationId} \ - ${project} \ - ${location} `, - { - cwd, - } - ); - assert.match(stdout, /Get model evaluation video object tracking response/); - }); -}); diff --git a/samples/test/get-model.test.js b/samples/test/get-model.test.js deleted file mode 100644 index f2fd901d..00000000 --- a/samples/test/get-model.test.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const modelId = '3512561418744365056'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get model', () => { - it('should get the specified model', async () => { - const stdout = execSync( - `node ./get-model.js ${modelId} ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Get model response/); - }); -}); diff --git a/samples/test/get-training-pipeline.test.js b/samples/test/get-training-pipeline.test.js deleted file mode 100644 index b7455d90..00000000 --- a/samples/test/get-training-pipeline.test.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const trainingPipelineId = '1419759782528548864'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform get training pipeline', () => { - it('should get the specified training pipeline', async () => { - const stdout = execSync( - `node ./get-training-pipeline.js ${trainingPipelineId} ${project} ${location}` - ); - assert.match(stdout, /Get training pipeline response/); - }); -}); diff --git a/samples/test/import-data-video-action-recognition.test.js b/samples/test/import-data-video-action-recognition.test.js deleted file mode 100644 index ad72270e..00000000 --- a/samples/test/import-data-video-action-recognition.test.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const {assert} = require('chai'); -const {after, before, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const aiplatform = require('@google-cloud/aiplatform'); -const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', -}; - -const datasetServiceClient = new aiplatform.v1.DatasetServiceClient( - clientOptions -); - -let datasetId = ''; -const datasetDisplayName = `temp_import_data_node_var_${uuid()}`; -const gcsSourceUri = 'gs://automl-video-demo-data/ucaip-var/swimrun.jsonl'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform import data video action recognition', () => { - before('should create the new dataset', async () => { - const parent = `projects/${project}/locations/${location}`; - const [operation] = await datasetServiceClient.createDataset({ - parent, - dataset: { - displayName: datasetDisplayName, - metadataSchemaUri: - 'gs://google-cloud-aiplatform/schema/dataset/metadata/video_1.0.0.yaml', - }, - }); - const [response] = await operation.promise(); - const datasetName = response.name; - datasetId = datasetName.split('datasets/')[1]; - }); - - it('should import video action recognition data to dataset', async () => { - const stdout = execSync( - `node ./import-data-video-action-recognition.js ${datasetId} ${gcsSourceUri} ${project} ${location}` - ); - assert.match(stdout, /Import data video action recognition response/); - }); - - after('should cancel the import job and delete the dataset', async () => { - const datasetName = datasetServiceClient.datasetPath( - project, - location, - datasetId - ); - const [operation] = await datasetServiceClient.deleteDataset({ - name: datasetName, - }); - await operation.promise(); - }); -}); diff --git a/samples/test/import-data-video-classification.test.js b/samples/test/import-data-video-classification.test.js deleted file mode 100644 index 9c4334f1..00000000 --- a/samples/test/import-data-video-classification.test.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const datasetId = '3757409464110546944'; -const gcsSourceUri = - 'gs://ucaip-sample-resources/hmdb_split1_5classes_train.jsonl'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform import data video classification', () => { - it('should import video classification data to dataset', async () => { - const stdout = execSync( - `node ./import-data-video-classification.js ${datasetId} \ - ${gcsSourceUri} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Import data video classification response/); - }); -}); diff --git a/samples/test/list-endpoints.test.js b/samples/test/list-endpoints.test.js deleted file mode 100644 index 72749166..00000000 --- a/samples/test/list-endpoints.test.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright 2020, 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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); -const LOCATION = 'us-central1'; -const project = process.env.CAIP_PROJECT_ID; - -describe('AI platform list endpoints', () => { - it('should list all endpoints in a parent resource', async () => { - const stdout = execSync(`node ./list-endpoints.js ${project} ${LOCATION}`, { - cwd, - }); - assert.match(stdout, /Endpoint/); - }); -}); diff --git a/samples/test/list-model-evaluation-slices.test.js b/samples/test/list-model-evaluation-slices.test.js deleted file mode 100644 index 10e0ad3a..00000000 --- a/samples/test/list-model-evaluation-slices.test.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const modelId = '3512561418744365056'; -const evaluationId = '9035588644970168320'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -describe('AI platform list model evaluation slices', () => { - it('should list all the evaluation slices from the \ - specified model', async () => { - const stdout = execSync( - `node ./list-model-evaluation-slices.js ${modelId} \ - ${evaluationId} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /List model evaluation response/); - }); -}); diff --git a/samples/test/predict-image-classification.test.js b/samples/test/predict-image-classification.test.js deleted file mode 100644 index 4947dbd9..00000000 --- a/samples/test/predict-image-classification.test.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); -const filename = 'resources/daisy.jpg'; -const endpointId = '71213169107795968'; -const project = process.env.CAIP_PROJECT_ID; -const location = 'us-central1'; - -describe('AI platform predict image classification', async function () { - this.retries(2); - it('should make predictions using the image classification model', async () => { - const stdout = execSync( - `node ./predict-image-classification.js ${filename} \ - ${endpointId} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Predict image classification response/); - }); -}); diff --git a/samples/test/predict-image-object-detection.test.js b/samples/test/predict-image-object-detection.test.js deleted file mode 100644 index d482ea55..00000000 --- a/samples/test/predict-image-object-detection.test.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const filename = 'resources/caprese_salad.jpg'; -const endpointId = '2791387344039575552'; -const project = process.env.CAIP_PROJECT_ID; -const location = 'us-central1'; - -describe('AI platform predict image object detection', async function () { - this.retries(2); - it('should make predictions using the image object detection model', async () => { - const stdout = execSync( - `node ./predict-image-object-detection.js ${filename} \ - ${endpointId} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Predict image object detection response/); - }); -}); diff --git a/samples/test/predict-tabular-classification.test.js b/samples/test/predict-tabular-classification.test.js deleted file mode 100644 index 1bb90a85..00000000 --- a/samples/test/predict-tabular-classification.test.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const endpointId = '4966625964059525120'; -const project = process.env.CAIP_PROJECT_ID; -const location = 'us-central1'; - -describe('AI platform predict tabular classification', () => { - it('should make predictions using the tabular classification model', async () => { - const stdout = execSync( - `node ./predict-tabular-classification.js ${endpointId} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - console.log(stdout); - assert.match(stdout, /Predict tabular classification response/); - }); -}); diff --git a/samples/test/predict-tabular-regression.test.js b/samples/test/predict-tabular-regression.test.js deleted file mode 100644 index 6e18ee6a..00000000 --- a/samples/test/predict-tabular-regression.test.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const endpointId = '1014154341088493568'; -const project = process.env.CAIP_PROJECT_ID; -const location = 'us-central1'; - -describe('AI platform predict tabular regression', () => { - it('should make predictions using the tabular regression model', async () => { - const stdout = execSync( - `node ./predict-tabular-regression.js ${endpointId} ${project} ${location}`, - { - cwd, - } - ); - console.log(stdout); - assert.match(stdout, /Predict tabular regression response/); - }); -}); diff --git a/samples/test/predict-text-classification.test.js b/samples/test/predict-text-classification.test.js deleted file mode 100644 index c4654b13..00000000 --- a/samples/test/predict-text-classification.test.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const textInput = - 'My local greasy-spoon diner took way too long' + - 'to get my food. It also costs too much. Good food though.'; -const endpointId = '65372563341049856'; -const project = process.env.CAIP_PROJECT_ID; -const location = 'us-central1'; - -describe('AI platform predict text classification', () => { - it('should make predictions using the text classification model', async () => { - const stdout = execSync( - `node ./predict-text-classification.js "${textInput}" ${endpointId} ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Predict text classification response/); - }); -}); diff --git a/samples/test/predict-text-entity-extraction.test.js b/samples/test/predict-text-entity-extraction.test.js deleted file mode 100644 index d2ab4e26..00000000 --- a/samples/test/predict-text-entity-extraction.test.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const textInput = - 'Bipolar depression and anxiety are often hereditary diseases.'; -const endpointId = '6207156555167563776'; -const project = process.env.CAIP_PROJECT_ID; -const location = 'us-central1'; - -describe('AI platform predict text entity extraction', () => { - it('should make predictions using the text extraction model', async () => { - const stdout = execSync( - `node ./predict-text-entity-extraction.js "${textInput}" ${endpointId} ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Predict text entity extraction response/); - }); -}); diff --git a/samples/test/predict-text-sentiment-analysis.test.js b/samples/test/predict-text-sentiment-analysis.test.js deleted file mode 100644 index 46659416..00000000 --- a/samples/test/predict-text-sentiment-analysis.test.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const textInput = - 'Economic downturns can be very scary for normal workers.' + - " I dislike how the stock market's fluctuations affect my retirement."; -const endpointId = '7811563922418302976'; -const project = process.env.CAIP_PROJECT_ID; -const location = 'us-central1'; - -describe('AI platform predict text sentiment analysis', () => { - it('should make predictions using the text sentiment model', async () => { - const stdout = execSync( - `node ./predict-text-sentiment-analysis.js "${textInput}" ${endpointId} ${project} ${location}`, - { - cwd, - } - ); - assert.match(stdout, /Predict text sentiment analysis response/); - }); -}); diff --git a/samples/test/quickstart.test.js b/samples/test/quickstart.test.js deleted file mode 100644 index 25e3bce2..00000000 --- a/samples/test/quickstart.test.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright 2017, Google, Inc. - * 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. - */ - -'use strict'; - -const assert = require('assert'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('quickstart', () => { - it('should have functional quickstart', async () => { - const stdout = execSync('node quickstart.js'); - assert(stdout.match(/DatasetServiceClient/)); - }); -}); diff --git a/samples/test/upload-model.test.js b/samples/test/upload-model.test.js deleted file mode 100644 index b06c3eb1..00000000 --- a/samples/test/upload-model.test.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {after, describe, it} = require('mocha'); - -const uuid = require('uuid').v4; -const cp = require('child_process'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -const modelDisplayName = `temp_upload_model_test${uuid()}`; -const imageUri = - 'gcr.io/cloud-ml-service-public/cloud-ml-online-prediction-model-server-cpu:v1_15py3cmle_op_images_20200229_0210_RC00'; -const artifactUri = 'gs://ucaip-samples-us-central1/model/explain/'; -const project = process.env.CAIP_PROJECT_ID; -const location = process.env.LOCATION; - -let modelId; - -describe('AI platform upload model', () => { - it('should upload the specified model', async () => { - const stdout = execSync( - `node ./upload-model.js ${modelDisplayName} \ - ${imageUri} \ - ${artifactUri} \ - ${project} \ - ${location}`, - { - cwd, - } - ); - console.log(stdout); - assert.match(stdout, /Upload model response/); - modelId = stdout - .split('/locations/us-central1/models/')[1] - .split('\n')[0] - .split('/')[0]; - }); - after('delete the model', async () => { - execSync(`node ./delete-model.js ${modelId} ${project} ${location}`, { - cwd, - }); - }); -}); diff --git a/samples/undeploy-model.js b/samples/undeploy-model.js deleted file mode 100644 index 7081558b..00000000 --- a/samples/undeploy-model.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - deployedModelId, - endpointId, - project, - location = 'us-central1' -) { - // [START aiplatform_undeploy_model_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const deployedModelId = "YOUR_MODEL_ID"; - // const endpointId = 'YOUR_ENDPOINT_ID'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - const endpoint = `projects/${project}/locations/${location}/endpoints/${endpointId}`; - // Imports the Google Cloud Endpoint Service Client library - const {EndpointServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint: - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const endpointServiceClient = new EndpointServiceClient(clientOptions); - - async function undeployModel() { - // Configure the parent resource - const request = { - deployedModelId, - endpoint, - }; - - // Get and print out a list of all the endpoints for this resource - const [response] = await endpointServiceClient.undeployModel(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - - console.log('Undeploy model response'); - console.log(response); - } - undeployModel(); - // [END aiplatform_undeploy_model_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/update-entity-type-monitoring-sample.js b/samples/update-entity-type-monitoring-sample.js deleted file mode 100644 index 24d797ea..00000000 --- a/samples/update-entity-type-monitoring-sample.js +++ /dev/null @@ -1,105 +0,0 @@ -/* - * 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 - * - * https://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 EntityType with monitoring configuration. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - duration, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_update_entity_type_monitoring_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const duration = ; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = - require('@google-cloud/aiplatform').v1beta1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function updateEntityTypeMonitoring() { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - // Constructing the monitoring configuration - const monitoringConfig = { - snapshotAnalysis: { - monitoringInterval: { - seconds: Number(duration), - }, - }, - }; - - // Constructing the entityType - const entityType = { - name: name, - monitoringConfig: monitoringConfig, - }; - - const request = { - entityType: entityType, - }; - - // Update EntityType request - const [response] = await featurestoreServiceClient.updateEntityType( - request, - {timeout: Number(timeout)} - ); - - console.log('Update entity type monitoring response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - updateEntityTypeMonitoring(); - // [END aiplatform_update_entity_type_monitoring_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/update-entity-type-sample.js b/samples/update-entity-type-sample.js deleted file mode 100644 index dfb3872c..00000000 --- a/samples/update-entity-type-sample.js +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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 - * - * https://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 EntityType. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_update_entity_type_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function updateEntityType() { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`; - - // Constructing the entityType - const entityType = { - name: name, - labels: { - language: 'nodejs', - project: 'vertex-ai-dev', - }, - description: 'updated description', - }; - - const request = { - entityType: entityType, - }; - - // Update EntityType request - const [response] = await featurestoreServiceClient.updateEntityType( - request, - {timeout: Number(timeout)} - ); - - console.log('Update entity type response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - updateEntityType(); - // [END aiplatform_update_entity_type_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/update-feature-sample.js b/samples/update-feature-sample.js deleted file mode 100644 index a3e96026..00000000 --- a/samples/update-feature-sample.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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 - * - * https://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 Feature. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - entityTypeId, - featureId, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 300000 -) { - // [START aiplatform_update_feature_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const entityTypeId = 'YOUR_ENTITY_TYPE_ID'; - // const featureId = 'YOUR_FEATURE_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function updateFeature() { - // Configure the name resource - const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}/features/${featureId}`; - - const feature = { - name: name, - labels: { - language: 'nodejs', - created_by: 'update_feature', - }, - }; - - const request = { - feature: feature, - }; - - // Update Feature request - const [response] = await featurestoreServiceClient.updateFeature(request, { - timeout: Number(timeout), - }); - - console.log('Update feature response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - updateFeature(); - // [END aiplatform_update_feature_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/update-featurestore-fixed-nodes-sample.js b/samples/update-featurestore-fixed-nodes-sample.js deleted file mode 100644 index dabf8e7f..00000000 --- a/samples/update-featurestore-fixed-nodes-sample.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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 - * - * https://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 - */ - -'use strict'; - -async function main( - project, - featurestoreId, - fixedNodeCount = 1, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 600000 -) { - // [START aiplatform_update_featurestore_fixed_nodes_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const fixedNodeCount = ; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function updateFeaturestoreFixedNodes() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const featurestore = { - name: parent, - onlineServingConfig: {fixedNodeCount: Number(fixedNodeCount)}, - }; - - const request = { - featurestore: featurestore, - }; - - // Update Featurestore request - const [operation] = await featurestoreServiceClient.updateFeaturestore( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Update featurestore fixed nodes response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - updateFeaturestoreFixedNodes(); - // [END aiplatform_update_featurestore_fixed_nodes_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/update-featurestore-sample.js b/samples/update-featurestore-sample.js deleted file mode 100644 index 8cf89b93..00000000 --- a/samples/update-featurestore-sample.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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 - * - * https://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 with autoscaling configuration. - * See https://cloud.google.com/vertex-ai/docs/featurestore/setup before running - * the code snippet - */ - -'use strict'; - -async function main( - project, - featurestoreId, - minNodeCount = 1, - maxNodeCount = 3, - location = 'us-central1', - apiEndpoint = 'us-central1-aiplatform.googleapis.com', - timeout = 600000 -) { - // [START aiplatform_update_featurestore_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - * (Not necessary if passing values as arguments) - */ - - // const project = 'YOUR_PROJECT_ID'; - // const featurestoreId = 'YOUR_FEATURESTORE_ID'; - // const minNodeCount = ; - // const maxNodeCount = ; - // const location = 'YOUR_PROJECT_LOCATION'; - // const apiEndpoint = 'YOUR_API_ENDPOINT'; - // const timeout = ; - - // Imports the Google Cloud Featurestore Service Client library - const {FeaturestoreServiceClient} = - require('@google-cloud/aiplatform').v1beta1; - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: apiEndpoint, - }; - - // Instantiates a client - const featurestoreServiceClient = new FeaturestoreServiceClient( - clientOptions - ); - - async function updateFeaturestore() { - // Configure the parent resource - const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`; - - const featurestore = { - name: parent, - onlineServingConfig: { - scaling: { - minNodeCount: minNodeCount, - maxNodeCount: maxNodeCount, - }, - }, - }; - - const request = { - featurestore: featurestore, - }; - - // Update Featurestore request - const [operation] = await featurestoreServiceClient.updateFeaturestore( - request, - {timeout: Number(timeout)} - ); - const [response] = await operation.promise(); - - console.log('Update featurestore response'); - console.log(`Name : ${response.name}`); - console.log('Raw response:'); - console.log(JSON.stringify(response, null, 2)); - } - updateFeaturestore(); - // [END aiplatform_update_featurestore_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2)); diff --git a/samples/upload-model.js b/samples/upload-model.js deleted file mode 100644 index 56e3c01c..00000000 --- a/samples/upload-model.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2020 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 - * - * https://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. - */ - -'use strict'; - -async function main( - modelDisplayName, - imageUri, - artifactUri, - project, - location = 'us-central1' -) { - // [START aiplatform_upload_model_sample] - /** - * TODO(developer): Uncomment these variables before running the sample.\ - */ - - // const modelDisplayName = 'YOUR_MODEL_DISPLAY_NAME'; - // const metadataSchemaUri = 'YOUR_METADATA_SCHEMA_URI'; - // const imageUri = 'YOUR_IMAGE_URI'; - // const artifactUri = 'YOUR_ARTIFACT_URI'; - // const project = 'YOUR_PROJECT_ID'; - // const location = 'YOUR_PROJECT_LOCATION'; - - // Imports the Google Cloud Model Service Client library - const {ModelServiceClient} = require('@google-cloud/aiplatform'); - - // Specifies the location of the api endpoint - const clientOptions = { - apiEndpoint: 'us-central1-aiplatform.googleapis.com', - }; - - // Instantiates a client - const modelServiceClient = new ModelServiceClient(clientOptions); - - async function uploadModel() { - // Configure the parent resources - const parent = `projects/${project}/locations/${location}`; - // Configure the model resources - const model = { - displayName: modelDisplayName, - metadataSchemaUri: '', - artifactUri: artifactUri, - containerSpec: { - imageUri: imageUri, - command: [], - args: [], - env: [], - ports: [], - predictRoute: '', - healthRoute: '', - }, - }; - const request = { - parent, - model, - }; - - console.log('PARENT AND MODEL'); - console.log(parent, model); - // Upload Model request - const [response] = await modelServiceClient.uploadModel(request); - console.log(`Long running operation : ${response.name}`); - - // Wait for operation to complete - await response.promise(); - const result = response.result; - - console.log('Upload model response '); - console.log(`\tModel : ${result.model}`); - } - uploadModel(); - // [END aiplatform_upload_model_sample] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); - -main(...process.argv.slice(2));