From 3f99064cfc29afce6cd7f8b72b881ae7ceb8a394 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 10:26:45 -0700 Subject: [PATCH] feat: add data_item_count to Dataset (#4411) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add data_item_count to Dataset feat: add DeleteSavedQuery to DatasetService feat: add JOB_STATE_PARTIALLY_SUCCEEDED to JobState feat: add pipeline_job to Model feat: add reserved_ip_ranges to PipelineJob PiperOrigin-RevId: 547343567 Source-Link: https://github.com/googleapis/googleapis/commit/72b20cc483d055fd061ce9857e7ade6482ec8056 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4d84e76df6f5a361eca3573a0f69221b421e7359 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjRkODRlNzZkZjZmNWEzNjFlY2EzNTczYTBmNjkyMjFiNDIxZTczNTkifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add data_item_count to Dataset feat: add DeleteSavedQuery to DatasetService feat: add ExportEndpointOperationMetadata and ExportEndpointResponse to Endpoint feat: add JOB_STATE_PARTIALLY_SUCCEEDED to JobState feat: add pipeline_job to Model feat: add persistent_resource.proto and persistent_resource_service.proto feat: add reserved_ip_ranges to PipelineJob feat: add ReadTensorboardSize to TensorboardService PiperOrigin-RevId: 547519544 Source-Link: https://github.com/googleapis/googleapis/commit/4f40e536783917770dc9b1ccd286d10c8430c50e Source-Link: https://github.com/googleapis/googleapis-gen/commit/cf937c7ecbe8ceeaa031f1389934149bdadf04be Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImNmOTM3YzdlY2JlOGNlZWFhMDMxZjEzODk5MzQxNDliZGFkZjA0YmUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-aiplatform/README.md | 7 + .../aiplatform/v1/batch_prediction_job.proto | 5 + .../google/cloud/aiplatform/v1/dataset.proto | 4 + .../cloud/aiplatform/v1/dataset_service.proto | 30 +- .../aiplatform/v1/featurestore_service.proto | 5 +- .../cloud/aiplatform/v1/job_state.proto | 3 + .../google/cloud/aiplatform/v1/model.proto | 12 +- .../cloud/aiplatform/v1/model_service.proto | 10 +- .../google/cloud/aiplatform/v1/nas_job.proto | 2 +- .../cloud/aiplatform/v1/pipeline_job.proto | 13 + .../aiplatform/v1/tensorboard_service.proto | 89 +- .../v1beta1/batch_prediction_job.proto | 5 + .../cloud/aiplatform/v1beta1/custom_job.proto | 14 + .../cloud/aiplatform/v1beta1/dataset.proto | 4 + .../aiplatform/v1beta1/dataset_service.proto | 30 +- .../v1beta1/featurestore_service.proto | 5 +- .../cloud/aiplatform/v1beta1/job_state.proto | 3 + .../aiplatform/v1beta1/model_evaluation.proto | 2 +- .../cloud/aiplatform/v1beta1/nas_job.proto | 2 +- .../v1beta1/persistent_resource.proto | 227 + .../v1beta1/persistent_resource_service.proto | 178 + .../aiplatform/v1beta1/pipeline_job.proto | 13 + .../v1beta1/tensorboard_service.proto | 119 +- .../protos/protos.d.ts | 3504 +++++-- .../google-cloud-aiplatform/protos/protos.js | 9049 ++++++++++++----- .../protos/protos.json | 1131 +- .../google-cloud-aiplatform/samples/README.md | 126 + .../v1/dataset_service.delete_saved_query.js | 64 + ...eaturestore_service.create_featurestore.js | 2 +- ...t_metadata.google.cloud.aiplatform.v1.json | 120 +- .../dataset_service.delete_saved_query.js | 64 + ...eaturestore_service.create_featurestore.js | 2 +- ...urce_service.create_persistent_resource.js | 76 + ...urce_service.delete_persistent_resource.js | 64 + ...esource_service.get_persistent_resource.js | 63 + ...ource_service.list_persistent_resources.js | 75 + ...adata.google.cloud.aiplatform.v1beta1.json | 336 +- ...nsorboard_service.read_tensorboard_size.js | 63 + .../src/v1/dataset_service_client.ts | 167 +- .../src/v1/dataset_service_client_config.json | 4 + .../src/v1/endpoint_service_client.ts | 12 + .../src/v1/featurestore_service_client.ts | 17 +- .../src/v1/gapic_metadata.json | 10 + .../src/v1/index_endpoint_service_client.ts | 12 + .../src/v1/index_service_client.ts | 12 + .../src/v1/job_service_client.ts | 12 + .../src/v1/metadata_service_client.ts | 12 + .../src/v1/migration_service_client.ts | 12 + .../src/v1/model_service_client.ts | 12 + .../src/v1/pipeline_service_client.ts | 12 + .../src/v1/specialist_pool_service_client.ts | 12 + .../src/v1/tensorboard_service_client.ts | 14 +- .../v1/tensorboard_service_client_config.json | 8 +- .../src/v1/vizier_service_client.ts | 12 + .../src/v1beta1/dataset_service_client.ts | 219 +- .../dataset_service_client_config.json | 4 + .../v1beta1/dataset_service_proto_list.json | 2 + ...deployment_resource_pool_service_client.ts | 64 + ...ment_resource_pool_service_proto_list.json | 2 + .../src/v1beta1/endpoint_service_client.ts | 64 + .../v1beta1/endpoint_service_proto_list.json | 2 + ...turestore_online_serving_service_client.ts | 64 + ...ore_online_serving_service_proto_list.json | 2 + .../v1beta1/featurestore_service_client.ts | 69 +- .../featurestore_service_proto_list.json | 2 + .../src/v1beta1/gapic_metadata.json | 78 + .../src/v1beta1/index.ts | 1 + .../v1beta1/index_endpoint_service_client.ts | 64 + .../index_endpoint_service_proto_list.json | 2 + .../src/v1beta1/index_service_client.ts | 64 + .../src/v1beta1/index_service_proto_list.json | 2 + .../src/v1beta1/job_service_client.ts | 64 + .../src/v1beta1/job_service_proto_list.json | 2 + .../src/v1beta1/match_service_client.ts | 64 + .../src/v1beta1/match_service_proto_list.json | 2 + .../src/v1beta1/metadata_service_client.ts | 64 + .../v1beta1/metadata_service_proto_list.json | 2 + .../src/v1beta1/migration_service_client.ts | 64 + .../v1beta1/migration_service_proto_list.json | 2 + .../v1beta1/model_garden_service_client.ts | 64 + .../model_garden_service_proto_list.json | 2 + .../src/v1beta1/model_service_client.ts | 64 + .../src/v1beta1/model_service_proto_list.json | 2 + .../persistent_resource_service_client.ts | 5366 ++++++++++ ...istent_resource_service_client_config.json | 42 + ...ersistent_resource_service_proto_list.json | 131 + .../src/v1beta1/pipeline_service_client.ts | 64 + .../v1beta1/pipeline_service_proto_list.json | 2 + .../src/v1beta1/prediction_service_client.ts | 64 + .../prediction_service_proto_list.json | 2 + .../src/v1beta1/schedule_service_client.ts | 64 + .../v1beta1/schedule_service_proto_list.json | 2 + .../v1beta1/specialist_pool_service_client.ts | 64 + .../specialist_pool_service_proto_list.json | 2 + .../src/v1beta1/tensorboard_service_client.ts | 166 +- .../tensorboard_service_client_config.json | 12 +- .../tensorboard_service_proto_list.json | 2 + .../src/v1beta1/vizier_service_client.ts | 64 + .../v1beta1/vizier_service_proto_list.json | 2 + .../test/gapic_dataset_service_v1.ts | 194 + .../test/gapic_dataset_service_v1beta1.ts | 271 + ...eployment_resource_pool_service_v1beta1.ts | 80 + .../test/gapic_endpoint_service_v1beta1.ts | 77 + ...urestore_online_serving_service_v1beta1.ts | 80 + .../gapic_featurestore_service_v1beta1.ts | 78 + .../gapic_index_endpoint_service_v1beta1.ts | 78 + .../test/gapic_index_service_v1beta1.ts | 77 + .../test/gapic_job_service_v1beta1.ts | 77 + .../test/gapic_match_service_v1beta1.ts | 77 + .../test/gapic_metadata_service_v1beta1.ts | 77 + .../test/gapic_migration_service_v1beta1.ts | 77 + .../gapic_model_garden_service_v1beta1.ts | 78 + .../test/gapic_model_service_v1beta1.ts | 77 + ...pic_persistent_resource_service_v1beta1.ts | 5346 ++++++++++ .../test/gapic_pipeline_service_v1beta1.ts | 77 + .../test/gapic_prediction_service_v1beta1.ts | 78 + .../test/gapic_schedule_service_v1beta1.ts | 77 + .../gapic_specialist_pool_service_v1beta1.ts | 78 + .../test/gapic_tensorboard_service_v1beta1.ts | 213 + .../test/gapic_vizier_service_v1beta1.ts | 77 + 120 files changed, 26748 insertions(+), 3607 deletions(-) create mode 100644 packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto create mode 100644 packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_saved_query.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_saved_query.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.get_persistent_resource.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.list_persistent_resources.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_size.js create mode 100644 packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts create mode 100644 packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client_config.json create mode 100644 packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json create mode 100644 packages/google-cloud-aiplatform/test/gapic_persistent_resource_service_v1beta1.ts diff --git a/packages/google-cloud-aiplatform/README.md b/packages/google-cloud-aiplatform/README.md index ead9658d603a..fff3efc7bce9 100644 --- a/packages/google-cloud-aiplatform/README.md +++ b/packages/google-cloud-aiplatform/README.md @@ -104,6 +104,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | --------------------------- | --------------------------------- | ------ | | Dataset_service.create_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.create_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | | Dataset_service.delete_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.delete_saved_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_saved_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_saved_query.js,packages/google-cloud-aiplatform/samples/README.md) | | Dataset_service.export_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.export_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.export_data.js,packages/google-cloud-aiplatform/samples/README.md) | | Dataset_service.get_annotation_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_annotation_spec.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_annotation_spec.js,packages/google-cloud-aiplatform/samples/README.md) | | Dataset_service.get_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | @@ -315,6 +316,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Vizier_service.suggest_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.suggest_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.suggest_trials.js,packages/google-cloud-aiplatform/samples/README.md) | | Dataset_service.create_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.create_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | | Dataset_service.delete_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.delete_saved_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_saved_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_saved_query.js,packages/google-cloud-aiplatform/samples/README.md) | | Dataset_service.export_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.export_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.export_data.js,packages/google-cloud-aiplatform/samples/README.md) | | Dataset_service.get_annotation_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_annotation_spec.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_annotation_spec.js,packages/google-cloud-aiplatform/samples/README.md) | | Dataset_service.get_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | @@ -467,6 +469,10 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Model_service.update_explanation_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_explanation_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_explanation_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | | Model_service.update_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_model.js,packages/google-cloud-aiplatform/samples/README.md) | | Model_service.upload_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.upload_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.upload_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Persistent_resource_service.create_persistent_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js,packages/google-cloud-aiplatform/samples/README.md) | +| Persistent_resource_service.delete_persistent_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js,packages/google-cloud-aiplatform/samples/README.md) | +| Persistent_resource_service.get_persistent_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.get_persistent_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.get_persistent_resource.js,packages/google-cloud-aiplatform/samples/README.md) | +| Persistent_resource_service.list_persistent_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.list_persistent_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.list_persistent_resources.js,packages/google-cloud-aiplatform/samples/README.md) | | Pipeline_service.cancel_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_pipeline_job.js,packages/google-cloud-aiplatform/samples/README.md) | | Pipeline_service.cancel_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_training_pipeline.js,packages/google-cloud-aiplatform/samples/README.md) | | Pipeline_service.create_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.create_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.create_pipeline_job.js,packages/google-cloud-aiplatform/samples/README.md) | @@ -513,6 +519,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Tensorboard_service.list_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | | Tensorboard_service.list_tensorboards | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboards.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboards.js,packages/google-cloud-aiplatform/samples/README.md) | | Tensorboard_service.read_tensorboard_blob_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_blob_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_blob_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.read_tensorboard_size | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_size.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_size.js,packages/google-cloud-aiplatform/samples/README.md) | | Tensorboard_service.read_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_time_series_data.js,packages/google-cloud-aiplatform/samples/README.md) | | Tensorboard_service.read_tensorboard_usage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_usage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_usage.js,packages/google-cloud-aiplatform/samples/README.md) | | Tensorboard_service.update_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard.js,packages/google-cloud-aiplatform/samples/README.md) | diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto index 5388cd028862..d21536e17686 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto @@ -278,6 +278,11 @@ message BatchPredictionJob { // or // `projects/{project}/locations/{location}/models/{model}@golden` // if no version is specified, the default version will be deployed. + // + // The model resource could also be a publisher model. + // Example: `publishers/{publisher}/models/{model}` + // or + // `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}` string model = 3 [(google.api.resource_reference) = { type: "aiplatform.googleapis.com/Model" }]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto index bca97b5b9d04..ce1ad0c60437 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto @@ -59,6 +59,10 @@ message Dataset { // Required. Additional information about the Dataset. google.protobuf.Value metadata = 8 [(google.api.field_behavior) = REQUIRED]; + // Output only. The number of DataItems in this Dataset. Only apply for + // non-structured Dataset. + int64 data_item_count = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Timestamp when this Dataset was created. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset_service.proto index 51f8e4104042..d4a0f3e3ba0f 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset_service.proto @@ -38,8 +38,7 @@ option java_package = "com.google.cloud.aiplatform.v1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; option ruby_package = "Google::Cloud::AIPlatform::V1"; -// The service that handles the CRUD of Vertex AI Dataset and its child -// resources. +// The service that manages Vertex AI Dataset and its child resources. service DatasetService { option (google.api.default_host) = "aiplatform.googleapis.com"; option (google.api.oauth_scopes) = @@ -148,6 +147,19 @@ service DatasetService { option (google.api.method_signature) = "parent"; } + // Deletes a SavedQuery. + rpc DeleteSavedQuery(DeleteSavedQueryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + // Gets an AnnotationSpec. rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) { option (google.api.http) = { @@ -573,6 +585,20 @@ message ListSavedQueriesResponse { string next_page_token = 2; } +// Request message for +// [DatasetService.DeleteSavedQuery][google.cloud.aiplatform.v1.DatasetService.DeleteSavedQuery]. +message DeleteSavedQueryRequest { + // Required. The resource name of the SavedQuery to delete. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/SavedQuery" + } + ]; +} + // Request message for // [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec]. message GetAnnotationSpecRequest { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto index 6c413631e432..424be12a6fc0 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto @@ -335,7 +335,7 @@ service FeaturestoreService { message CreateFeaturestoreRequest { // Required. The resource name of the Location to create Featurestores. // Format: - // `projects/{project}/locations/{location}'` + // `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -957,7 +957,7 @@ message CreateFeatureRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/EntityType" + child_type: "aiplatform.googleapis.com/Feature" } ]; @@ -1167,6 +1167,7 @@ message SearchFeaturesRequest { // * `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. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/job_state.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/job_state.proto index e152ca743460..2f75694ddccb 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/job_state.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/job_state.proto @@ -60,4 +60,7 @@ enum JobState { // The job is being updated. Only jobs in the `RUNNING` state can be updated. // After updating, the job goes back to the `RUNNING` state. JOB_STATE_UPDATING = 10; + + // The job is partially succeeded, some results may be missing due to errors. + JOB_STATE_PARTIALLY_SUCCEEDED = 11; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto index 3a6d6fb1c9aa..47db405be7f7 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto @@ -204,10 +204,14 @@ message Model { } ]; - // This field is populated if the model is produced by a pipeline job. - string pipeline_job = 47 [(google.api.resource_reference) = { - type: "aiplatform.googleapis.com/PipelineJob" - }]; + // Optional. This field is populated if the model is produced by a pipeline + // job. + string pipeline_job = 47 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PipelineJob" + } + ]; // Input only. The specification of the container that is to be used when // deploying this Model. The specification is ingested upon diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto index b3b3dd7c9abd..f0fe841ba601 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto @@ -622,11 +622,6 @@ message ExportModelRequest { OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; } -// Response message of -// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset] -// operation. -message UpdateExplanationDatasetResponse {} - // Details of // [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] // operation. @@ -652,6 +647,11 @@ message ExportModelOperationMetadata { OutputInfo output_info = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Response message of +// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset] +// operation. +message UpdateExplanationDatasetResponse {} + // Response message of // [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] // operation. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/nas_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/nas_job.proto index ebffa6a70bff..a5baba8f769b 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/nas_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/nas_job.proto @@ -99,7 +99,7 @@ message NasJob { [deprecated = true, (google.api.field_behavior) = OPTIONAL]; } -// Represents a NasTrial details along with it's parameters. If there is a +// Represents a NasTrial details along with its parameters. If there is a // corresponding train NasTrial, the train NasTrial is also returned. message NasTrialDetail { option (google.api.resource) = { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto index fbad9ec38c5a..5239f6740ecd 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto @@ -147,6 +147,9 @@ message PipelineJob { // characters, underscores and dashes. International characters are allowed. // // See https://goo.gl/xmQnxf for more information and examples of labels. + // + // Note there is some reserved label key for Vertex AI Pipelines. + // - `vertex-ai-pipelines-run-billing-id`, user set value will get overrided. map labels = 11; // Runtime config of the pipeline. @@ -184,6 +187,16 @@ message PipelineJob { (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } ]; + // A list of names for the reserved ip ranges under the VPC network + // that can be used for this Pipeline Job's workload. + // + // If set, we will deploy the Pipeline Job's workload within the provided ip + // ranges. Otherwise, the job will be deployed to any ip ranges under the + // provided VPC network. + // + // Example: ['vertex-ai-ip-range']. + repeated string reserved_ip_ranges = 25; + // A template uri from where the // [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec], // if empty, will be downloaded. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto index 979f5aae94f3..631705ade80f 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto @@ -67,15 +67,6 @@ service TensorboardService { option (google.api.method_signature) = "name"; } - // Returns a list of monthly active users for a given TensorBoard instance. - rpc ReadTensorboardUsage(ReadTensorboardUsageRequest) - returns (ReadTensorboardUsageResponse) { - option (google.api.http) = { - get: "/v1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage" - }; - option (google.api.method_signature) = "tensorboard"; - } - // Updates a Tensorboard. rpc UpdateTensorboard(UpdateTensorboardRequest) returns (google.longrunning.Operation) { @@ -112,6 +103,15 @@ service TensorboardService { }; } + // Returns a list of monthly active users for a given TensorBoard instance. + rpc ReadTensorboardUsage(ReadTensorboardUsageRequest) + returns (ReadTensorboardUsageResponse) { + option (google.api.http) = { + get: "/v1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage" + }; + option (google.api.method_signature) = "tensorboard"; + } + // Creates a TensorboardExperiment. rpc CreateTensorboardExperiment(CreateTensorboardExperimentRequest) returns (TensorboardExperiment) { @@ -391,41 +391,6 @@ message GetTensorboardRequest { ]; } -// Request message for [TensorboardService.GetTensorboardUsage][]. -message ReadTensorboardUsageRequest { - // Required. The name of the Tensorboard resource. - // Format: - // `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - string tensorboard = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Tensorboard" - } - ]; -} - -// Response message for -// [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage]. -message ReadTensorboardUsageResponse { - // Per user usage data. - message PerUserUsageData { - // User's username - string username = 1; - - // Number of times the user has read data within the Tensorboard. - int64 view_count = 2; - } - - // Per month usage data - message PerMonthUsageData { - // Usage data for each user in the given month. - repeated PerUserUsageData user_usage_data = 1; - } - - // Maps year-month (YYYYMM) string to per month usage data. - map monthly_usage_data = 1; -} - // Request message for // [TensorboardService.ListTensorboards][google.cloud.aiplatform.v1.TensorboardService.ListTensorboards]. message ListTensorboardsRequest { @@ -509,6 +474,42 @@ message DeleteTensorboardRequest { ]; } +// Request message for +// [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage]. +message ReadTensorboardUsageRequest { + // Required. The name of the Tensorboard resource. + // Format: + // `projects/{project}/locations/{location}/tensorboards/{tensorboard}` + string tensorboard = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Tensorboard" + } + ]; +} + +// Response message for +// [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage]. +message ReadTensorboardUsageResponse { + // Per user usage data. + message PerUserUsageData { + // User's username + string username = 1; + + // Number of times the user has read data within the Tensorboard. + int64 view_count = 2; + } + + // Per month usage data + message PerMonthUsageData { + // Usage data for each user in the given month. + repeated PerUserUsageData user_usage_data = 1; + } + + // Maps year-month (YYYYMM) string to per month usage data. + map monthly_usage_data = 1; +} + // Request message for // [TensorboardService.CreateTensorboardExperiment][google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardExperiment]. message CreateTensorboardExperimentRequest { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto index 30e149e6a239..d33727cd2fd9 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto @@ -283,6 +283,11 @@ message BatchPredictionJob { // or // `projects/{project}/locations/{location}/models/{model}@golden` // if no version is specified, the default version will be deployed. + // + // The model resource could also be a publisher model. + // Example: `publishers/{publisher}/models/{model}` + // or + // `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}` string model = 3 [(google.api.resource_reference) = { type: "aiplatform.googleapis.com/Model" }]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto index ea44a6b0c5b7..892dd2fa3c49 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto @@ -113,6 +113,20 @@ message CustomJob { // Represents the spec of a CustomJob. message CustomJobSpec { + // Optional. The ID of the PersistentResource in the same Project and Location + // which to run + // + // If this is specified, the job will be run on existing machines held by the + // PersistentResource instead of on-demand short-live machines. + // The network and CMEK configs on the job should be consistent with those on + // the PersistentResource, otherwise, the job will be rejected. + string persistent_resource_id = 14 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PersistentResource" + } + ]; + // Required. The spec of the worker pools including machine type and Docker // image. All worker pools except the first one are optional and can be // skipped by providing an empty value. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto index 3e293382e06c..d60329b03cdd 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto @@ -59,6 +59,10 @@ message Dataset { // Required. Additional information about the Dataset. google.protobuf.Value metadata = 8 [(google.api.field_behavior) = REQUIRED]; + // Output only. The number of DataItems in this Dataset. Only apply for + // non-structured Dataset. + int64 data_item_count = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Timestamp when this Dataset was created. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset_service.proto index b1377b27593a..08204a0c8e4f 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset_service.proto @@ -38,8 +38,7 @@ option java_package = "com.google.cloud.aiplatform.v1beta1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; -// The service that handles the CRUD of Vertex AI Dataset and its child -// resources. +// The service that manages Vertex AI Dataset and its child resources. service DatasetService { option (google.api.default_host) = "aiplatform.googleapis.com"; option (google.api.oauth_scopes) = @@ -148,6 +147,19 @@ service DatasetService { option (google.api.method_signature) = "parent"; } + // Deletes a SavedQuery. + rpc DeleteSavedQuery(DeleteSavedQueryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + // Gets an AnnotationSpec. rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) { option (google.api.http) = { @@ -573,6 +585,20 @@ message ListSavedQueriesResponse { string next_page_token = 2; } +// Request message for +// [DatasetService.DeleteSavedQuery][google.cloud.aiplatform.v1beta1.DatasetService.DeleteSavedQuery]. +message DeleteSavedQueryRequest { + // Required. The resource name of the SavedQuery to delete. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/SavedQuery" + } + ]; +} + // Request message for // [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1beta1.DatasetService.GetAnnotationSpec]. message GetAnnotationSpecRequest { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto index 50fa54e16bf3..986114691b04 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto @@ -335,7 +335,7 @@ service FeaturestoreService { message CreateFeaturestoreRequest { // Required. The resource name of the Location to create Featurestores. // Format: - // `projects/{project}/locations/{location}'` + // `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -957,7 +957,7 @@ message CreateFeatureRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/EntityType" + child_type: "aiplatform.googleapis.com/Feature" } ]; @@ -1167,6 +1167,7 @@ message SearchFeaturesRequest { // * `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. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/job_state.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/job_state.proto index d06cc9c17739..dd8f7332a07c 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/job_state.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/job_state.proto @@ -60,4 +60,7 @@ enum JobState { // The job is being updated. Only jobs in the `RUNNING` state can be updated. // After updating, the job goes back to the `RUNNING` state. JOB_STATE_UPDATING = 10; + + // The job is partially succeeded, some results may be missing due to errors. + JOB_STATE_PARTIALLY_SUCCEEDED = 11; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto index 92ce28d468db..ff84a437e343 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto @@ -58,7 +58,7 @@ message ModelEvaluation { // list of slices, with limitation of two slices. The first slice of data // will be the slice_a. The second slice in the list (slice_b) will be // compared against the first slice. If only a single slice is provided, - // then slice_a will be compared against “not slice_a”. + // then slice_a will be compared against "not slice_a". // Below are examples with feature "education" with value "low", "medium", // "high" in the dataset: // diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/nas_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/nas_job.proto index 01c070317968..d58dae4b3ea8 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/nas_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/nas_job.proto @@ -99,7 +99,7 @@ message NasJob { [deprecated = true, (google.api.field_behavior) = OPTIONAL]; } -// Represents a NasTrial details along with it's parameters. If there is a +// Represents a NasTrial details along with its parameters. If there is a // corresponding train NasTrial, the train NasTrial is also returned. message NasTrialDetail { option (google.api.resource) = { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto new file mode 100644 index 000000000000..9982102cfb4b --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto @@ -0,0 +1,227 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1beta1/machine_resources.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "PersistentResourceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// Represents long-lasting resources that are dedicated to users to runs custom +// workloads. +// A PersistentResource can have multiple node pools and each node +// pool can have its own machine spec. +message PersistentResource { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/PersistentResource" + pattern: "projects/{project}/locations/{location}/persistentResources/{persistent_resource}" + }; + + // Describes the PersistentResource state. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the persistent resources is being + // created. + PROVISIONING = 1; + + // The RUNNING state indicates the persistent resources is healthy and fully + // usable. + RUNNING = 3; + + // The STOPPING state indicates the persistent resources is being deleted. + STOPPING = 4; + + // The ERROR state indicates the persistent resources may be unusable. + // Details can be found in the `error` field. + ERROR = 5; + } + + // Output only. Resource name of a PersistentResource. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The display name of the PersistentResource. + // The name can be up to 128 characters long and can consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The spec of the pools of different resources. + repeated ResourcePool resource_pools = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The detailed state of a Study. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Only populated when persistent resource's state is `STOPPING` + // or `ERROR`. + google.rpc.Status error = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the PersistentResource was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the PersistentResource for the first time entered + // the `RUNNING` state. + google.protobuf.Timestamp start_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the PersistentResource was most recently updated. + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The labels with user-defined metadata to organize + // PersistentResource. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The full name of the Compute Engine + // [network](/compute/docs/networks-and-firewalls#networks) to peered with + // Vertex AI to host the persistent resources. + // For example, `projects/12345/global/networks/myVPC`. + // [Format](/compute/docs/reference/rest/v1/networks/insert) + // is of the form `projects/{project}/global/networks/{network}`. + // Where {project} is a project number, as in `12345`, and {network} is a + // network name. + // + // To specify this field, you must have already [configured VPC Network + // Peering for Vertex + // AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). + // + // If this field is left unspecified, the resources is not peered with any + // network. + string network = 11 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Optional. Customer-managed encryption key spec for a PersistentResource. + // If set, this PersistentResource and all sub-resources of this + // PersistentResource will be secured by this key. + EncryptionSpec encryption_spec = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Persistent Resource runtime spec. + // Used for e.g. Ray cluster configuration. + ResourceRuntimeSpec resource_runtime_spec = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of names for the reserved ip ranges under the VPC network + // that can be used for this persistent resource. + // + // If set, we will deploy the persistent resource within the provided ip + // ranges. Otherwise, the persistent resource will be deployed to any ip + // ranges under the provided VPC network. + // + // Example: ['vertex-ai-ip-range']. + repeated string reserved_ip_ranges = 15 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the spec a group of resources of same type, e.g. machine, disk +// and accelerators, in a PersistentResource. +message ResourcePool { + // The min/max number of replicas allowed if enabling autoscaling + message AutoscalingSpec { + // Optional. min replicas in the node pool, + // must be ≤ replica_count and < max_replica_count or will throw error + optional int64 min_replica_count = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. max replicas in the node pool, + // must be ≥ replica_count and > min_replica_count or will throw error + optional int64 max_replica_count = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The unique ID in a PersistentResource to refer the this resource + // pool. User can specify it if need to use it, otherwise we will generate it + // automatically. + string id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. The specification of a single machine. + MachineSpec machine_spec = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The total number of machines to use for this resource pool. + optional int64 replica_count = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Disk spec for the machine in this node pool. + DiskSpec disk_spec = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The number of machines currently not in use by training jobs + // for this resource pool. Deprecated. Use `used_replica_count` instead. + int64 idle_replica_count = 5 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of machines currently in use by training jobs for + // this resource pool. Will replace idle_replica_count. + int64 used_replica_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Optional spec to configure GKE autoscaling + AutoscalingSpec autoscaling_spec = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configure runtime on a PersistentResource instance, including but may not +// limited to: +// * Service accounts used to run the workloads; +// * Whether make it a dedicated Ray Cluster; +message ResourceRuntimeSpec { + // Optional. Configure the use of workload identity on the PersistentResource + ServiceAccountSpec service_account_spec = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for the use of custom service account to run the workloads. +message ServiceAccountSpec { + // Required. If true, custom user-managed service account is enforced to run + // any workloads (e.g. Vertex Jobs) on the resource; Otherwise, will always + // use [Vertex AI Custom Code Service + // Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + bool enable_custom_service_account = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Default service account that this PersistentResource's workloads + // run as. The workloads include: + // * Any runtime specified via `ResourceRuntimeSpec` on creation time, + // e.g. Ray; + // * Jobs submitted to PersistentResource, if no other service account + // specified in the job specs. + // + // + // Only works when custom service account is enabled and users have the + // `iam.serviceAccounts.actAs` permission on this service account. + // + // Required if any containers specified in `ResourceRuntimeSpec`. + string service_account = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto new file mode 100644 index 000000000000..360caa533587 --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto @@ -0,0 +1,178 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/operation.proto"; +import "google/cloud/aiplatform/v1beta1/persistent_resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "PersistentResourceServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A service for managing Vertex AI's machine learning PersistentResource. +service PersistentResourceService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Uploads a Model artifact into Vertex AI. + rpc CreatePersistentResource(CreatePersistentResourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/persistentResources" + body: "persistent_resource" + }; + option (google.api.method_signature) = + "parent,persistent_resource,persistent_resource_id"; + option (google.longrunning.operation_info) = { + response_type: "PersistentResource" + metadata_type: "CreatePersistentResourceOperationMetadata" + }; + } + + // Gets a PersistentResource. + rpc GetPersistentResource(GetPersistentResourceRequest) + returns (PersistentResource) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/persistentResources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists PersistentResources in a Location. + rpc ListPersistentResources(ListPersistentResourcesRequest) + returns (ListPersistentResourcesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/persistentResources" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a PersistentResource. + rpc DeletePersistentResource(DeletePersistentResourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/persistentResources/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } +} + +// Request message for +// [PersistentResourceService.CreatePersistentResource][google.cloud.aiplatform.v1beta1.PersistentResourceService.CreatePersistentResource]. +message CreatePersistentResourceRequest { + // Required. The resource name of the Location to create the + // PersistentResource in. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The PersistentResource to create. + PersistentResource persistent_resource = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the PersistentResource, which become the final + // component of the PersistentResource's resource name. + // + // The maximum length is 63 characters, and valid characters + // are /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/. + string persistent_resource_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of operations that perform create PersistentResource. +message CreatePersistentResourceOperationMetadata { + // Operation metadata for PersistentResource. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for +// [PersistentResourceService.GetPersistentResource][google.cloud.aiplatform.v1beta1.PersistentResourceService.GetPersistentResource]. +message GetPersistentResourceRequest { + // Required. The name of the PersistentResource resource. + // Format: + // `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PersistentResource" + } + ]; +} + +// Request message for [PersistentResourceService.ListPersistentResource][]. +message ListPersistentResourcesRequest { + // Required. The resource name of the Location to list the PersistentResources + // from. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via + // [ListPersistentResourceResponse.next_page_token][] of the previous + // [PersistentResourceService.ListPersistentResource][] call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [PersistentResourceService.ListPersistentResources][google.cloud.aiplatform.v1beta1.PersistentResourceService.ListPersistentResources] +message ListPersistentResourcesResponse { + repeated PersistentResource persistent_resources = 1; + + // A token to retrieve next page of results. + // Pass to + // [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [PersistentResourceService.DeletePersistentResource][google.cloud.aiplatform.v1beta1.PersistentResourceService.DeletePersistentResource]. +message DeletePersistentResourceRequest { + // Required. The name of the PersistentResource to be deleted. + // Format: + // `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PersistentResource" + } + ]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto index 75171c649f29..6228dc58f7fb 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto @@ -147,6 +147,9 @@ message PipelineJob { // characters, underscores and dashes. International characters are allowed. // // See https://goo.gl/xmQnxf for more information and examples of labels. + // + // Note there is some reserved label key for Vertex AI Pipelines. + // - `vertex-ai-pipelines-run-billing-id`, user set value will get overrided. map labels = 11; // Runtime config of the pipeline. @@ -184,6 +187,16 @@ message PipelineJob { (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } ]; + // A list of names for the reserved ip ranges under the VPC network + // that can be used for this Pipeline Job's workload. + // + // If set, we will deploy the Pipeline Job's workload within the provided ip + // ranges. Otherwise, the job will be deployed to any ip ranges under the + // provided VPC network. + // + // Example: ['vertex-ai-ip-range']. + repeated string reserved_ip_ranges = 25; + // A template uri from where the // [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec], // if empty, will be downloaded. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto index df9799cc9c5c..92dd2d1331f3 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto @@ -66,15 +66,6 @@ service TensorboardService { option (google.api.method_signature) = "name"; } - // Returns a list of monthly active users for a given TensorBoard instance. - rpc ReadTensorboardUsage(ReadTensorboardUsageRequest) - returns (ReadTensorboardUsageResponse) { - option (google.api.http) = { - get: "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage" - }; - option (google.api.method_signature) = "tensorboard"; - } - // Updates a Tensorboard. rpc UpdateTensorboard(UpdateTensorboardRequest) returns (google.longrunning.Operation) { @@ -111,6 +102,24 @@ service TensorboardService { }; } + // Returns a list of monthly active users for a given TensorBoard instance. + rpc ReadTensorboardUsage(ReadTensorboardUsageRequest) + returns (ReadTensorboardUsageResponse) { + option (google.api.http) = { + get: "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage" + }; + option (google.api.method_signature) = "tensorboard"; + } + + // Returns the storage size for a given TensorBoard instance. + rpc ReadTensorboardSize(ReadTensorboardSizeRequest) + returns (ReadTensorboardSizeResponse) { + option (google.api.http) = { + get: "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}:readSize" + }; + option (google.api.method_signature) = "tensorboard"; + } + // Creates a TensorboardExperiment. rpc CreateTensorboardExperiment(CreateTensorboardExperimentRequest) returns (TensorboardExperiment) { @@ -390,41 +399,6 @@ message GetTensorboardRequest { ]; } -// Request message for [TensorboardService.GetTensorboardUsage][]. -message ReadTensorboardUsageRequest { - // Required. The name of the Tensorboard resource. - // Format: - // `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - string tensorboard = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Tensorboard" - } - ]; -} - -// Response message for -// [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsage]. -message ReadTensorboardUsageResponse { - // Per user usage data. - message PerUserUsageData { - // User's username - string username = 1; - - // Number of times the user has read data within the Tensorboard. - int64 view_count = 2; - } - - // Per month usage data - message PerMonthUsageData { - // Usage data for each user in the given month. - repeated PerUserUsageData user_usage_data = 1; - } - - // Maps year-month (YYYYMM) string to per month usage data. - map monthly_usage_data = 1; -} - // Request message for // [TensorboardService.ListTensorboards][google.cloud.aiplatform.v1beta1.TensorboardService.ListTensorboards]. message ListTensorboardsRequest { @@ -508,6 +482,63 @@ message DeleteTensorboardRequest { ]; } +// Request message for +// [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsage]. +message ReadTensorboardUsageRequest { + // Required. The name of the Tensorboard resource. + // Format: + // `projects/{project}/locations/{location}/tensorboards/{tensorboard}` + string tensorboard = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Tensorboard" + } + ]; +} + +// Response message for +// [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsage]. +message ReadTensorboardUsageResponse { + // Per user usage data. + message PerUserUsageData { + // User's username + string username = 1; + + // Number of times the user has read data within the Tensorboard. + int64 view_count = 2; + } + + // Per month usage data + message PerMonthUsageData { + // Usage data for each user in the given month. + repeated PerUserUsageData user_usage_data = 1; + } + + // Maps year-month (YYYYMM) string to per month usage data. + map monthly_usage_data = 1; +} + +// Request message for +// [TensorboardService.ReadTensorboardSize][google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardSize]. +message ReadTensorboardSizeRequest { + // Required. The name of the Tensorboard resource. + // Format: + // `projects/{project}/locations/{location}/tensorboards/{tensorboard}` + string tensorboard = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Tensorboard" + } + ]; +} + +// Response message for +// [TensorboardService.ReadTensorboardSize][google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardSize]. +message ReadTensorboardSizeResponse { + // Payload storage size for the TensorBoard + int64 storage_size_byte = 1; +} + // Request message for // [TensorboardService.CreateTensorboardExperiment][google.cloud.aiplatform.v1beta1.TensorboardService.CreateTensorboardExperiment]. message CreateTensorboardExperimentRequest { diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index ec2c50934187..3385bfc683c7 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -5379,7 +5379,8 @@ export namespace google { JOB_STATE_CANCELLED = 7, JOB_STATE_PAUSED = 8, JOB_STATE_EXPIRED = 9, - JOB_STATE_UPDATING = 10 + JOB_STATE_UPDATING = 10, + JOB_STATE_PARTIALLY_SUCCEEDED = 11 } /** Properties of a MachineSpec. */ @@ -9309,6 +9310,9 @@ export namespace google { /** Dataset metadata */ metadata?: (google.protobuf.IValue|null); + /** Dataset dataItemCount */ + dataItemCount?: (number|Long|string|null); + /** Dataset createTime */ createTime?: (google.protobuf.ITimestamp|null); @@ -9355,6 +9359,9 @@ export namespace google { /** Dataset metadata. */ public metadata?: (google.protobuf.IValue|null); + /** Dataset dataItemCount. */ + public dataItemCount: (number|Long|string); + /** Dataset createTime. */ public createTime?: (google.protobuf.ITimestamp|null); @@ -10107,6 +10114,20 @@ export namespace google { */ public listSavedQueries(request: google.cloud.aiplatform.v1.IListSavedQueriesRequest): Promise; + /** + * Calls DeleteSavedQuery. + * @param request DeleteSavedQueryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteSavedQuery(request: google.cloud.aiplatform.v1.IDeleteSavedQueryRequest, callback: google.cloud.aiplatform.v1.DatasetService.DeleteSavedQueryCallback): void; + + /** + * Calls DeleteSavedQuery. + * @param request DeleteSavedQueryRequest message or plain object + * @returns Promise + */ + public deleteSavedQuery(request: google.cloud.aiplatform.v1.IDeleteSavedQueryRequest): Promise; + /** * Calls GetAnnotationSpec. * @param request GetAnnotationSpecRequest message or plain object @@ -10208,6 +10229,13 @@ export namespace google { */ type ListSavedQueriesCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.ListSavedQueriesResponse) => void; + /** + * Callback as used by {@link google.cloud.aiplatform.v1.DatasetService|deleteSavedQuery}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteSavedQueryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.aiplatform.v1.DatasetService|getAnnotationSpec}. * @param error Error, if any @@ -12500,6 +12528,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DeleteSavedQueryRequest. */ + interface IDeleteSavedQueryRequest { + + /** DeleteSavedQueryRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSavedQueryRequest. */ + class DeleteSavedQueryRequest implements IDeleteSavedQueryRequest { + + /** + * Constructs a new DeleteSavedQueryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IDeleteSavedQueryRequest); + + /** DeleteSavedQueryRequest name. */ + public name: string; + + /** + * Creates a new DeleteSavedQueryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSavedQueryRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IDeleteSavedQueryRequest): google.cloud.aiplatform.v1.DeleteSavedQueryRequest; + + /** + * Encodes the specified DeleteSavedQueryRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteSavedQueryRequest.verify|verify} messages. + * @param message DeleteSavedQueryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IDeleteSavedQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSavedQueryRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteSavedQueryRequest.verify|verify} messages. + * @param message DeleteSavedQueryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IDeleteSavedQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSavedQueryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSavedQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.DeleteSavedQueryRequest; + + /** + * Decodes a DeleteSavedQueryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSavedQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.DeleteSavedQueryRequest; + + /** + * Verifies a DeleteSavedQueryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSavedQueryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSavedQueryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.DeleteSavedQueryRequest; + + /** + * Creates a plain object from a DeleteSavedQueryRequest message. Also converts values to other types if specified. + * @param message DeleteSavedQueryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.DeleteSavedQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSavedQueryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSavedQueryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GetAnnotationSpecRequest. */ interface IGetAnnotationSpecRequest { @@ -55075,97 +55200,6 @@ export namespace google { } } - /** Properties of an UpdateExplanationDatasetResponse. */ - interface IUpdateExplanationDatasetResponse { - } - - /** Represents an UpdateExplanationDatasetResponse. */ - class UpdateExplanationDatasetResponse implements IUpdateExplanationDatasetResponse { - - /** - * Constructs a new UpdateExplanationDatasetResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse); - - /** - * Creates a new UpdateExplanationDatasetResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateExplanationDatasetResponse instance - */ - public static create(properties?: google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse): google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse; - - /** - * Encodes the specified UpdateExplanationDatasetResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse.verify|verify} messages. - * @param message UpdateExplanationDatasetResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateExplanationDatasetResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse.verify|verify} messages. - * @param message UpdateExplanationDatasetResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateExplanationDatasetResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateExplanationDatasetResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse; - - /** - * Decodes an UpdateExplanationDatasetResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateExplanationDatasetResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse; - - /** - * Verifies an UpdateExplanationDatasetResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateExplanationDatasetResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateExplanationDatasetResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse; - - /** - * Creates a plain object from an UpdateExplanationDatasetResponse message. Also converts values to other types if specified. - * @param message UpdateExplanationDatasetResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateExplanationDatasetResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateExplanationDatasetResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - /** Properties of an ExportModelOperationMetadata. */ interface IExportModelOperationMetadata { @@ -55375,6 +55409,97 @@ export namespace google { } } + /** Properties of an UpdateExplanationDatasetResponse. */ + interface IUpdateExplanationDatasetResponse { + } + + /** Represents an UpdateExplanationDatasetResponse. */ + class UpdateExplanationDatasetResponse implements IUpdateExplanationDatasetResponse { + + /** + * Constructs a new UpdateExplanationDatasetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse); + + /** + * Creates a new UpdateExplanationDatasetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateExplanationDatasetResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse): google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse; + + /** + * Encodes the specified UpdateExplanationDatasetResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse.verify|verify} messages. + * @param message UpdateExplanationDatasetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateExplanationDatasetResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse.verify|verify} messages. + * @param message UpdateExplanationDatasetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateExplanationDatasetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateExplanationDatasetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse; + + /** + * Decodes an UpdateExplanationDatasetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateExplanationDatasetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse; + + /** + * Verifies an UpdateExplanationDatasetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateExplanationDatasetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateExplanationDatasetResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse; + + /** + * Creates a plain object from an UpdateExplanationDatasetResponse message. Also converts values to other types if specified. + * @param message UpdateExplanationDatasetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateExplanationDatasetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateExplanationDatasetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an ExportModelResponse. */ interface IExportModelResponse { } @@ -56990,6 +57115,9 @@ export namespace google { /** PipelineJob network */ network?: (string|null); + /** PipelineJob reservedIpRanges */ + reservedIpRanges?: (string[]|null); + /** PipelineJob templateUri */ templateUri?: (string|null); @@ -57051,6 +57179,9 @@ export namespace google { /** PipelineJob network. */ public network: string; + /** PipelineJob reservedIpRanges. */ + public reservedIpRanges: string[]; + /** PipelineJob templateUri. */ public templateUri: string; @@ -70430,20 +70561,6 @@ export namespace google { */ public getTensorboard(request: google.cloud.aiplatform.v1.IGetTensorboardRequest): Promise; - /** - * Calls ReadTensorboardUsage. - * @param request ReadTensorboardUsageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ReadTensorboardUsageResponse - */ - public readTensorboardUsage(request: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest, callback: google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsageCallback): void; - - /** - * Calls ReadTensorboardUsage. - * @param request ReadTensorboardUsageRequest message or plain object - * @returns Promise - */ - public readTensorboardUsage(request: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest): Promise; - /** * Calls UpdateTensorboard. * @param request UpdateTensorboardRequest message or plain object @@ -70486,6 +70603,20 @@ export namespace google { */ public deleteTensorboard(request: google.cloud.aiplatform.v1.IDeleteTensorboardRequest): Promise; + /** + * Calls ReadTensorboardUsage. + * @param request ReadTensorboardUsageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadTensorboardUsageResponse + */ + public readTensorboardUsage(request: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest, callback: google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsageCallback): void; + + /** + * Calls ReadTensorboardUsage. + * @param request ReadTensorboardUsageRequest message or plain object + * @returns Promise + */ + public readTensorboardUsage(request: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest): Promise; + /** * Calls CreateTensorboardExperiment. * @param request CreateTensorboardExperimentRequest message or plain object @@ -70825,13 +70956,6 @@ export namespace google { */ type GetTensorboardCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.Tensorboard) => void; - /** - * Callback as used by {@link google.cloud.aiplatform.v1.TensorboardService|readTensorboardUsage}. - * @param error Error, if any - * @param [response] ReadTensorboardUsageResponse - */ - type ReadTensorboardUsageCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse) => void; - /** * Callback as used by {@link google.cloud.aiplatform.v1.TensorboardService|updateTensorboard}. * @param error Error, if any @@ -70853,6 +70977,13 @@ export namespace google { */ type DeleteTensorboardCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.cloud.aiplatform.v1.TensorboardService|readTensorboardUsage}. + * @param error Error, if any + * @param [response] ReadTensorboardUsageResponse + */ + type ReadTensorboardUsageCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse) => void; + /** * Callback as used by {@link google.cloud.aiplatform.v1.TensorboardService|createTensorboardExperiment}. * @param error Error, if any @@ -71215,403 +71346,6 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ReadTensorboardUsageRequest. */ - interface IReadTensorboardUsageRequest { - - /** ReadTensorboardUsageRequest tensorboard */ - tensorboard?: (string|null); - } - - /** Represents a ReadTensorboardUsageRequest. */ - class ReadTensorboardUsageRequest implements IReadTensorboardUsageRequest { - - /** - * Constructs a new ReadTensorboardUsageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest); - - /** ReadTensorboardUsageRequest tensorboard. */ - public tensorboard: string; - - /** - * Creates a new ReadTensorboardUsageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReadTensorboardUsageRequest instance - */ - public static create(properties?: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest): google.cloud.aiplatform.v1.ReadTensorboardUsageRequest; - - /** - * Encodes the specified ReadTensorboardUsageRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageRequest.verify|verify} messages. - * @param message ReadTensorboardUsageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReadTensorboardUsageRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageRequest.verify|verify} messages. - * @param message ReadTensorboardUsageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReadTensorboardUsageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReadTensorboardUsageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ReadTensorboardUsageRequest; - - /** - * Decodes a ReadTensorboardUsageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReadTensorboardUsageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ReadTensorboardUsageRequest; - - /** - * Verifies a ReadTensorboardUsageRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReadTensorboardUsageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReadTensorboardUsageRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReadTensorboardUsageRequest; - - /** - * Creates a plain object from a ReadTensorboardUsageRequest message. Also converts values to other types if specified. - * @param message ReadTensorboardUsageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.aiplatform.v1.ReadTensorboardUsageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReadTensorboardUsageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReadTensorboardUsageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReadTensorboardUsageResponse. */ - interface IReadTensorboardUsageResponse { - - /** ReadTensorboardUsageResponse monthlyUsageData */ - monthlyUsageData?: ({ [k: string]: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData }|null); - } - - /** Represents a ReadTensorboardUsageResponse. */ - class ReadTensorboardUsageResponse implements IReadTensorboardUsageResponse { - - /** - * Constructs a new ReadTensorboardUsageResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.aiplatform.v1.IReadTensorboardUsageResponse); - - /** ReadTensorboardUsageResponse monthlyUsageData. */ - public monthlyUsageData: { [k: string]: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData }; - - /** - * Creates a new ReadTensorboardUsageResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReadTensorboardUsageResponse instance - */ - public static create(properties?: google.cloud.aiplatform.v1.IReadTensorboardUsageResponse): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse; - - /** - * Encodes the specified ReadTensorboardUsageResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.verify|verify} messages. - * @param message ReadTensorboardUsageResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.aiplatform.v1.IReadTensorboardUsageResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReadTensorboardUsageResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.verify|verify} messages. - * @param message ReadTensorboardUsageResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.aiplatform.v1.IReadTensorboardUsageResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReadTensorboardUsageResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReadTensorboardUsageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse; - - /** - * Decodes a ReadTensorboardUsageResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReadTensorboardUsageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse; - - /** - * Verifies a ReadTensorboardUsageResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReadTensorboardUsageResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReadTensorboardUsageResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse; - - /** - * Creates a plain object from a ReadTensorboardUsageResponse message. Also converts values to other types if specified. - * @param message ReadTensorboardUsageResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReadTensorboardUsageResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReadTensorboardUsageResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReadTensorboardUsageResponse { - - /** Properties of a PerUserUsageData. */ - interface IPerUserUsageData { - - /** PerUserUsageData username */ - username?: (string|null); - - /** PerUserUsageData viewCount */ - viewCount?: (number|Long|string|null); - } - - /** Represents a PerUserUsageData. */ - class PerUserUsageData implements IPerUserUsageData { - - /** - * Constructs a new PerUserUsageData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData); - - /** PerUserUsageData username. */ - public username: string; - - /** PerUserUsageData viewCount. */ - public viewCount: (number|Long|string); - - /** - * Creates a new PerUserUsageData instance using the specified properties. - * @param [properties] Properties to set - * @returns PerUserUsageData instance - */ - public static create(properties?: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData; - - /** - * Encodes the specified PerUserUsageData message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.verify|verify} messages. - * @param message PerUserUsageData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PerUserUsageData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.verify|verify} messages. - * @param message PerUserUsageData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PerUserUsageData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PerUserUsageData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData; - - /** - * Decodes a PerUserUsageData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PerUserUsageData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData; - - /** - * Verifies a PerUserUsageData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PerUserUsageData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PerUserUsageData - */ - public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData; - - /** - * Creates a plain object from a PerUserUsageData message. Also converts values to other types if specified. - * @param message PerUserUsageData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PerUserUsageData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PerUserUsageData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PerMonthUsageData. */ - interface IPerMonthUsageData { - - /** PerMonthUsageData userUsageData */ - userUsageData?: (google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData[]|null); - } - - /** Represents a PerMonthUsageData. */ - class PerMonthUsageData implements IPerMonthUsageData { - - /** - * Constructs a new PerMonthUsageData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData); - - /** PerMonthUsageData userUsageData. */ - public userUsageData: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData[]; - - /** - * Creates a new PerMonthUsageData instance using the specified properties. - * @param [properties] Properties to set - * @returns PerMonthUsageData instance - */ - public static create(properties?: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData; - - /** - * Encodes the specified PerMonthUsageData message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.verify|verify} messages. - * @param message PerMonthUsageData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PerMonthUsageData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.verify|verify} messages. - * @param message PerMonthUsageData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PerMonthUsageData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PerMonthUsageData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData; - - /** - * Decodes a PerMonthUsageData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PerMonthUsageData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData; - - /** - * Verifies a PerMonthUsageData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PerMonthUsageData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PerMonthUsageData - */ - public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData; - - /** - * Creates a plain object from a PerMonthUsageData message. Also converts values to other types if specified. - * @param message PerMonthUsageData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PerMonthUsageData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PerMonthUsageData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - /** Properties of a ListTensorboardsRequest. */ interface IListTensorboardsRequest { @@ -72042,6 +71776,403 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ReadTensorboardUsageRequest. */ + interface IReadTensorboardUsageRequest { + + /** ReadTensorboardUsageRequest tensorboard */ + tensorboard?: (string|null); + } + + /** Represents a ReadTensorboardUsageRequest. */ + class ReadTensorboardUsageRequest implements IReadTensorboardUsageRequest { + + /** + * Constructs a new ReadTensorboardUsageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest); + + /** ReadTensorboardUsageRequest tensorboard. */ + public tensorboard: string; + + /** + * Creates a new ReadTensorboardUsageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadTensorboardUsageRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest): google.cloud.aiplatform.v1.ReadTensorboardUsageRequest; + + /** + * Encodes the specified ReadTensorboardUsageRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageRequest.verify|verify} messages. + * @param message ReadTensorboardUsageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadTensorboardUsageRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageRequest.verify|verify} messages. + * @param message ReadTensorboardUsageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IReadTensorboardUsageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadTensorboardUsageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadTensorboardUsageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ReadTensorboardUsageRequest; + + /** + * Decodes a ReadTensorboardUsageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadTensorboardUsageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ReadTensorboardUsageRequest; + + /** + * Verifies a ReadTensorboardUsageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadTensorboardUsageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadTensorboardUsageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReadTensorboardUsageRequest; + + /** + * Creates a plain object from a ReadTensorboardUsageRequest message. Also converts values to other types if specified. + * @param message ReadTensorboardUsageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReadTensorboardUsageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadTensorboardUsageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadTensorboardUsageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadTensorboardUsageResponse. */ + interface IReadTensorboardUsageResponse { + + /** ReadTensorboardUsageResponse monthlyUsageData */ + monthlyUsageData?: ({ [k: string]: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData }|null); + } + + /** Represents a ReadTensorboardUsageResponse. */ + class ReadTensorboardUsageResponse implements IReadTensorboardUsageResponse { + + /** + * Constructs a new ReadTensorboardUsageResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IReadTensorboardUsageResponse); + + /** ReadTensorboardUsageResponse monthlyUsageData. */ + public monthlyUsageData: { [k: string]: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData }; + + /** + * Creates a new ReadTensorboardUsageResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadTensorboardUsageResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IReadTensorboardUsageResponse): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse; + + /** + * Encodes the specified ReadTensorboardUsageResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.verify|verify} messages. + * @param message ReadTensorboardUsageResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IReadTensorboardUsageResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadTensorboardUsageResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.verify|verify} messages. + * @param message ReadTensorboardUsageResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IReadTensorboardUsageResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadTensorboardUsageResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadTensorboardUsageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse; + + /** + * Decodes a ReadTensorboardUsageResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadTensorboardUsageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse; + + /** + * Verifies a ReadTensorboardUsageResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadTensorboardUsageResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadTensorboardUsageResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse; + + /** + * Creates a plain object from a ReadTensorboardUsageResponse message. Also converts values to other types if specified. + * @param message ReadTensorboardUsageResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadTensorboardUsageResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadTensorboardUsageResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReadTensorboardUsageResponse { + + /** Properties of a PerUserUsageData. */ + interface IPerUserUsageData { + + /** PerUserUsageData username */ + username?: (string|null); + + /** PerUserUsageData viewCount */ + viewCount?: (number|Long|string|null); + } + + /** Represents a PerUserUsageData. */ + class PerUserUsageData implements IPerUserUsageData { + + /** + * Constructs a new PerUserUsageData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData); + + /** PerUserUsageData username. */ + public username: string; + + /** PerUserUsageData viewCount. */ + public viewCount: (number|Long|string); + + /** + * Creates a new PerUserUsageData instance using the specified properties. + * @param [properties] Properties to set + * @returns PerUserUsageData instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData; + + /** + * Encodes the specified PerUserUsageData message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.verify|verify} messages. + * @param message PerUserUsageData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PerUserUsageData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.verify|verify} messages. + * @param message PerUserUsageData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PerUserUsageData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PerUserUsageData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData; + + /** + * Decodes a PerUserUsageData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PerUserUsageData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData; + + /** + * Verifies a PerUserUsageData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PerUserUsageData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PerUserUsageData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData; + + /** + * Creates a plain object from a PerUserUsageData message. Also converts values to other types if specified. + * @param message PerUserUsageData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PerUserUsageData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PerUserUsageData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PerMonthUsageData. */ + interface IPerMonthUsageData { + + /** PerMonthUsageData userUsageData */ + userUsageData?: (google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData[]|null); + } + + /** Represents a PerMonthUsageData. */ + class PerMonthUsageData implements IPerMonthUsageData { + + /** + * Constructs a new PerMonthUsageData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData); + + /** PerMonthUsageData userUsageData. */ + public userUsageData: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData[]; + + /** + * Creates a new PerMonthUsageData instance using the specified properties. + * @param [properties] Properties to set + * @returns PerMonthUsageData instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData; + + /** + * Encodes the specified PerMonthUsageData message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.verify|verify} messages. + * @param message PerMonthUsageData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PerMonthUsageData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.verify|verify} messages. + * @param message PerMonthUsageData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PerMonthUsageData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PerMonthUsageData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData; + + /** + * Decodes a PerMonthUsageData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PerMonthUsageData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData; + + /** + * Verifies a PerMonthUsageData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PerMonthUsageData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PerMonthUsageData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData; + + /** + * Creates a plain object from a PerMonthUsageData message. Also converts values to other types if specified. + * @param message PerMonthUsageData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PerMonthUsageData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PerMonthUsageData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a CreateTensorboardExperimentRequest. */ interface ICreateTensorboardExperimentRequest { @@ -83742,7 +83873,8 @@ export namespace google { JOB_STATE_CANCELLED = 7, JOB_STATE_PAUSED = 8, JOB_STATE_EXPIRED = 9, - JOB_STATE_UPDATING = 10 + JOB_STATE_UPDATING = 10, + JOB_STATE_PARTIALLY_SUCCEEDED = 11 } /** Properties of a MachineSpec. */ @@ -88728,6 +88860,9 @@ export namespace google { /** Properties of a CustomJobSpec. */ interface ICustomJobSpec { + /** CustomJobSpec persistentResourceId */ + persistentResourceId?: (string|null); + /** CustomJobSpec workerPoolSpecs */ workerPoolSpecs?: (google.cloud.aiplatform.v1beta1.IWorkerPoolSpec[]|null); @@ -88771,6 +88906,9 @@ export namespace google { */ constructor(properties?: google.cloud.aiplatform.v1beta1.ICustomJobSpec); + /** CustomJobSpec persistentResourceId. */ + public persistentResourceId: string; + /** CustomJobSpec workerPoolSpecs. */ public workerPoolSpecs: google.cloud.aiplatform.v1beta1.IWorkerPoolSpec[]; @@ -90034,6 +90172,9 @@ export namespace google { /** Dataset metadata */ metadata?: (google.protobuf.IValue|null); + /** Dataset dataItemCount */ + dataItemCount?: (number|Long|string|null); + /** Dataset createTime */ createTime?: (google.protobuf.ITimestamp|null); @@ -90080,6 +90221,9 @@ export namespace google { /** Dataset metadata. */ public metadata?: (google.protobuf.IValue|null); + /** Dataset dataItemCount. */ + public dataItemCount: (number|Long|string); + /** Dataset createTime. */ public createTime?: (google.protobuf.ITimestamp|null); @@ -90832,6 +90976,20 @@ export namespace google { */ public listSavedQueries(request: google.cloud.aiplatform.v1beta1.IListSavedQueriesRequest): Promise; + /** + * Calls DeleteSavedQuery. + * @param request DeleteSavedQueryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteSavedQuery(request: google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest, callback: google.cloud.aiplatform.v1beta1.DatasetService.DeleteSavedQueryCallback): void; + + /** + * Calls DeleteSavedQuery. + * @param request DeleteSavedQueryRequest message or plain object + * @returns Promise + */ + public deleteSavedQuery(request: google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest): Promise; + /** * Calls GetAnnotationSpec. * @param request GetAnnotationSpecRequest message or plain object @@ -90933,6 +91091,13 @@ export namespace google { */ type ListSavedQueriesCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.ListSavedQueriesResponse) => void; + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.DatasetService|deleteSavedQuery}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteSavedQueryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.DatasetService|getAnnotationSpec}. * @param error Error, if any @@ -93225,6 +93390,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DeleteSavedQueryRequest. */ + interface IDeleteSavedQueryRequest { + + /** DeleteSavedQueryRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSavedQueryRequest. */ + class DeleteSavedQueryRequest implements IDeleteSavedQueryRequest { + + /** + * Constructs a new DeleteSavedQueryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest); + + /** DeleteSavedQueryRequest name. */ + public name: string; + + /** + * Creates a new DeleteSavedQueryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSavedQueryRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest): google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest; + + /** + * Encodes the specified DeleteSavedQueryRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest.verify|verify} messages. + * @param message DeleteSavedQueryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSavedQueryRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest.verify|verify} messages. + * @param message DeleteSavedQueryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSavedQueryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSavedQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest; + + /** + * Decodes a DeleteSavedQueryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSavedQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest; + + /** + * Verifies a DeleteSavedQueryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSavedQueryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSavedQueryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest; + + /** + * Creates a plain object from a DeleteSavedQueryRequest message. Also converts values to other types if specified. + * @param message DeleteSavedQueryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSavedQueryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSavedQueryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GetAnnotationSpecRequest. */ interface IGetAnnotationSpecRequest { @@ -136941,6 +137203,1355 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a PersistentResource. */ + interface IPersistentResource { + + /** PersistentResource name */ + name?: (string|null); + + /** PersistentResource displayName */ + displayName?: (string|null); + + /** PersistentResource resourcePools */ + resourcePools?: (google.cloud.aiplatform.v1beta1.IResourcePool[]|null); + + /** PersistentResource state */ + state?: (google.cloud.aiplatform.v1beta1.PersistentResource.State|keyof typeof google.cloud.aiplatform.v1beta1.PersistentResource.State|null); + + /** PersistentResource error */ + error?: (google.rpc.IStatus|null); + + /** PersistentResource createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** PersistentResource startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** PersistentResource updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** PersistentResource labels */ + labels?: ({ [k: string]: string }|null); + + /** PersistentResource network */ + network?: (string|null); + + /** PersistentResource encryptionSpec */ + encryptionSpec?: (google.cloud.aiplatform.v1beta1.IEncryptionSpec|null); + + /** PersistentResource resourceRuntimeSpec */ + resourceRuntimeSpec?: (google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec|null); + + /** PersistentResource reservedIpRanges */ + reservedIpRanges?: (string[]|null); + } + + /** Represents a PersistentResource. */ + class PersistentResource implements IPersistentResource { + + /** + * Constructs a new PersistentResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IPersistentResource); + + /** PersistentResource name. */ + public name: string; + + /** PersistentResource displayName. */ + public displayName: string; + + /** PersistentResource resourcePools. */ + public resourcePools: google.cloud.aiplatform.v1beta1.IResourcePool[]; + + /** PersistentResource state. */ + public state: (google.cloud.aiplatform.v1beta1.PersistentResource.State|keyof typeof google.cloud.aiplatform.v1beta1.PersistentResource.State); + + /** PersistentResource error. */ + public error?: (google.rpc.IStatus|null); + + /** PersistentResource createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** PersistentResource startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** PersistentResource updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** PersistentResource labels. */ + public labels: { [k: string]: string }; + + /** PersistentResource network. */ + public network: string; + + /** PersistentResource encryptionSpec. */ + public encryptionSpec?: (google.cloud.aiplatform.v1beta1.IEncryptionSpec|null); + + /** PersistentResource resourceRuntimeSpec. */ + public resourceRuntimeSpec?: (google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec|null); + + /** PersistentResource reservedIpRanges. */ + public reservedIpRanges: string[]; + + /** + * Creates a new PersistentResource instance using the specified properties. + * @param [properties] Properties to set + * @returns PersistentResource instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IPersistentResource): google.cloud.aiplatform.v1beta1.PersistentResource; + + /** + * Encodes the specified PersistentResource message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PersistentResource.verify|verify} messages. + * @param message PersistentResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IPersistentResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PersistentResource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PersistentResource.verify|verify} messages. + * @param message PersistentResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPersistentResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PersistentResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PersistentResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.PersistentResource; + + /** + * Decodes a PersistentResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PersistentResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.PersistentResource; + + /** + * Verifies a PersistentResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PersistentResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PersistentResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PersistentResource; + + /** + * Creates a plain object from a PersistentResource message. Also converts values to other types if specified. + * @param message PersistentResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PersistentResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PersistentResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PersistentResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PersistentResource { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PROVISIONING = 1, + RUNNING = 3, + STOPPING = 4, + ERROR = 5 + } + } + + /** Properties of a ResourcePool. */ + interface IResourcePool { + + /** ResourcePool id */ + id?: (string|null); + + /** ResourcePool machineSpec */ + machineSpec?: (google.cloud.aiplatform.v1beta1.IMachineSpec|null); + + /** ResourcePool replicaCount */ + replicaCount?: (number|Long|string|null); + + /** ResourcePool diskSpec */ + diskSpec?: (google.cloud.aiplatform.v1beta1.IDiskSpec|null); + + /** ResourcePool idleReplicaCount */ + idleReplicaCount?: (number|Long|string|null); + + /** ResourcePool usedReplicaCount */ + usedReplicaCount?: (number|Long|string|null); + + /** ResourcePool autoscalingSpec */ + autoscalingSpec?: (google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec|null); + } + + /** Represents a ResourcePool. */ + class ResourcePool implements IResourcePool { + + /** + * Constructs a new ResourcePool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IResourcePool); + + /** ResourcePool id. */ + public id: string; + + /** ResourcePool machineSpec. */ + public machineSpec?: (google.cloud.aiplatform.v1beta1.IMachineSpec|null); + + /** ResourcePool replicaCount. */ + public replicaCount?: (number|Long|string|null); + + /** ResourcePool diskSpec. */ + public diskSpec?: (google.cloud.aiplatform.v1beta1.IDiskSpec|null); + + /** ResourcePool idleReplicaCount. */ + public idleReplicaCount: (number|Long|string); + + /** ResourcePool usedReplicaCount. */ + public usedReplicaCount: (number|Long|string); + + /** ResourcePool autoscalingSpec. */ + public autoscalingSpec?: (google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec|null); + + /** ResourcePool _replicaCount. */ + public _replicaCount?: "replicaCount"; + + /** + * Creates a new ResourcePool instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourcePool instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IResourcePool): google.cloud.aiplatform.v1beta1.ResourcePool; + + /** + * Encodes the specified ResourcePool message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourcePool.verify|verify} messages. + * @param message ResourcePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IResourcePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourcePool message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourcePool.verify|verify} messages. + * @param message ResourcePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IResourcePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourcePool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourcePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ResourcePool; + + /** + * Decodes a ResourcePool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourcePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ResourcePool; + + /** + * Verifies a ResourcePool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourcePool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourcePool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ResourcePool; + + /** + * Creates a plain object from a ResourcePool message. Also converts values to other types if specified. + * @param message ResourcePool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ResourcePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourcePool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourcePool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourcePool { + + /** Properties of an AutoscalingSpec. */ + interface IAutoscalingSpec { + + /** AutoscalingSpec minReplicaCount */ + minReplicaCount?: (number|Long|string|null); + + /** AutoscalingSpec maxReplicaCount */ + maxReplicaCount?: (number|Long|string|null); + } + + /** Represents an AutoscalingSpec. */ + class AutoscalingSpec implements IAutoscalingSpec { + + /** + * Constructs a new AutoscalingSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec); + + /** AutoscalingSpec minReplicaCount. */ + public minReplicaCount?: (number|Long|string|null); + + /** AutoscalingSpec maxReplicaCount. */ + public maxReplicaCount?: (number|Long|string|null); + + /** AutoscalingSpec _minReplicaCount. */ + public _minReplicaCount?: "minReplicaCount"; + + /** AutoscalingSpec _maxReplicaCount. */ + public _maxReplicaCount?: "maxReplicaCount"; + + /** + * Creates a new AutoscalingSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoscalingSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec): google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec; + + /** + * Encodes the specified AutoscalingSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec.verify|verify} messages. + * @param message AutoscalingSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoscalingSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec.verify|verify} messages. + * @param message AutoscalingSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoscalingSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoscalingSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec; + + /** + * Decodes an AutoscalingSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoscalingSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec; + + /** + * Verifies an AutoscalingSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutoscalingSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoscalingSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec; + + /** + * Creates a plain object from an AutoscalingSpec message. Also converts values to other types if specified. + * @param message AutoscalingSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoscalingSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoscalingSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ResourceRuntimeSpec. */ + interface IResourceRuntimeSpec { + + /** ResourceRuntimeSpec serviceAccountSpec */ + serviceAccountSpec?: (google.cloud.aiplatform.v1beta1.IServiceAccountSpec|null); + } + + /** Represents a ResourceRuntimeSpec. */ + class ResourceRuntimeSpec implements IResourceRuntimeSpec { + + /** + * Constructs a new ResourceRuntimeSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec); + + /** ResourceRuntimeSpec serviceAccountSpec. */ + public serviceAccountSpec?: (google.cloud.aiplatform.v1beta1.IServiceAccountSpec|null); + + /** + * Creates a new ResourceRuntimeSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceRuntimeSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec): google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec; + + /** + * Encodes the specified ResourceRuntimeSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec.verify|verify} messages. + * @param message ResourceRuntimeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceRuntimeSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec.verify|verify} messages. + * @param message ResourceRuntimeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceRuntimeSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceRuntimeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec; + + /** + * Decodes a ResourceRuntimeSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceRuntimeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec; + + /** + * Verifies a ResourceRuntimeSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceRuntimeSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceRuntimeSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec; + + /** + * Creates a plain object from a ResourceRuntimeSpec message. Also converts values to other types if specified. + * @param message ResourceRuntimeSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceRuntimeSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceRuntimeSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceAccountSpec. */ + interface IServiceAccountSpec { + + /** ServiceAccountSpec enableCustomServiceAccount */ + enableCustomServiceAccount?: (boolean|null); + + /** ServiceAccountSpec serviceAccount */ + serviceAccount?: (string|null); + } + + /** Represents a ServiceAccountSpec. */ + class ServiceAccountSpec implements IServiceAccountSpec { + + /** + * Constructs a new ServiceAccountSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IServiceAccountSpec); + + /** ServiceAccountSpec enableCustomServiceAccount. */ + public enableCustomServiceAccount: boolean; + + /** ServiceAccountSpec serviceAccount. */ + public serviceAccount: string; + + /** + * Creates a new ServiceAccountSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceAccountSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IServiceAccountSpec): google.cloud.aiplatform.v1beta1.ServiceAccountSpec; + + /** + * Encodes the specified ServiceAccountSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ServiceAccountSpec.verify|verify} messages. + * @param message ServiceAccountSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IServiceAccountSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceAccountSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ServiceAccountSpec.verify|verify} messages. + * @param message ServiceAccountSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IServiceAccountSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceAccountSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceAccountSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ServiceAccountSpec; + + /** + * Decodes a ServiceAccountSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceAccountSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ServiceAccountSpec; + + /** + * Verifies a ServiceAccountSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceAccountSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceAccountSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ServiceAccountSpec; + + /** + * Creates a plain object from a ServiceAccountSpec message. Also converts values to other types if specified. + * @param message ServiceAccountSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ServiceAccountSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceAccountSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceAccountSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a PersistentResourceService */ + class PersistentResourceService extends $protobuf.rpc.Service { + + /** + * Constructs a new PersistentResourceService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new PersistentResourceService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): PersistentResourceService; + + /** + * Calls CreatePersistentResource. + * @param request CreatePersistentResourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createPersistentResource(request: google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest, callback: google.cloud.aiplatform.v1beta1.PersistentResourceService.CreatePersistentResourceCallback): void; + + /** + * Calls CreatePersistentResource. + * @param request CreatePersistentResourceRequest message or plain object + * @returns Promise + */ + public createPersistentResource(request: google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest): Promise; + + /** + * Calls GetPersistentResource. + * @param request GetPersistentResourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PersistentResource + */ + public getPersistentResource(request: google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest, callback: google.cloud.aiplatform.v1beta1.PersistentResourceService.GetPersistentResourceCallback): void; + + /** + * Calls GetPersistentResource. + * @param request GetPersistentResourceRequest message or plain object + * @returns Promise + */ + public getPersistentResource(request: google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest): Promise; + + /** + * Calls ListPersistentResources. + * @param request ListPersistentResourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPersistentResourcesResponse + */ + public listPersistentResources(request: google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, callback: google.cloud.aiplatform.v1beta1.PersistentResourceService.ListPersistentResourcesCallback): void; + + /** + * Calls ListPersistentResources. + * @param request ListPersistentResourcesRequest message or plain object + * @returns Promise + */ + public listPersistentResources(request: google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest): Promise; + + /** + * Calls DeletePersistentResource. + * @param request DeletePersistentResourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deletePersistentResource(request: google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest, callback: google.cloud.aiplatform.v1beta1.PersistentResourceService.DeletePersistentResourceCallback): void; + + /** + * Calls DeletePersistentResource. + * @param request DeletePersistentResourceRequest message or plain object + * @returns Promise + */ + public deletePersistentResource(request: google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest): Promise; + } + + namespace PersistentResourceService { + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.PersistentResourceService|createPersistentResource}. + * @param error Error, if any + * @param [response] Operation + */ + type CreatePersistentResourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.PersistentResourceService|getPersistentResource}. + * @param error Error, if any + * @param [response] PersistentResource + */ + type GetPersistentResourceCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.PersistentResource) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.PersistentResourceService|listPersistentResources}. + * @param error Error, if any + * @param [response] ListPersistentResourcesResponse + */ + type ListPersistentResourcesCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.PersistentResourceService|deletePersistentResource}. + * @param error Error, if any + * @param [response] Operation + */ + type DeletePersistentResourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a CreatePersistentResourceRequest. */ + interface ICreatePersistentResourceRequest { + + /** CreatePersistentResourceRequest parent */ + parent?: (string|null); + + /** CreatePersistentResourceRequest persistentResource */ + persistentResource?: (google.cloud.aiplatform.v1beta1.IPersistentResource|null); + + /** CreatePersistentResourceRequest persistentResourceId */ + persistentResourceId?: (string|null); + } + + /** Represents a CreatePersistentResourceRequest. */ + class CreatePersistentResourceRequest implements ICreatePersistentResourceRequest { + + /** + * Constructs a new CreatePersistentResourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest); + + /** CreatePersistentResourceRequest parent. */ + public parent: string; + + /** CreatePersistentResourceRequest persistentResource. */ + public persistentResource?: (google.cloud.aiplatform.v1beta1.IPersistentResource|null); + + /** CreatePersistentResourceRequest persistentResourceId. */ + public persistentResourceId: string; + + /** + * Creates a new CreatePersistentResourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePersistentResourceRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest): google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest; + + /** + * Encodes the specified CreatePersistentResourceRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest.verify|verify} messages. + * @param message CreatePersistentResourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePersistentResourceRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest.verify|verify} messages. + * @param message CreatePersistentResourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePersistentResourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest; + + /** + * Decodes a CreatePersistentResourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest; + + /** + * Verifies a CreatePersistentResourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePersistentResourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePersistentResourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest; + + /** + * Creates a plain object from a CreatePersistentResourceRequest message. Also converts values to other types if specified. + * @param message CreatePersistentResourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePersistentResourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePersistentResourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePersistentResourceOperationMetadata. */ + interface ICreatePersistentResourceOperationMetadata { + + /** CreatePersistentResourceOperationMetadata genericMetadata */ + genericMetadata?: (google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null); + } + + /** Represents a CreatePersistentResourceOperationMetadata. */ + class CreatePersistentResourceOperationMetadata implements ICreatePersistentResourceOperationMetadata { + + /** + * Constructs a new CreatePersistentResourceOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata); + + /** CreatePersistentResourceOperationMetadata genericMetadata. */ + public genericMetadata?: (google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null); + + /** + * Creates a new CreatePersistentResourceOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePersistentResourceOperationMetadata instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata): google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata; + + /** + * Encodes the specified CreatePersistentResourceOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata.verify|verify} messages. + * @param message CreatePersistentResourceOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePersistentResourceOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata.verify|verify} messages. + * @param message CreatePersistentResourceOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePersistentResourceOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePersistentResourceOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata; + + /** + * Decodes a CreatePersistentResourceOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePersistentResourceOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata; + + /** + * Verifies a CreatePersistentResourceOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePersistentResourceOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePersistentResourceOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata; + + /** + * Creates a plain object from a CreatePersistentResourceOperationMetadata message. Also converts values to other types if specified. + * @param message CreatePersistentResourceOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePersistentResourceOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePersistentResourceOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPersistentResourceRequest. */ + interface IGetPersistentResourceRequest { + + /** GetPersistentResourceRequest name */ + name?: (string|null); + } + + /** Represents a GetPersistentResourceRequest. */ + class GetPersistentResourceRequest implements IGetPersistentResourceRequest { + + /** + * Constructs a new GetPersistentResourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest); + + /** GetPersistentResourceRequest name. */ + public name: string; + + /** + * Creates a new GetPersistentResourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPersistentResourceRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest): google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest; + + /** + * Encodes the specified GetPersistentResourceRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest.verify|verify} messages. + * @param message GetPersistentResourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPersistentResourceRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest.verify|verify} messages. + * @param message GetPersistentResourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPersistentResourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest; + + /** + * Decodes a GetPersistentResourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest; + + /** + * Verifies a GetPersistentResourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPersistentResourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPersistentResourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest; + + /** + * Creates a plain object from a GetPersistentResourceRequest message. Also converts values to other types if specified. + * @param message GetPersistentResourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPersistentResourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPersistentResourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPersistentResourcesRequest. */ + interface IListPersistentResourcesRequest { + + /** ListPersistentResourcesRequest parent */ + parent?: (string|null); + + /** ListPersistentResourcesRequest pageSize */ + pageSize?: (number|null); + + /** ListPersistentResourcesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPersistentResourcesRequest. */ + class ListPersistentResourcesRequest implements IListPersistentResourcesRequest { + + /** + * Constructs a new ListPersistentResourcesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest); + + /** ListPersistentResourcesRequest parent. */ + public parent: string; + + /** ListPersistentResourcesRequest pageSize. */ + public pageSize: number; + + /** ListPersistentResourcesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPersistentResourcesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPersistentResourcesRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest): google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest; + + /** + * Encodes the specified ListPersistentResourcesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest.verify|verify} messages. + * @param message ListPersistentResourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPersistentResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest.verify|verify} messages. + * @param message ListPersistentResourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPersistentResourcesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPersistentResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest; + + /** + * Decodes a ListPersistentResourcesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPersistentResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest; + + /** + * Verifies a ListPersistentResourcesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPersistentResourcesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPersistentResourcesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest; + + /** + * Creates a plain object from a ListPersistentResourcesRequest message. Also converts values to other types if specified. + * @param message ListPersistentResourcesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPersistentResourcesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPersistentResourcesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPersistentResourcesResponse. */ + interface IListPersistentResourcesResponse { + + /** ListPersistentResourcesResponse persistentResources */ + persistentResources?: (google.cloud.aiplatform.v1beta1.IPersistentResource[]|null); + + /** ListPersistentResourcesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPersistentResourcesResponse. */ + class ListPersistentResourcesResponse implements IListPersistentResourcesResponse { + + /** + * Constructs a new ListPersistentResourcesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse); + + /** ListPersistentResourcesResponse persistentResources. */ + public persistentResources: google.cloud.aiplatform.v1beta1.IPersistentResource[]; + + /** ListPersistentResourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPersistentResourcesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPersistentResourcesResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse): google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse; + + /** + * Encodes the specified ListPersistentResourcesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse.verify|verify} messages. + * @param message ListPersistentResourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPersistentResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse.verify|verify} messages. + * @param message ListPersistentResourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPersistentResourcesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPersistentResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse; + + /** + * Decodes a ListPersistentResourcesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPersistentResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse; + + /** + * Verifies a ListPersistentResourcesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPersistentResourcesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPersistentResourcesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse; + + /** + * Creates a plain object from a ListPersistentResourcesResponse message. Also converts values to other types if specified. + * @param message ListPersistentResourcesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPersistentResourcesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPersistentResourcesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePersistentResourceRequest. */ + interface IDeletePersistentResourceRequest { + + /** DeletePersistentResourceRequest name */ + name?: (string|null); + } + + /** Represents a DeletePersistentResourceRequest. */ + class DeletePersistentResourceRequest implements IDeletePersistentResourceRequest { + + /** + * Constructs a new DeletePersistentResourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest); + + /** DeletePersistentResourceRequest name. */ + public name: string; + + /** + * Creates a new DeletePersistentResourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePersistentResourceRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest): google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest; + + /** + * Encodes the specified DeletePersistentResourceRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest.verify|verify} messages. + * @param message DeletePersistentResourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePersistentResourceRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest.verify|verify} messages. + * @param message DeletePersistentResourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePersistentResourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest; + + /** + * Decodes a DeletePersistentResourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest; + + /** + * Verifies a DeletePersistentResourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePersistentResourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePersistentResourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest; + + /** + * Creates a plain object from a DeletePersistentResourceRequest message. Also converts values to other types if specified. + * @param message DeletePersistentResourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePersistentResourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePersistentResourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** PipelineFailurePolicy enum. */ enum PipelineFailurePolicy { PIPELINE_FAILURE_POLICY_UNSPECIFIED = 0, @@ -136996,6 +138607,9 @@ export namespace google { /** PipelineJob network */ network?: (string|null); + /** PipelineJob reservedIpRanges */ + reservedIpRanges?: (string[]|null); + /** PipelineJob templateUri */ templateUri?: (string|null); @@ -137057,6 +138671,9 @@ export namespace google { /** PipelineJob network. */ public network: string; + /** PipelineJob reservedIpRanges. */ + public reservedIpRanges: string[]; + /** PipelineJob templateUri. */ public templateUri: string; @@ -156162,20 +157779,6 @@ export namespace google { */ public getTensorboard(request: google.cloud.aiplatform.v1beta1.IGetTensorboardRequest): Promise; - /** - * Calls ReadTensorboardUsage. - * @param request ReadTensorboardUsageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ReadTensorboardUsageResponse - */ - public readTensorboardUsage(request: google.cloud.aiplatform.v1beta1.IReadTensorboardUsageRequest, callback: google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsageCallback): void; - - /** - * Calls ReadTensorboardUsage. - * @param request ReadTensorboardUsageRequest message or plain object - * @returns Promise - */ - public readTensorboardUsage(request: google.cloud.aiplatform.v1beta1.IReadTensorboardUsageRequest): Promise; - /** * Calls UpdateTensorboard. * @param request UpdateTensorboardRequest message or plain object @@ -156218,6 +157821,34 @@ export namespace google { */ public deleteTensorboard(request: google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest): Promise; + /** + * Calls ReadTensorboardUsage. + * @param request ReadTensorboardUsageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadTensorboardUsageResponse + */ + public readTensorboardUsage(request: google.cloud.aiplatform.v1beta1.IReadTensorboardUsageRequest, callback: google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsageCallback): void; + + /** + * Calls ReadTensorboardUsage. + * @param request ReadTensorboardUsageRequest message or plain object + * @returns Promise + */ + public readTensorboardUsage(request: google.cloud.aiplatform.v1beta1.IReadTensorboardUsageRequest): Promise; + + /** + * Calls ReadTensorboardSize. + * @param request ReadTensorboardSizeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadTensorboardSizeResponse + */ + public readTensorboardSize(request: google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest, callback: google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardSizeCallback): void; + + /** + * Calls ReadTensorboardSize. + * @param request ReadTensorboardSizeRequest message or plain object + * @returns Promise + */ + public readTensorboardSize(request: google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest): Promise; + /** * Calls CreateTensorboardExperiment. * @param request CreateTensorboardExperimentRequest message or plain object @@ -156557,13 +158188,6 @@ export namespace google { */ type GetTensorboardCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.Tensorboard) => void; - /** - * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|readTensorboardUsage}. - * @param error Error, if any - * @param [response] ReadTensorboardUsageResponse - */ - type ReadTensorboardUsageCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.ReadTensorboardUsageResponse) => void; - /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|updateTensorboard}. * @param error Error, if any @@ -156585,6 +158209,20 @@ export namespace google { */ type DeleteTensorboardCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|readTensorboardUsage}. + * @param error Error, if any + * @param [response] ReadTensorboardUsageResponse + */ + type ReadTensorboardUsageCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.ReadTensorboardUsageResponse) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|readTensorboardSize}. + * @param error Error, if any + * @param [response] ReadTensorboardSizeResponse + */ + type ReadTensorboardSizeCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse) => void; + /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|createTensorboardExperiment}. * @param error Error, if any @@ -156947,6 +158585,436 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ListTensorboardsRequest. */ + interface IListTensorboardsRequest { + + /** ListTensorboardsRequest parent */ + parent?: (string|null); + + /** ListTensorboardsRequest filter */ + filter?: (string|null); + + /** ListTensorboardsRequest pageSize */ + pageSize?: (number|null); + + /** ListTensorboardsRequest pageToken */ + pageToken?: (string|null); + + /** ListTensorboardsRequest orderBy */ + orderBy?: (string|null); + + /** ListTensorboardsRequest readMask */ + readMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a ListTensorboardsRequest. */ + class ListTensorboardsRequest implements IListTensorboardsRequest { + + /** + * Constructs a new ListTensorboardsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IListTensorboardsRequest); + + /** ListTensorboardsRequest parent. */ + public parent: string; + + /** ListTensorboardsRequest filter. */ + public filter: string; + + /** ListTensorboardsRequest pageSize. */ + public pageSize: number; + + /** ListTensorboardsRequest pageToken. */ + public pageToken: string; + + /** ListTensorboardsRequest orderBy. */ + public orderBy: string; + + /** ListTensorboardsRequest readMask. */ + public readMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new ListTensorboardsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTensorboardsRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IListTensorboardsRequest): google.cloud.aiplatform.v1beta1.ListTensorboardsRequest; + + /** + * Encodes the specified ListTensorboardsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsRequest.verify|verify} messages. + * @param message ListTensorboardsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IListTensorboardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTensorboardsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsRequest.verify|verify} messages. + * @param message ListTensorboardsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IListTensorboardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTensorboardsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTensorboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ListTensorboardsRequest; + + /** + * Decodes a ListTensorboardsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTensorboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ListTensorboardsRequest; + + /** + * Verifies a ListTensorboardsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTensorboardsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTensorboardsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ListTensorboardsRequest; + + /** + * Creates a plain object from a ListTensorboardsRequest message. Also converts values to other types if specified. + * @param message ListTensorboardsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ListTensorboardsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTensorboardsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTensorboardsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTensorboardsResponse. */ + interface IListTensorboardsResponse { + + /** ListTensorboardsResponse tensorboards */ + tensorboards?: (google.cloud.aiplatform.v1beta1.ITensorboard[]|null); + + /** ListTensorboardsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTensorboardsResponse. */ + class ListTensorboardsResponse implements IListTensorboardsResponse { + + /** + * Constructs a new ListTensorboardsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IListTensorboardsResponse); + + /** ListTensorboardsResponse tensorboards. */ + public tensorboards: google.cloud.aiplatform.v1beta1.ITensorboard[]; + + /** ListTensorboardsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTensorboardsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTensorboardsResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IListTensorboardsResponse): google.cloud.aiplatform.v1beta1.ListTensorboardsResponse; + + /** + * Encodes the specified ListTensorboardsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.verify|verify} messages. + * @param message ListTensorboardsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IListTensorboardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTensorboardsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.verify|verify} messages. + * @param message ListTensorboardsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IListTensorboardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTensorboardsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTensorboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ListTensorboardsResponse; + + /** + * Decodes a ListTensorboardsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTensorboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ListTensorboardsResponse; + + /** + * Verifies a ListTensorboardsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTensorboardsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTensorboardsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ListTensorboardsResponse; + + /** + * Creates a plain object from a ListTensorboardsResponse message. Also converts values to other types if specified. + * @param message ListTensorboardsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ListTensorboardsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTensorboardsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTensorboardsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateTensorboardRequest. */ + interface IUpdateTensorboardRequest { + + /** UpdateTensorboardRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTensorboardRequest tensorboard */ + tensorboard?: (google.cloud.aiplatform.v1beta1.ITensorboard|null); + } + + /** Represents an UpdateTensorboardRequest. */ + class UpdateTensorboardRequest implements IUpdateTensorboardRequest { + + /** + * Constructs a new UpdateTensorboardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest); + + /** UpdateTensorboardRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTensorboardRequest tensorboard. */ + public tensorboard?: (google.cloud.aiplatform.v1beta1.ITensorboard|null); + + /** + * Creates a new UpdateTensorboardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTensorboardRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest): google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest; + + /** + * Encodes the specified UpdateTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.verify|verify} messages. + * @param message UpdateTensorboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.verify|verify} messages. + * @param message UpdateTensorboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTensorboardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTensorboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest; + + /** + * Decodes an UpdateTensorboardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTensorboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest; + + /** + * Verifies an UpdateTensorboardRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateTensorboardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTensorboardRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest; + + /** + * Creates a plain object from an UpdateTensorboardRequest message. Also converts values to other types if specified. + * @param message UpdateTensorboardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTensorboardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateTensorboardRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteTensorboardRequest. */ + interface IDeleteTensorboardRequest { + + /** DeleteTensorboardRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTensorboardRequest. */ + class DeleteTensorboardRequest implements IDeleteTensorboardRequest { + + /** + * Constructs a new DeleteTensorboardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest); + + /** DeleteTensorboardRequest name. */ + public name: string; + + /** + * Creates a new DeleteTensorboardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTensorboardRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest): google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest; + + /** + * Encodes the specified DeleteTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest.verify|verify} messages. + * @param message DeleteTensorboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest.verify|verify} messages. + * @param message DeleteTensorboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTensorboardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTensorboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest; + + /** + * Decodes a DeleteTensorboardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTensorboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest; + + /** + * Verifies a DeleteTensorboardRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteTensorboardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTensorboardRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest; + + /** + * Creates a plain object from a DeleteTensorboardRequest message. Also converts values to other types if specified. + * @param message DeleteTensorboardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTensorboardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTensorboardRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ReadTensorboardUsageRequest. */ interface IReadTensorboardUsageRequest { @@ -157344,430 +159412,194 @@ export namespace google { } } - /** Properties of a ListTensorboardsRequest. */ - interface IListTensorboardsRequest { - - /** ListTensorboardsRequest parent */ - parent?: (string|null); - - /** ListTensorboardsRequest filter */ - filter?: (string|null); - - /** ListTensorboardsRequest pageSize */ - pageSize?: (number|null); - - /** ListTensorboardsRequest pageToken */ - pageToken?: (string|null); - - /** ListTensorboardsRequest orderBy */ - orderBy?: (string|null); - - /** ListTensorboardsRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a ListTensorboardsRequest. */ - class ListTensorboardsRequest implements IListTensorboardsRequest { - - /** - * Constructs a new ListTensorboardsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.aiplatform.v1beta1.IListTensorboardsRequest); - - /** ListTensorboardsRequest parent. */ - public parent: string; - - /** ListTensorboardsRequest filter. */ - public filter: string; - - /** ListTensorboardsRequest pageSize. */ - public pageSize: number; - - /** ListTensorboardsRequest pageToken. */ - public pageToken: string; - - /** ListTensorboardsRequest orderBy. */ - public orderBy: string; - - /** ListTensorboardsRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new ListTensorboardsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTensorboardsRequest instance - */ - public static create(properties?: google.cloud.aiplatform.v1beta1.IListTensorboardsRequest): google.cloud.aiplatform.v1beta1.ListTensorboardsRequest; - - /** - * Encodes the specified ListTensorboardsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsRequest.verify|verify} messages. - * @param message ListTensorboardsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.aiplatform.v1beta1.IListTensorboardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTensorboardsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsRequest.verify|verify} messages. - * @param message ListTensorboardsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IListTensorboardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTensorboardsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTensorboardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ListTensorboardsRequest; - - /** - * Decodes a ListTensorboardsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTensorboardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ListTensorboardsRequest; - - /** - * Verifies a ListTensorboardsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTensorboardsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTensorboardsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ListTensorboardsRequest; - - /** - * Creates a plain object from a ListTensorboardsRequest message. Also converts values to other types if specified. - * @param message ListTensorboardsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.aiplatform.v1beta1.ListTensorboardsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTensorboardsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a ReadTensorboardSizeRequest. */ + interface IReadTensorboardSizeRequest { - /** - * Gets the default type url for ListTensorboardsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTensorboardsResponse. */ - interface IListTensorboardsResponse { - - /** ListTensorboardsResponse tensorboards */ - tensorboards?: (google.cloud.aiplatform.v1beta1.ITensorboard[]|null); - - /** ListTensorboardsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListTensorboardsResponse. */ - class ListTensorboardsResponse implements IListTensorboardsResponse { - - /** - * Constructs a new ListTensorboardsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.aiplatform.v1beta1.IListTensorboardsResponse); - - /** ListTensorboardsResponse tensorboards. */ - public tensorboards: google.cloud.aiplatform.v1beta1.ITensorboard[]; - - /** ListTensorboardsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListTensorboardsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTensorboardsResponse instance - */ - public static create(properties?: google.cloud.aiplatform.v1beta1.IListTensorboardsResponse): google.cloud.aiplatform.v1beta1.ListTensorboardsResponse; - - /** - * Encodes the specified ListTensorboardsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.verify|verify} messages. - * @param message ListTensorboardsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.aiplatform.v1beta1.IListTensorboardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTensorboardsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.verify|verify} messages. - * @param message ListTensorboardsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IListTensorboardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTensorboardsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTensorboardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ListTensorboardsResponse; - - /** - * Decodes a ListTensorboardsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTensorboardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ListTensorboardsResponse; - - /** - * Verifies a ListTensorboardsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTensorboardsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTensorboardsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ListTensorboardsResponse; - - /** - * Creates a plain object from a ListTensorboardsResponse message. Also converts values to other types if specified. - * @param message ListTensorboardsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.aiplatform.v1beta1.ListTensorboardsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTensorboardsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTensorboardsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTensorboardRequest. */ - interface IUpdateTensorboardRequest { - - /** UpdateTensorboardRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateTensorboardRequest tensorboard */ - tensorboard?: (google.cloud.aiplatform.v1beta1.ITensorboard|null); + /** ReadTensorboardSizeRequest tensorboard */ + tensorboard?: (string|null); } - /** Represents an UpdateTensorboardRequest. */ - class UpdateTensorboardRequest implements IUpdateTensorboardRequest { + /** Represents a ReadTensorboardSizeRequest. */ + class ReadTensorboardSizeRequest implements IReadTensorboardSizeRequest { /** - * Constructs a new UpdateTensorboardRequest. + * Constructs a new ReadTensorboardSizeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest); + constructor(properties?: google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest); - /** UpdateTensorboardRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateTensorboardRequest tensorboard. */ - public tensorboard?: (google.cloud.aiplatform.v1beta1.ITensorboard|null); + /** ReadTensorboardSizeRequest tensorboard. */ + public tensorboard: string; /** - * Creates a new UpdateTensorboardRequest instance using the specified properties. + * Creates a new ReadTensorboardSizeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateTensorboardRequest instance + * @returns ReadTensorboardSizeRequest instance */ - public static create(properties?: google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest): google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest; + public static create(properties?: google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest): google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest; /** - * Encodes the specified UpdateTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.verify|verify} messages. - * @param message UpdateTensorboardRequest message or plain object to encode + * Encodes the specified ReadTensorboardSizeRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest.verify|verify} messages. + * @param message ReadTensorboardSizeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.verify|verify} messages. - * @param message UpdateTensorboardRequest message or plain object to encode + * Encodes the specified ReadTensorboardSizeRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest.verify|verify} messages. + * @param message ReadTensorboardSizeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateTensorboardRequest message from the specified reader or buffer. + * Decodes a ReadTensorboardSizeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateTensorboardRequest + * @returns ReadTensorboardSizeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest; /** - * Decodes an UpdateTensorboardRequest message from the specified reader or buffer, length delimited. + * Decodes a ReadTensorboardSizeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateTensorboardRequest + * @returns ReadTensorboardSizeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest; /** - * Verifies an UpdateTensorboardRequest message. + * Verifies a ReadTensorboardSizeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateTensorboardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReadTensorboardSizeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateTensorboardRequest + * @returns ReadTensorboardSizeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest; /** - * Creates a plain object from an UpdateTensorboardRequest message. Also converts values to other types if specified. - * @param message UpdateTensorboardRequest + * Creates a plain object from a ReadTensorboardSizeRequest message. Also converts values to other types if specified. + * @param message ReadTensorboardSizeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateTensorboardRequest to JSON. + * Converts this ReadTensorboardSizeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateTensorboardRequest + * Gets the default type url for ReadTensorboardSizeRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteTensorboardRequest. */ - interface IDeleteTensorboardRequest { + /** Properties of a ReadTensorboardSizeResponse. */ + interface IReadTensorboardSizeResponse { - /** DeleteTensorboardRequest name */ - name?: (string|null); + /** ReadTensorboardSizeResponse storageSizeByte */ + storageSizeByte?: (number|Long|string|null); } - /** Represents a DeleteTensorboardRequest. */ - class DeleteTensorboardRequest implements IDeleteTensorboardRequest { + /** Represents a ReadTensorboardSizeResponse. */ + class ReadTensorboardSizeResponse implements IReadTensorboardSizeResponse { /** - * Constructs a new DeleteTensorboardRequest. + * Constructs a new ReadTensorboardSizeResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest); + constructor(properties?: google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse); - /** DeleteTensorboardRequest name. */ - public name: string; + /** ReadTensorboardSizeResponse storageSizeByte. */ + public storageSizeByte: (number|Long|string); /** - * Creates a new DeleteTensorboardRequest instance using the specified properties. + * Creates a new ReadTensorboardSizeResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteTensorboardRequest instance + * @returns ReadTensorboardSizeResponse instance */ - public static create(properties?: google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest): google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest; + public static create(properties?: google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse): google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse; /** - * Encodes the specified DeleteTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest.verify|verify} messages. - * @param message DeleteTensorboardRequest message or plain object to encode + * Encodes the specified ReadTensorboardSizeResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse.verify|verify} messages. + * @param message ReadTensorboardSizeResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest.verify|verify} messages. - * @param message DeleteTensorboardRequest message or plain object to encode + * Encodes the specified ReadTensorboardSizeResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse.verify|verify} messages. + * @param message ReadTensorboardSizeResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTensorboardRequest message from the specified reader or buffer. + * Decodes a ReadTensorboardSizeResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteTensorboardRequest + * @returns ReadTensorboardSizeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse; /** - * Decodes a DeleteTensorboardRequest message from the specified reader or buffer, length delimited. + * Decodes a ReadTensorboardSizeResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTensorboardRequest + * @returns ReadTensorboardSizeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse; /** - * Verifies a DeleteTensorboardRequest message. + * Verifies a ReadTensorboardSizeResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteTensorboardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReadTensorboardSizeResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTensorboardRequest + * @returns ReadTensorboardSizeResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse; /** - * Creates a plain object from a DeleteTensorboardRequest message. Also converts values to other types if specified. - * @param message DeleteTensorboardRequest + * Creates a plain object from a ReadTensorboardSizeResponse message. Also converts values to other types if specified. + * @param message ReadTensorboardSizeResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTensorboardRequest to JSON. + * Converts this ReadTensorboardSizeResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteTensorboardRequest + * Gets the default type url for ReadTensorboardSizeResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index 4228fab86516..1fcc4d2f3b19 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -2273,6 +2273,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.error != null && message.hasOwnProperty("error")) { @@ -2458,6 +2459,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } if (object.error != null) { if (typeof object.error !== "object") @@ -13921,6 +13926,7 @@ * @property {number} JOB_STATE_PAUSED=8 JOB_STATE_PAUSED value * @property {number} JOB_STATE_EXPIRED=9 JOB_STATE_EXPIRED value * @property {number} JOB_STATE_UPDATING=10 JOB_STATE_UPDATING value + * @property {number} JOB_STATE_PARTIALLY_SUCCEEDED=11 JOB_STATE_PARTIALLY_SUCCEEDED value */ v1.JobState = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -13935,6 +13941,7 @@ values[valuesById[8] = "JOB_STATE_PAUSED"] = 8; values[valuesById[9] = "JOB_STATE_EXPIRED"] = 9; values[valuesById[10] = "JOB_STATE_UPDATING"] = 10; + values[valuesById[11] = "JOB_STATE_PARTIALLY_SUCCEEDED"] = 11; return values; })(); @@ -20687,6 +20694,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -20810,6 +20818,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } if (object.createTime != null) { if (typeof object.createTime !== "object") @@ -23601,6 +23613,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.labelingProgress != null && message.hasOwnProperty("labelingProgress")) @@ -23746,6 +23759,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } if (object.labelingProgress != null) message.labelingProgress = object.labelingProgress | 0; @@ -24776,6 +24793,7 @@ * @property {string|null} [description] Dataset description * @property {string|null} [metadataSchemaUri] Dataset metadataSchemaUri * @property {google.protobuf.IValue|null} [metadata] Dataset metadata + * @property {number|Long|null} [dataItemCount] Dataset dataItemCount * @property {google.protobuf.ITimestamp|null} [createTime] Dataset createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Dataset updateTime * @property {string|null} [etag] Dataset etag @@ -24842,6 +24860,14 @@ */ Dataset.prototype.metadata = null; + /** + * Dataset dataItemCount. + * @member {number|Long} dataItemCount + * @memberof google.cloud.aiplatform.v1.Dataset + * @instance + */ + Dataset.prototype.dataItemCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** * Dataset createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime @@ -24942,6 +24968,8 @@ if (message.savedQueries != null && message.savedQueries.length) for (var i = 0; i < message.savedQueries.length; ++i) $root.google.cloud.aiplatform.v1.SavedQuery.encode(message.savedQueries[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dataItemCount != null && Object.hasOwnProperty.call(message, "dataItemCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.dataItemCount); if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) $root.google.cloud.aiplatform.v1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.description != null && Object.hasOwnProperty.call(message, "description")) @@ -25002,6 +25030,10 @@ message.metadata = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; } + case 10: { + message.dataItemCount = reader.int64(); + break; + } case 4: { message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; @@ -25103,6 +25135,9 @@ if (error) return "metadata." + error; } + if (message.dataItemCount != null && message.hasOwnProperty("dataItemCount")) + if (!$util.isInteger(message.dataItemCount) && !(message.dataItemCount && $util.isInteger(message.dataItemCount.low) && $util.isInteger(message.dataItemCount.high))) + return "dataItemCount: integer|Long expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) @@ -25169,6 +25204,15 @@ throw TypeError(".google.cloud.aiplatform.v1.Dataset.metadata: object expected"); message.metadata = $root.google.protobuf.Value.fromObject(object.metadata); } + if (object.dataItemCount != null) + if ($util.Long) + (message.dataItemCount = $util.Long.fromValue(object.dataItemCount)).unsigned = false; + else if (typeof object.dataItemCount === "string") + message.dataItemCount = parseInt(object.dataItemCount, 10); + else if (typeof object.dataItemCount === "number") + message.dataItemCount = object.dataItemCount; + else if (typeof object.dataItemCount === "object") + message.dataItemCount = new $util.LongBits(object.dataItemCount.low >>> 0, object.dataItemCount.high >>> 0).toNumber(); if (object.createTime != null) { if (typeof object.createTime !== "object") throw TypeError(".google.cloud.aiplatform.v1.Dataset.createTime: object expected"); @@ -25233,6 +25277,11 @@ object.updateTime = null; object.etag = ""; object.metadata = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataItemCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataItemCount = options.longs === String ? "0" : 0; object.encryptionSpec = null; object.description = ""; object.metadataArtifact = ""; @@ -25262,6 +25311,11 @@ for (var j = 0; j < message.savedQueries.length; ++j) object.savedQueries[j] = $root.google.cloud.aiplatform.v1.SavedQuery.toObject(message.savedQueries[j], options); } + if (message.dataItemCount != null && message.hasOwnProperty("dataItemCount")) + if (typeof message.dataItemCount === "number") + object.dataItemCount = options.longs === String ? String(message.dataItemCount) : message.dataItemCount; + else + object.dataItemCount = options.longs === String ? $util.Long.prototype.toString.call(message.dataItemCount) : options.longs === Number ? new $util.LongBits(message.dataItemCount.low >>> 0, message.dataItemCount.high >>> 0).toNumber() : message.dataItemCount; if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) object.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.toObject(message.encryptionSpec, options); if (message.description != null && message.hasOwnProperty("description")) @@ -27001,6 +27055,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1.DatasetService|deleteSavedQuery}. + * @memberof google.cloud.aiplatform.v1.DatasetService + * @typedef DeleteSavedQueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteSavedQuery. + * @function deleteSavedQuery + * @memberof google.cloud.aiplatform.v1.DatasetService + * @instance + * @param {google.cloud.aiplatform.v1.IDeleteSavedQueryRequest} request DeleteSavedQueryRequest message or plain object + * @param {google.cloud.aiplatform.v1.DatasetService.DeleteSavedQueryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DatasetService.prototype.deleteSavedQuery = function deleteSavedQuery(request, callback) { + return this.rpcCall(deleteSavedQuery, $root.google.cloud.aiplatform.v1.DeleteSavedQueryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteSavedQuery" }); + + /** + * Calls DeleteSavedQuery. + * @function deleteSavedQuery + * @memberof google.cloud.aiplatform.v1.DatasetService + * @instance + * @param {google.cloud.aiplatform.v1.IDeleteSavedQueryRequest} request DeleteSavedQueryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.aiplatform.v1.DatasetService|getAnnotationSpec}. * @memberof google.cloud.aiplatform.v1.DatasetService @@ -32497,6 +32584,209 @@ return ListSavedQueriesResponse; })(); + v1.DeleteSavedQueryRequest = (function() { + + /** + * Properties of a DeleteSavedQueryRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface IDeleteSavedQueryRequest + * @property {string|null} [name] DeleteSavedQueryRequest name + */ + + /** + * Constructs a new DeleteSavedQueryRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a DeleteSavedQueryRequest. + * @implements IDeleteSavedQueryRequest + * @constructor + * @param {google.cloud.aiplatform.v1.IDeleteSavedQueryRequest=} [properties] Properties to set + */ + function DeleteSavedQueryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSavedQueryRequest name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @instance + */ + DeleteSavedQueryRequest.prototype.name = ""; + + /** + * Creates a new DeleteSavedQueryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @static + * @param {google.cloud.aiplatform.v1.IDeleteSavedQueryRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.DeleteSavedQueryRequest} DeleteSavedQueryRequest instance + */ + DeleteSavedQueryRequest.create = function create(properties) { + return new DeleteSavedQueryRequest(properties); + }; + + /** + * Encodes the specified DeleteSavedQueryRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteSavedQueryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @static + * @param {google.cloud.aiplatform.v1.IDeleteSavedQueryRequest} message DeleteSavedQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSavedQueryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteSavedQueryRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteSavedQueryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @static + * @param {google.cloud.aiplatform.v1.IDeleteSavedQueryRequest} message DeleteSavedQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSavedQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSavedQueryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.DeleteSavedQueryRequest} DeleteSavedQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSavedQueryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.DeleteSavedQueryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSavedQueryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.DeleteSavedQueryRequest} DeleteSavedQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSavedQueryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSavedQueryRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSavedQueryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteSavedQueryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.DeleteSavedQueryRequest} DeleteSavedQueryRequest + */ + DeleteSavedQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.DeleteSavedQueryRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.DeleteSavedQueryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSavedQueryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @static + * @param {google.cloud.aiplatform.v1.DeleteSavedQueryRequest} message DeleteSavedQueryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSavedQueryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteSavedQueryRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSavedQueryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSavedQueryRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.DeleteSavedQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSavedQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.DeleteSavedQueryRequest"; + }; + + return DeleteSavedQueryRequest; + })(); + v1.GetAnnotationSpecRequest = (function() { /** @@ -64688,6 +64978,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -64824,6 +65115,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } if (object.createTime != null) { if (typeof object.createTime !== "object") @@ -95028,6 +95323,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.scheduleState != null && message.hasOwnProperty("scheduleState")) @@ -95207,6 +95503,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } switch (object.scheduleState) { default: @@ -100506,6 +100806,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -100629,6 +100930,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } if (object.createTime != null) { if (typeof object.createTime !== "object") @@ -133732,181 +134037,6 @@ return ExportModelRequest; })(); - v1.UpdateExplanationDatasetResponse = (function() { - - /** - * Properties of an UpdateExplanationDatasetResponse. - * @memberof google.cloud.aiplatform.v1 - * @interface IUpdateExplanationDatasetResponse - */ - - /** - * Constructs a new UpdateExplanationDatasetResponse. - * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents an UpdateExplanationDatasetResponse. - * @implements IUpdateExplanationDatasetResponse - * @constructor - * @param {google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse=} [properties] Properties to set - */ - function UpdateExplanationDatasetResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new UpdateExplanationDatasetResponse instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse - * @static - * @param {google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse} UpdateExplanationDatasetResponse instance - */ - UpdateExplanationDatasetResponse.create = function create(properties) { - return new UpdateExplanationDatasetResponse(properties); - }; - - /** - * Encodes the specified UpdateExplanationDatasetResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse - * @static - * @param {google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse} message UpdateExplanationDatasetResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateExplanationDatasetResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified UpdateExplanationDatasetResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse - * @static - * @param {google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse} message UpdateExplanationDatasetResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateExplanationDatasetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateExplanationDatasetResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse} UpdateExplanationDatasetResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateExplanationDatasetResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateExplanationDatasetResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse} UpdateExplanationDatasetResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateExplanationDatasetResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateExplanationDatasetResponse message. - * @function verify - * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateExplanationDatasetResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an UpdateExplanationDatasetResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse} UpdateExplanationDatasetResponse - */ - UpdateExplanationDatasetResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse) - return object; - return new $root.google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse(); - }; - - /** - * Creates a plain object from an UpdateExplanationDatasetResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse - * @static - * @param {google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse} message UpdateExplanationDatasetResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateExplanationDatasetResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this UpdateExplanationDatasetResponse to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse - * @instance - * @returns {Object.} JSON object - */ - UpdateExplanationDatasetResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateExplanationDatasetResponse - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateExplanationDatasetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse"; - }; - - return UpdateExplanationDatasetResponse; - })(); - v1.ExportModelOperationMetadata = (function() { /** @@ -134371,6 +134501,181 @@ return ExportModelOperationMetadata; })(); + v1.UpdateExplanationDatasetResponse = (function() { + + /** + * Properties of an UpdateExplanationDatasetResponse. + * @memberof google.cloud.aiplatform.v1 + * @interface IUpdateExplanationDatasetResponse + */ + + /** + * Constructs a new UpdateExplanationDatasetResponse. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an UpdateExplanationDatasetResponse. + * @implements IUpdateExplanationDatasetResponse + * @constructor + * @param {google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse=} [properties] Properties to set + */ + function UpdateExplanationDatasetResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new UpdateExplanationDatasetResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse + * @static + * @param {google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse} UpdateExplanationDatasetResponse instance + */ + UpdateExplanationDatasetResponse.create = function create(properties) { + return new UpdateExplanationDatasetResponse(properties); + }; + + /** + * Encodes the specified UpdateExplanationDatasetResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse + * @static + * @param {google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse} message UpdateExplanationDatasetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExplanationDatasetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified UpdateExplanationDatasetResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse + * @static + * @param {google.cloud.aiplatform.v1.IUpdateExplanationDatasetResponse} message UpdateExplanationDatasetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExplanationDatasetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateExplanationDatasetResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse} UpdateExplanationDatasetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExplanationDatasetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateExplanationDatasetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse} UpdateExplanationDatasetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExplanationDatasetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateExplanationDatasetResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateExplanationDatasetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an UpdateExplanationDatasetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse} UpdateExplanationDatasetResponse + */ + UpdateExplanationDatasetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse) + return object; + return new $root.google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse(); + }; + + /** + * Creates a plain object from an UpdateExplanationDatasetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse + * @static + * @param {google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse} message UpdateExplanationDatasetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateExplanationDatasetResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this UpdateExplanationDatasetResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateExplanationDatasetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateExplanationDatasetResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateExplanationDatasetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse"; + }; + + return UpdateExplanationDatasetResponse; + })(); + v1.ExportModelResponse = (function() { /** @@ -137998,6 +138303,7 @@ * @property {google.cloud.aiplatform.v1.IEncryptionSpec|null} [encryptionSpec] PipelineJob encryptionSpec * @property {string|null} [serviceAccount] PipelineJob serviceAccount * @property {string|null} [network] PipelineJob network + * @property {Array.|null} [reservedIpRanges] PipelineJob reservedIpRanges * @property {string|null} [templateUri] PipelineJob templateUri * @property {google.cloud.aiplatform.v1.IPipelineTemplateMetadata|null} [templateMetadata] PipelineJob templateMetadata */ @@ -138012,6 +138318,7 @@ */ function PipelineJob(properties) { this.labels = {}; + this.reservedIpRanges = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -138138,6 +138445,14 @@ */ PipelineJob.prototype.network = ""; + /** + * PipelineJob reservedIpRanges. + * @member {Array.} reservedIpRanges + * @memberof google.cloud.aiplatform.v1.PipelineJob + * @instance + */ + PipelineJob.prototype.reservedIpRanges = $util.emptyArray; + /** * PipelineJob templateUri. * @member {string} templateUri @@ -138213,6 +138528,9 @@ writer.uint32(/* id 19, wireType 2 =*/154).string(message.templateUri); if (message.templateMetadata != null && Object.hasOwnProperty.call(message, "templateMetadata")) $root.google.cloud.aiplatform.v1.PipelineTemplateMetadata.encode(message.templateMetadata, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.reservedIpRanges != null && message.reservedIpRanges.length) + for (var i = 0; i < message.reservedIpRanges.length; ++i) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.reservedIpRanges[i]); return writer; }; @@ -138326,6 +138644,12 @@ message.network = reader.string(); break; } + case 25: { + if (!(message.reservedIpRanges && message.reservedIpRanges.length)) + message.reservedIpRanges = []; + message.reservedIpRanges.push(reader.string()); + break; + } case 19: { message.templateUri = reader.string(); break; @@ -138449,6 +138773,13 @@ if (message.network != null && message.hasOwnProperty("network")) if (!$util.isString(message.network)) return "network: string expected"; + if (message.reservedIpRanges != null && message.hasOwnProperty("reservedIpRanges")) { + if (!Array.isArray(message.reservedIpRanges)) + return "reservedIpRanges: array expected"; + for (var i = 0; i < message.reservedIpRanges.length; ++i) + if (!$util.isString(message.reservedIpRanges[i])) + return "reservedIpRanges: string[] expected"; + } if (message.templateUri != null && message.hasOwnProperty("templateUri")) if (!$util.isString(message.templateUri)) return "templateUri: string expected"; @@ -138576,6 +138907,13 @@ message.serviceAccount = String(object.serviceAccount); if (object.network != null) message.network = String(object.network); + if (object.reservedIpRanges) { + if (!Array.isArray(object.reservedIpRanges)) + throw TypeError(".google.cloud.aiplatform.v1.PipelineJob.reservedIpRanges: array expected"); + message.reservedIpRanges = []; + for (var i = 0; i < object.reservedIpRanges.length; ++i) + message.reservedIpRanges[i] = String(object.reservedIpRanges[i]); + } if (object.templateUri != null) message.templateUri = String(object.templateUri); if (object.templateMetadata != null) { @@ -138599,6 +138937,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.reservedIpRanges = []; if (options.objects || options.defaults) object.labels = {}; if (options.defaults) { @@ -138657,6 +138997,11 @@ object.templateUri = message.templateUri; if (message.templateMetadata != null && message.hasOwnProperty("templateMetadata")) object.templateMetadata = $root.google.cloud.aiplatform.v1.PipelineTemplateMetadata.toObject(message.templateMetadata, options); + if (message.reservedIpRanges && message.reservedIpRanges.length) { + object.reservedIpRanges = []; + for (var j = 0; j < message.reservedIpRanges.length; ++j) + object.reservedIpRanges[j] = message.reservedIpRanges[j]; + } return object; }; @@ -171356,39 +171701,6 @@ * @variation 2 */ - /** - * Callback as used by {@link google.cloud.aiplatform.v1.TensorboardService|readTensorboardUsage}. - * @memberof google.cloud.aiplatform.v1.TensorboardService - * @typedef ReadTensorboardUsageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} [response] ReadTensorboardUsageResponse - */ - - /** - * Calls ReadTensorboardUsage. - * @function readTensorboardUsage - * @memberof google.cloud.aiplatform.v1.TensorboardService - * @instance - * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest} request ReadTensorboardUsageRequest message or plain object - * @param {google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsageCallback} callback Node-style callback called with the error, if any, and ReadTensorboardUsageResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TensorboardService.prototype.readTensorboardUsage = function readTensorboardUsage(request, callback) { - return this.rpcCall(readTensorboardUsage, $root.google.cloud.aiplatform.v1.ReadTensorboardUsageRequest, $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse, request, callback); - }, "name", { value: "ReadTensorboardUsage" }); - - /** - * Calls ReadTensorboardUsage. - * @function readTensorboardUsage - * @memberof google.cloud.aiplatform.v1.TensorboardService - * @instance - * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest} request ReadTensorboardUsageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - /** * Callback as used by {@link google.cloud.aiplatform.v1.TensorboardService|updateTensorboard}. * @memberof google.cloud.aiplatform.v1.TensorboardService @@ -171488,6 +171800,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1.TensorboardService|readTensorboardUsage}. + * @memberof google.cloud.aiplatform.v1.TensorboardService + * @typedef ReadTensorboardUsageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} [response] ReadTensorboardUsageResponse + */ + + /** + * Calls ReadTensorboardUsage. + * @function readTensorboardUsage + * @memberof google.cloud.aiplatform.v1.TensorboardService + * @instance + * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest} request ReadTensorboardUsageRequest message or plain object + * @param {google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsageCallback} callback Node-style callback called with the error, if any, and ReadTensorboardUsageResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TensorboardService.prototype.readTensorboardUsage = function readTensorboardUsage(request, callback) { + return this.rpcCall(readTensorboardUsage, $root.google.cloud.aiplatform.v1.ReadTensorboardUsageRequest, $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse, request, callback); + }, "name", { value: "ReadTensorboardUsage" }); + + /** + * Calls ReadTensorboardUsage. + * @function readTensorboardUsage + * @memberof google.cloud.aiplatform.v1.TensorboardService + * @instance + * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest} request ReadTensorboardUsageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.aiplatform.v1.TensorboardService|createTensorboardExperiment}. * @memberof google.cloud.aiplatform.v1.TensorboardService @@ -172685,919 +173030,6 @@ return GetTensorboardRequest; })(); - v1.ReadTensorboardUsageRequest = (function() { - - /** - * Properties of a ReadTensorboardUsageRequest. - * @memberof google.cloud.aiplatform.v1 - * @interface IReadTensorboardUsageRequest - * @property {string|null} [tensorboard] ReadTensorboardUsageRequest tensorboard - */ - - /** - * Constructs a new ReadTensorboardUsageRequest. - * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a ReadTensorboardUsageRequest. - * @implements IReadTensorboardUsageRequest - * @constructor - * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest=} [properties] Properties to set - */ - function ReadTensorboardUsageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReadTensorboardUsageRequest tensorboard. - * @member {string} tensorboard - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @instance - */ - ReadTensorboardUsageRequest.prototype.tensorboard = ""; - - /** - * Creates a new ReadTensorboardUsageRequest instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @static - * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageRequest} ReadTensorboardUsageRequest instance - */ - ReadTensorboardUsageRequest.create = function create(properties) { - return new ReadTensorboardUsageRequest(properties); - }; - - /** - * Encodes the specified ReadTensorboardUsageRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @static - * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest} message ReadTensorboardUsageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadTensorboardUsageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tensorboard != null && Object.hasOwnProperty.call(message, "tensorboard")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tensorboard); - return writer; - }; - - /** - * Encodes the specified ReadTensorboardUsageRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @static - * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest} message ReadTensorboardUsageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadTensorboardUsageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReadTensorboardUsageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageRequest} ReadTensorboardUsageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadTensorboardUsageRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tensorboard = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReadTensorboardUsageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageRequest} ReadTensorboardUsageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadTensorboardUsageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReadTensorboardUsageRequest message. - * @function verify - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReadTensorboardUsageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) - if (!$util.isString(message.tensorboard)) - return "tensorboard: string expected"; - return null; - }; - - /** - * Creates a ReadTensorboardUsageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageRequest} ReadTensorboardUsageRequest - */ - ReadTensorboardUsageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ReadTensorboardUsageRequest) - return object; - var message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageRequest(); - if (object.tensorboard != null) - message.tensorboard = String(object.tensorboard); - return message; - }; - - /** - * Creates a plain object from a ReadTensorboardUsageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @static - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageRequest} message ReadTensorboardUsageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReadTensorboardUsageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tensorboard = ""; - if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) - object.tensorboard = message.tensorboard; - return object; - }; - - /** - * Converts this ReadTensorboardUsageRequest to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @instance - * @returns {Object.} JSON object - */ - ReadTensorboardUsageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReadTensorboardUsageRequest - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReadTensorboardUsageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReadTensorboardUsageRequest"; - }; - - return ReadTensorboardUsageRequest; - })(); - - v1.ReadTensorboardUsageResponse = (function() { - - /** - * Properties of a ReadTensorboardUsageResponse. - * @memberof google.cloud.aiplatform.v1 - * @interface IReadTensorboardUsageResponse - * @property {Object.|null} [monthlyUsageData] ReadTensorboardUsageResponse monthlyUsageData - */ - - /** - * Constructs a new ReadTensorboardUsageResponse. - * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a ReadTensorboardUsageResponse. - * @implements IReadTensorboardUsageResponse - * @constructor - * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageResponse=} [properties] Properties to set - */ - function ReadTensorboardUsageResponse(properties) { - this.monthlyUsageData = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReadTensorboardUsageResponse monthlyUsageData. - * @member {Object.} monthlyUsageData - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @instance - */ - ReadTensorboardUsageResponse.prototype.monthlyUsageData = $util.emptyObject; - - /** - * Creates a new ReadTensorboardUsageResponse instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @static - * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageResponse=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} ReadTensorboardUsageResponse instance - */ - ReadTensorboardUsageResponse.create = function create(properties) { - return new ReadTensorboardUsageResponse(properties); - }; - - /** - * Encodes the specified ReadTensorboardUsageResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @static - * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageResponse} message ReadTensorboardUsageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadTensorboardUsageResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.monthlyUsageData != null && Object.hasOwnProperty.call(message, "monthlyUsageData")) - for (var keys = Object.keys(message.monthlyUsageData), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.encode(message.monthlyUsageData[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ReadTensorboardUsageResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @static - * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageResponse} message ReadTensorboardUsageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadTensorboardUsageResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReadTensorboardUsageResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} ReadTensorboardUsageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadTensorboardUsageResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.monthlyUsageData === $util.emptyObject) - message.monthlyUsageData = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.monthlyUsageData[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReadTensorboardUsageResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} ReadTensorboardUsageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadTensorboardUsageResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReadTensorboardUsageResponse message. - * @function verify - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReadTensorboardUsageResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.monthlyUsageData != null && message.hasOwnProperty("monthlyUsageData")) { - if (!$util.isObject(message.monthlyUsageData)) - return "monthlyUsageData: object expected"; - var key = Object.keys(message.monthlyUsageData); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.verify(message.monthlyUsageData[key[i]]); - if (error) - return "monthlyUsageData." + error; - } - } - return null; - }; - - /** - * Creates a ReadTensorboardUsageResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} ReadTensorboardUsageResponse - */ - ReadTensorboardUsageResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse) - return object; - var message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse(); - if (object.monthlyUsageData) { - if (typeof object.monthlyUsageData !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.monthlyUsageData: object expected"); - message.monthlyUsageData = {}; - for (var keys = Object.keys(object.monthlyUsageData), i = 0; i < keys.length; ++i) { - if (typeof object.monthlyUsageData[keys[i]] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.monthlyUsageData: object expected"); - message.monthlyUsageData[keys[i]] = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.fromObject(object.monthlyUsageData[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a ReadTensorboardUsageResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @static - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} message ReadTensorboardUsageResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReadTensorboardUsageResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.monthlyUsageData = {}; - var keys2; - if (message.monthlyUsageData && (keys2 = Object.keys(message.monthlyUsageData)).length) { - object.monthlyUsageData = {}; - for (var j = 0; j < keys2.length; ++j) - object.monthlyUsageData[keys2[j]] = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.toObject(message.monthlyUsageData[keys2[j]], options); - } - return object; - }; - - /** - * Converts this ReadTensorboardUsageResponse to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @instance - * @returns {Object.} JSON object - */ - ReadTensorboardUsageResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReadTensorboardUsageResponse - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReadTensorboardUsageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReadTensorboardUsageResponse"; - }; - - ReadTensorboardUsageResponse.PerUserUsageData = (function() { - - /** - * Properties of a PerUserUsageData. - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @interface IPerUserUsageData - * @property {string|null} [username] PerUserUsageData username - * @property {number|Long|null} [viewCount] PerUserUsageData viewCount - */ - - /** - * Constructs a new PerUserUsageData. - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @classdesc Represents a PerUserUsageData. - * @implements IPerUserUsageData - * @constructor - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData=} [properties] Properties to set - */ - function PerUserUsageData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PerUserUsageData username. - * @member {string} username - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @instance - */ - PerUserUsageData.prototype.username = ""; - - /** - * PerUserUsageData viewCount. - * @member {number|Long} viewCount - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @instance - */ - PerUserUsageData.prototype.viewCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new PerUserUsageData instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @static - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData} PerUserUsageData instance - */ - PerUserUsageData.create = function create(properties) { - return new PerUserUsageData(properties); - }; - - /** - * Encodes the specified PerUserUsageData message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @static - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData} message PerUserUsageData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PerUserUsageData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); - if (message.viewCount != null && Object.hasOwnProperty.call(message, "viewCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.viewCount); - return writer; - }; - - /** - * Encodes the specified PerUserUsageData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @static - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData} message PerUserUsageData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PerUserUsageData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PerUserUsageData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData} PerUserUsageData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PerUserUsageData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.username = reader.string(); - break; - } - case 2: { - message.viewCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PerUserUsageData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData} PerUserUsageData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PerUserUsageData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PerUserUsageData message. - * @function verify - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PerUserUsageData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.viewCount != null && message.hasOwnProperty("viewCount")) - if (!$util.isInteger(message.viewCount) && !(message.viewCount && $util.isInteger(message.viewCount.low) && $util.isInteger(message.viewCount.high))) - return "viewCount: integer|Long expected"; - return null; - }; - - /** - * Creates a PerUserUsageData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData} PerUserUsageData - */ - PerUserUsageData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData) - return object; - var message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData(); - if (object.username != null) - message.username = String(object.username); - if (object.viewCount != null) - if ($util.Long) - (message.viewCount = $util.Long.fromValue(object.viewCount)).unsigned = false; - else if (typeof object.viewCount === "string") - message.viewCount = parseInt(object.viewCount, 10); - else if (typeof object.viewCount === "number") - message.viewCount = object.viewCount; - else if (typeof object.viewCount === "object") - message.viewCount = new $util.LongBits(object.viewCount.low >>> 0, object.viewCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a PerUserUsageData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @static - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData} message PerUserUsageData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PerUserUsageData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.username = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.viewCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.viewCount = options.longs === String ? "0" : 0; - } - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.viewCount != null && message.hasOwnProperty("viewCount")) - if (typeof message.viewCount === "number") - object.viewCount = options.longs === String ? String(message.viewCount) : message.viewCount; - else - object.viewCount = options.longs === String ? $util.Long.prototype.toString.call(message.viewCount) : options.longs === Number ? new $util.LongBits(message.viewCount.low >>> 0, message.viewCount.high >>> 0).toNumber() : message.viewCount; - return object; - }; - - /** - * Converts this PerUserUsageData to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @instance - * @returns {Object.} JSON object - */ - PerUserUsageData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PerUserUsageData - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PerUserUsageData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData"; - }; - - return PerUserUsageData; - })(); - - ReadTensorboardUsageResponse.PerMonthUsageData = (function() { - - /** - * Properties of a PerMonthUsageData. - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @interface IPerMonthUsageData - * @property {Array.|null} [userUsageData] PerMonthUsageData userUsageData - */ - - /** - * Constructs a new PerMonthUsageData. - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse - * @classdesc Represents a PerMonthUsageData. - * @implements IPerMonthUsageData - * @constructor - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData=} [properties] Properties to set - */ - function PerMonthUsageData(properties) { - this.userUsageData = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PerMonthUsageData userUsageData. - * @member {Array.} userUsageData - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @instance - */ - PerMonthUsageData.prototype.userUsageData = $util.emptyArray; - - /** - * Creates a new PerMonthUsageData instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @static - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData} PerMonthUsageData instance - */ - PerMonthUsageData.create = function create(properties) { - return new PerMonthUsageData(properties); - }; - - /** - * Encodes the specified PerMonthUsageData message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @static - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData} message PerMonthUsageData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PerMonthUsageData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userUsageData != null && message.userUsageData.length) - for (var i = 0; i < message.userUsageData.length; ++i) - $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.encode(message.userUsageData[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PerMonthUsageData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @static - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData} message PerMonthUsageData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PerMonthUsageData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PerMonthUsageData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData} PerMonthUsageData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PerMonthUsageData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.userUsageData && message.userUsageData.length)) - message.userUsageData = []; - message.userUsageData.push($root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PerMonthUsageData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData} PerMonthUsageData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PerMonthUsageData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PerMonthUsageData message. - * @function verify - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PerMonthUsageData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userUsageData != null && message.hasOwnProperty("userUsageData")) { - if (!Array.isArray(message.userUsageData)) - return "userUsageData: array expected"; - for (var i = 0; i < message.userUsageData.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.verify(message.userUsageData[i]); - if (error) - return "userUsageData." + error; - } - } - return null; - }; - - /** - * Creates a PerMonthUsageData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData} PerMonthUsageData - */ - PerMonthUsageData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData) - return object; - var message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData(); - if (object.userUsageData) { - if (!Array.isArray(object.userUsageData)) - throw TypeError(".google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.userUsageData: array expected"); - message.userUsageData = []; - for (var i = 0; i < object.userUsageData.length; ++i) { - if (typeof object.userUsageData[i] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.userUsageData: object expected"); - message.userUsageData[i] = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.fromObject(object.userUsageData[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PerMonthUsageData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @static - * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData} message PerMonthUsageData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PerMonthUsageData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userUsageData = []; - if (message.userUsageData && message.userUsageData.length) { - object.userUsageData = []; - for (var j = 0; j < message.userUsageData.length; ++j) - object.userUsageData[j] = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.toObject(message.userUsageData[j], options); - } - return object; - }; - - /** - * Converts this PerMonthUsageData to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @instance - * @returns {Object.} JSON object - */ - PerMonthUsageData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PerMonthUsageData - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PerMonthUsageData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData"; - }; - - return PerMonthUsageData; - })(); - - return ReadTensorboardUsageResponse; - })(); - v1.ListTensorboardsRequest = (function() { /** @@ -174610,26 +174042,24 @@ return DeleteTensorboardRequest; })(); - v1.CreateTensorboardExperimentRequest = (function() { + v1.ReadTensorboardUsageRequest = (function() { /** - * Properties of a CreateTensorboardExperimentRequest. + * Properties of a ReadTensorboardUsageRequest. * @memberof google.cloud.aiplatform.v1 - * @interface ICreateTensorboardExperimentRequest - * @property {string|null} [parent] CreateTensorboardExperimentRequest parent - * @property {google.cloud.aiplatform.v1.ITensorboardExperiment|null} [tensorboardExperiment] CreateTensorboardExperimentRequest tensorboardExperiment - * @property {string|null} [tensorboardExperimentId] CreateTensorboardExperimentRequest tensorboardExperimentId + * @interface IReadTensorboardUsageRequest + * @property {string|null} [tensorboard] ReadTensorboardUsageRequest tensorboard */ /** - * Constructs a new CreateTensorboardExperimentRequest. + * Constructs a new ReadTensorboardUsageRequest. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a CreateTensorboardExperimentRequest. - * @implements ICreateTensorboardExperimentRequest + * @classdesc Represents a ReadTensorboardUsageRequest. + * @implements IReadTensorboardUsageRequest * @constructor - * @param {google.cloud.aiplatform.v1.ICreateTensorboardExperimentRequest=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest=} [properties] Properties to set */ - function CreateTensorboardExperimentRequest(properties) { + function ReadTensorboardUsageRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -174637,103 +174067,75 @@ } /** - * CreateTensorboardExperimentRequest parent. - * @member {string} parent - * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest - * @instance - */ - CreateTensorboardExperimentRequest.prototype.parent = ""; - - /** - * CreateTensorboardExperimentRequest tensorboardExperiment. - * @member {google.cloud.aiplatform.v1.ITensorboardExperiment|null|undefined} tensorboardExperiment - * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest - * @instance - */ - CreateTensorboardExperimentRequest.prototype.tensorboardExperiment = null; - - /** - * CreateTensorboardExperimentRequest tensorboardExperimentId. - * @member {string} tensorboardExperimentId - * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * ReadTensorboardUsageRequest tensorboard. + * @member {string} tensorboard + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest * @instance */ - CreateTensorboardExperimentRequest.prototype.tensorboardExperimentId = ""; + ReadTensorboardUsageRequest.prototype.tensorboard = ""; /** - * Creates a new CreateTensorboardExperimentRequest instance using the specified properties. + * Creates a new ReadTensorboardUsageRequest instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest * @static - * @param {google.cloud.aiplatform.v1.ICreateTensorboardExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest} CreateTensorboardExperimentRequest instance + * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageRequest} ReadTensorboardUsageRequest instance */ - CreateTensorboardExperimentRequest.create = function create(properties) { - return new CreateTensorboardExperimentRequest(properties); + ReadTensorboardUsageRequest.create = function create(properties) { + return new ReadTensorboardUsageRequest(properties); }; /** - * Encodes the specified CreateTensorboardExperimentRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest.verify|verify} messages. + * Encodes the specified ReadTensorboardUsageRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest * @static - * @param {google.cloud.aiplatform.v1.ICreateTensorboardExperimentRequest} message CreateTensorboardExperimentRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest} message ReadTensorboardUsageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTensorboardExperimentRequest.encode = function encode(message, writer) { + ReadTensorboardUsageRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.tensorboardExperiment != null && Object.hasOwnProperty.call(message, "tensorboardExperiment")) - $root.google.cloud.aiplatform.v1.TensorboardExperiment.encode(message.tensorboardExperiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tensorboardExperimentId != null && Object.hasOwnProperty.call(message, "tensorboardExperimentId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tensorboardExperimentId); + if (message.tensorboard != null && Object.hasOwnProperty.call(message, "tensorboard")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tensorboard); return writer; }; /** - * Encodes the specified CreateTensorboardExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest.verify|verify} messages. + * Encodes the specified ReadTensorboardUsageRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest * @static - * @param {google.cloud.aiplatform.v1.ICreateTensorboardExperimentRequest} message CreateTensorboardExperimentRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageRequest} message ReadTensorboardUsageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTensorboardExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ReadTensorboardUsageRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTensorboardExperimentRequest message from the specified reader or buffer. + * Decodes a ReadTensorboardUsageRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest} CreateTensorboardExperimentRequest + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageRequest} ReadTensorboardUsageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTensorboardExperimentRequest.decode = function decode(reader, length) { + ReadTensorboardUsageRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.tensorboardExperiment = $root.google.cloud.aiplatform.v1.TensorboardExperiment.decode(reader, reader.uint32()); - break; - } - case 3: { - message.tensorboardExperimentId = reader.string(); + message.tensorboard = reader.string(); break; } default: @@ -174745,25 +174147,968 @@ }; /** - * Decodes a CreateTensorboardExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a ReadTensorboardUsageRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest} CreateTensorboardExperimentRequest + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageRequest} ReadTensorboardUsageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTensorboardExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + ReadTensorboardUsageRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTensorboardExperimentRequest message. + * Verifies a ReadTensorboardUsageRequest message. * @function verify - * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadTensorboardUsageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) + if (!$util.isString(message.tensorboard)) + return "tensorboard: string expected"; + return null; + }; + + /** + * Creates a ReadTensorboardUsageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageRequest} ReadTensorboardUsageRequest + */ + ReadTensorboardUsageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReadTensorboardUsageRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageRequest(); + if (object.tensorboard != null) + message.tensorboard = String(object.tensorboard); + return message; + }; + + /** + * Creates a plain object from a ReadTensorboardUsageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest + * @static + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageRequest} message ReadTensorboardUsageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadTensorboardUsageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tensorboard = ""; + if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) + object.tensorboard = message.tensorboard; + return object; + }; + + /** + * Converts this ReadTensorboardUsageRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest + * @instance + * @returns {Object.} JSON object + */ + ReadTensorboardUsageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadTensorboardUsageRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadTensorboardUsageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReadTensorboardUsageRequest"; + }; + + return ReadTensorboardUsageRequest; + })(); + + v1.ReadTensorboardUsageResponse = (function() { + + /** + * Properties of a ReadTensorboardUsageResponse. + * @memberof google.cloud.aiplatform.v1 + * @interface IReadTensorboardUsageResponse + * @property {Object.|null} [monthlyUsageData] ReadTensorboardUsageResponse monthlyUsageData + */ + + /** + * Constructs a new ReadTensorboardUsageResponse. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a ReadTensorboardUsageResponse. + * @implements IReadTensorboardUsageResponse + * @constructor + * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageResponse=} [properties] Properties to set + */ + function ReadTensorboardUsageResponse(properties) { + this.monthlyUsageData = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadTensorboardUsageResponse monthlyUsageData. + * @member {Object.} monthlyUsageData + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @instance + */ + ReadTensorboardUsageResponse.prototype.monthlyUsageData = $util.emptyObject; + + /** + * Creates a new ReadTensorboardUsageResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @static + * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} ReadTensorboardUsageResponse instance + */ + ReadTensorboardUsageResponse.create = function create(properties) { + return new ReadTensorboardUsageResponse(properties); + }; + + /** + * Encodes the specified ReadTensorboardUsageResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @static + * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageResponse} message ReadTensorboardUsageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadTensorboardUsageResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.monthlyUsageData != null && Object.hasOwnProperty.call(message, "monthlyUsageData")) + for (var keys = Object.keys(message.monthlyUsageData), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.encode(message.monthlyUsageData[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ReadTensorboardUsageResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @static + * @param {google.cloud.aiplatform.v1.IReadTensorboardUsageResponse} message ReadTensorboardUsageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadTensorboardUsageResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadTensorboardUsageResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} ReadTensorboardUsageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadTensorboardUsageResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.monthlyUsageData === $util.emptyObject) + message.monthlyUsageData = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.monthlyUsageData[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadTensorboardUsageResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} ReadTensorboardUsageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadTensorboardUsageResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadTensorboardUsageResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadTensorboardUsageResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.monthlyUsageData != null && message.hasOwnProperty("monthlyUsageData")) { + if (!$util.isObject(message.monthlyUsageData)) + return "monthlyUsageData: object expected"; + var key = Object.keys(message.monthlyUsageData); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.verify(message.monthlyUsageData[key[i]]); + if (error) + return "monthlyUsageData." + error; + } + } + return null; + }; + + /** + * Creates a ReadTensorboardUsageResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} ReadTensorboardUsageResponse + */ + ReadTensorboardUsageResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse(); + if (object.monthlyUsageData) { + if (typeof object.monthlyUsageData !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.monthlyUsageData: object expected"); + message.monthlyUsageData = {}; + for (var keys = Object.keys(object.monthlyUsageData), i = 0; i < keys.length; ++i) { + if (typeof object.monthlyUsageData[keys[i]] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.monthlyUsageData: object expected"); + message.monthlyUsageData[keys[i]] = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.fromObject(object.monthlyUsageData[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReadTensorboardUsageResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @static + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse} message ReadTensorboardUsageResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadTensorboardUsageResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.monthlyUsageData = {}; + var keys2; + if (message.monthlyUsageData && (keys2 = Object.keys(message.monthlyUsageData)).length) { + object.monthlyUsageData = {}; + for (var j = 0; j < keys2.length; ++j) + object.monthlyUsageData[keys2[j]] = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.toObject(message.monthlyUsageData[keys2[j]], options); + } + return object; + }; + + /** + * Converts this ReadTensorboardUsageResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @instance + * @returns {Object.} JSON object + */ + ReadTensorboardUsageResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadTensorboardUsageResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadTensorboardUsageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReadTensorboardUsageResponse"; + }; + + ReadTensorboardUsageResponse.PerUserUsageData = (function() { + + /** + * Properties of a PerUserUsageData. + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @interface IPerUserUsageData + * @property {string|null} [username] PerUserUsageData username + * @property {number|Long|null} [viewCount] PerUserUsageData viewCount + */ + + /** + * Constructs a new PerUserUsageData. + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @classdesc Represents a PerUserUsageData. + * @implements IPerUserUsageData + * @constructor + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData=} [properties] Properties to set + */ + function PerUserUsageData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PerUserUsageData username. + * @member {string} username + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @instance + */ + PerUserUsageData.prototype.username = ""; + + /** + * PerUserUsageData viewCount. + * @member {number|Long} viewCount + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @instance + */ + PerUserUsageData.prototype.viewCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PerUserUsageData instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @static + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData} PerUserUsageData instance + */ + PerUserUsageData.create = function create(properties) { + return new PerUserUsageData(properties); + }; + + /** + * Encodes the specified PerUserUsageData message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @static + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData} message PerUserUsageData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PerUserUsageData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); + if (message.viewCount != null && Object.hasOwnProperty.call(message, "viewCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.viewCount); + return writer; + }; + + /** + * Encodes the specified PerUserUsageData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @static + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerUserUsageData} message PerUserUsageData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PerUserUsageData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PerUserUsageData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData} PerUserUsageData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PerUserUsageData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.username = reader.string(); + break; + } + case 2: { + message.viewCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PerUserUsageData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData} PerUserUsageData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PerUserUsageData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PerUserUsageData message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PerUserUsageData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.viewCount != null && message.hasOwnProperty("viewCount")) + if (!$util.isInteger(message.viewCount) && !(message.viewCount && $util.isInteger(message.viewCount.low) && $util.isInteger(message.viewCount.high))) + return "viewCount: integer|Long expected"; + return null; + }; + + /** + * Creates a PerUserUsageData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData} PerUserUsageData + */ + PerUserUsageData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData(); + if (object.username != null) + message.username = String(object.username); + if (object.viewCount != null) + if ($util.Long) + (message.viewCount = $util.Long.fromValue(object.viewCount)).unsigned = false; + else if (typeof object.viewCount === "string") + message.viewCount = parseInt(object.viewCount, 10); + else if (typeof object.viewCount === "number") + message.viewCount = object.viewCount; + else if (typeof object.viewCount === "object") + message.viewCount = new $util.LongBits(object.viewCount.low >>> 0, object.viewCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a PerUserUsageData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @static + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData} message PerUserUsageData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PerUserUsageData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.username = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.viewCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.viewCount = options.longs === String ? "0" : 0; + } + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.viewCount != null && message.hasOwnProperty("viewCount")) + if (typeof message.viewCount === "number") + object.viewCount = options.longs === String ? String(message.viewCount) : message.viewCount; + else + object.viewCount = options.longs === String ? $util.Long.prototype.toString.call(message.viewCount) : options.longs === Number ? new $util.LongBits(message.viewCount.low >>> 0, message.viewCount.high >>> 0).toNumber() : message.viewCount; + return object; + }; + + /** + * Converts this PerUserUsageData to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @instance + * @returns {Object.} JSON object + */ + PerUserUsageData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PerUserUsageData + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PerUserUsageData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData"; + }; + + return PerUserUsageData; + })(); + + ReadTensorboardUsageResponse.PerMonthUsageData = (function() { + + /** + * Properties of a PerMonthUsageData. + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @interface IPerMonthUsageData + * @property {Array.|null} [userUsageData] PerMonthUsageData userUsageData + */ + + /** + * Constructs a new PerMonthUsageData. + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse + * @classdesc Represents a PerMonthUsageData. + * @implements IPerMonthUsageData + * @constructor + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData=} [properties] Properties to set + */ + function PerMonthUsageData(properties) { + this.userUsageData = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PerMonthUsageData userUsageData. + * @member {Array.} userUsageData + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @instance + */ + PerMonthUsageData.prototype.userUsageData = $util.emptyArray; + + /** + * Creates a new PerMonthUsageData instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @static + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData} PerMonthUsageData instance + */ + PerMonthUsageData.create = function create(properties) { + return new PerMonthUsageData(properties); + }; + + /** + * Encodes the specified PerMonthUsageData message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @static + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData} message PerMonthUsageData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PerMonthUsageData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userUsageData != null && message.userUsageData.length) + for (var i = 0; i < message.userUsageData.length; ++i) + $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.encode(message.userUsageData[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PerMonthUsageData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @static + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.IPerMonthUsageData} message PerMonthUsageData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PerMonthUsageData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PerMonthUsageData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData} PerMonthUsageData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PerMonthUsageData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userUsageData && message.userUsageData.length)) + message.userUsageData = []; + message.userUsageData.push($root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PerMonthUsageData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData} PerMonthUsageData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PerMonthUsageData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PerMonthUsageData message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PerMonthUsageData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userUsageData != null && message.hasOwnProperty("userUsageData")) { + if (!Array.isArray(message.userUsageData)) + return "userUsageData: array expected"; + for (var i = 0; i < message.userUsageData.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.verify(message.userUsageData[i]); + if (error) + return "userUsageData." + error; + } + } + return null; + }; + + /** + * Creates a PerMonthUsageData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData} PerMonthUsageData + */ + PerMonthUsageData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData(); + if (object.userUsageData) { + if (!Array.isArray(object.userUsageData)) + throw TypeError(".google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.userUsageData: array expected"); + message.userUsageData = []; + for (var i = 0; i < object.userUsageData.length; ++i) { + if (typeof object.userUsageData[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData.userUsageData: object expected"); + message.userUsageData[i] = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.fromObject(object.userUsageData[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PerMonthUsageData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @static + * @param {google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData} message PerMonthUsageData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PerMonthUsageData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userUsageData = []; + if (message.userUsageData && message.userUsageData.length) { + object.userUsageData = []; + for (var j = 0; j < message.userUsageData.length; ++j) + object.userUsageData[j] = $root.google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData.toObject(message.userUsageData[j], options); + } + return object; + }; + + /** + * Converts this PerMonthUsageData to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @instance + * @returns {Object.} JSON object + */ + PerMonthUsageData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PerMonthUsageData + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PerMonthUsageData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData"; + }; + + return PerMonthUsageData; + })(); + + return ReadTensorboardUsageResponse; + })(); + + v1.CreateTensorboardExperimentRequest = (function() { + + /** + * Properties of a CreateTensorboardExperimentRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface ICreateTensorboardExperimentRequest + * @property {string|null} [parent] CreateTensorboardExperimentRequest parent + * @property {google.cloud.aiplatform.v1.ITensorboardExperiment|null} [tensorboardExperiment] CreateTensorboardExperimentRequest tensorboardExperiment + * @property {string|null} [tensorboardExperimentId] CreateTensorboardExperimentRequest tensorboardExperimentId + */ + + /** + * Constructs a new CreateTensorboardExperimentRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a CreateTensorboardExperimentRequest. + * @implements ICreateTensorboardExperimentRequest + * @constructor + * @param {google.cloud.aiplatform.v1.ICreateTensorboardExperimentRequest=} [properties] Properties to set + */ + function CreateTensorboardExperimentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTensorboardExperimentRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @instance + */ + CreateTensorboardExperimentRequest.prototype.parent = ""; + + /** + * CreateTensorboardExperimentRequest tensorboardExperiment. + * @member {google.cloud.aiplatform.v1.ITensorboardExperiment|null|undefined} tensorboardExperiment + * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @instance + */ + CreateTensorboardExperimentRequest.prototype.tensorboardExperiment = null; + + /** + * CreateTensorboardExperimentRequest tensorboardExperimentId. + * @member {string} tensorboardExperimentId + * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @instance + */ + CreateTensorboardExperimentRequest.prototype.tensorboardExperimentId = ""; + + /** + * Creates a new CreateTensorboardExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @static + * @param {google.cloud.aiplatform.v1.ICreateTensorboardExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest} CreateTensorboardExperimentRequest instance + */ + CreateTensorboardExperimentRequest.create = function create(properties) { + return new CreateTensorboardExperimentRequest(properties); + }; + + /** + * Encodes the specified CreateTensorboardExperimentRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @static + * @param {google.cloud.aiplatform.v1.ICreateTensorboardExperimentRequest} message CreateTensorboardExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTensorboardExperimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.tensorboardExperiment != null && Object.hasOwnProperty.call(message, "tensorboardExperiment")) + $root.google.cloud.aiplatform.v1.TensorboardExperiment.encode(message.tensorboardExperiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tensorboardExperimentId != null && Object.hasOwnProperty.call(message, "tensorboardExperimentId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tensorboardExperimentId); + return writer; + }; + + /** + * Encodes the specified CreateTensorboardExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @static + * @param {google.cloud.aiplatform.v1.ICreateTensorboardExperimentRequest} message CreateTensorboardExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTensorboardExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTensorboardExperimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest} CreateTensorboardExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTensorboardExperimentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.tensorboardExperiment = $root.google.cloud.aiplatform.v1.TensorboardExperiment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.tensorboardExperimentId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTensorboardExperimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest} CreateTensorboardExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTensorboardExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTensorboardExperimentRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -191076,6 +191421,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.error != null && message.hasOwnProperty("error")) { @@ -191280,6 +191626,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } if (object.error != null) { if (typeof object.error !== "object") @@ -202805,6 +203155,7 @@ * @property {number} JOB_STATE_PAUSED=8 JOB_STATE_PAUSED value * @property {number} JOB_STATE_EXPIRED=9 JOB_STATE_EXPIRED value * @property {number} JOB_STATE_UPDATING=10 JOB_STATE_UPDATING value + * @property {number} JOB_STATE_PARTIALLY_SUCCEEDED=11 JOB_STATE_PARTIALLY_SUCCEEDED value */ v1beta1.JobState = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -202819,6 +203170,7 @@ values[valuesById[8] = "JOB_STATE_PAUSED"] = 8; values[valuesById[9] = "JOB_STATE_EXPIRED"] = 9; values[valuesById[10] = "JOB_STATE_UPDATING"] = 10; + values[valuesById[11] = "JOB_STATE_PARTIALLY_SUCCEEDED"] = 11; return values; })(); @@ -205567,6 +205919,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.scheduleState != null && message.hasOwnProperty("scheduleState")) @@ -205746,6 +206099,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } switch (object.scheduleState) { default: @@ -215894,6 +216251,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -216017,6 +216375,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } if (object.createTime != null) { if (typeof object.createTime !== "object") @@ -216163,6 +216525,7 @@ * Properties of a CustomJobSpec. * @memberof google.cloud.aiplatform.v1beta1 * @interface ICustomJobSpec + * @property {string|null} [persistentResourceId] CustomJobSpec persistentResourceId * @property {Array.|null} [workerPoolSpecs] CustomJobSpec workerPoolSpecs * @property {google.cloud.aiplatform.v1beta1.IScheduling|null} [scheduling] CustomJobSpec scheduling * @property {string|null} [serviceAccount] CustomJobSpec serviceAccount @@ -216193,6 +216556,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * CustomJobSpec persistentResourceId. + * @member {string} persistentResourceId + * @memberof google.cloud.aiplatform.v1beta1.CustomJobSpec + * @instance + */ + CustomJobSpec.prototype.persistentResourceId = ""; + /** * CustomJobSpec workerPoolSpecs. * @member {Array.} workerPoolSpecs @@ -216323,6 +216694,8 @@ if (message.reservedIpRanges != null && message.reservedIpRanges.length) for (var i = 0; i < message.reservedIpRanges.length; ++i) writer.uint32(/* id 13, wireType 2 =*/106).string(message.reservedIpRanges[i]); + if (message.persistentResourceId != null && Object.hasOwnProperty.call(message, "persistentResourceId")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.persistentResourceId); if (message.enableDashboardAccess != null && Object.hasOwnProperty.call(message, "enableDashboardAccess")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.enableDashboardAccess); if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) @@ -216363,6 +216736,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 14: { + message.persistentResourceId = reader.string(); + break; + } case 1: { if (!(message.workerPoolSpecs && message.workerPoolSpecs.length)) message.workerPoolSpecs = []; @@ -216446,6 +216823,9 @@ CustomJobSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.persistentResourceId != null && message.hasOwnProperty("persistentResourceId")) + if (!$util.isString(message.persistentResourceId)) + return "persistentResourceId: string expected"; if (message.workerPoolSpecs != null && message.hasOwnProperty("workerPoolSpecs")) { if (!Array.isArray(message.workerPoolSpecs)) return "workerPoolSpecs: array expected"; @@ -216508,6 +216888,8 @@ if (object instanceof $root.google.cloud.aiplatform.v1beta1.CustomJobSpec) return object; var message = new $root.google.cloud.aiplatform.v1beta1.CustomJobSpec(); + if (object.persistentResourceId != null) + message.persistentResourceId = String(object.persistentResourceId); if (object.workerPoolSpecs) { if (!Array.isArray(object.workerPoolSpecs)) throw TypeError(".google.cloud.aiplatform.v1beta1.CustomJobSpec.workerPoolSpecs: array expected"); @@ -216576,6 +216958,7 @@ object.baseOutputDirectory = null; object.tensorboard = ""; object.enableWebAccess = false; + object.persistentResourceId = ""; object.enableDashboardAccess = false; object.experiment = ""; object.experimentRun = ""; @@ -216602,6 +216985,8 @@ for (var j = 0; j < message.reservedIpRanges.length; ++j) object.reservedIpRanges[j] = message.reservedIpRanges[j]; } + if (message.persistentResourceId != null && message.hasOwnProperty("persistentResourceId")) + object.persistentResourceId = message.persistentResourceId; if (message.enableDashboardAccess != null && message.hasOwnProperty("enableDashboardAccess")) object.enableDashboardAccess = message.enableDashboardAccess; if (message.experiment != null && message.hasOwnProperty("experiment")) @@ -218808,6 +219193,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.labelingProgress != null && message.hasOwnProperty("labelingProgress")) @@ -218953,6 +219339,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } if (object.labelingProgress != null) message.labelingProgress = object.labelingProgress | 0; @@ -219983,6 +220373,7 @@ * @property {string|null} [description] Dataset description * @property {string|null} [metadataSchemaUri] Dataset metadataSchemaUri * @property {google.protobuf.IValue|null} [metadata] Dataset metadata + * @property {number|Long|null} [dataItemCount] Dataset dataItemCount * @property {google.protobuf.ITimestamp|null} [createTime] Dataset createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Dataset updateTime * @property {string|null} [etag] Dataset etag @@ -220049,6 +220440,14 @@ */ Dataset.prototype.metadata = null; + /** + * Dataset dataItemCount. + * @member {number|Long} dataItemCount + * @memberof google.cloud.aiplatform.v1beta1.Dataset + * @instance + */ + Dataset.prototype.dataItemCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** * Dataset createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime @@ -220149,6 +220548,8 @@ if (message.savedQueries != null && message.savedQueries.length) for (var i = 0; i < message.savedQueries.length; ++i) $root.google.cloud.aiplatform.v1beta1.SavedQuery.encode(message.savedQueries[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dataItemCount != null && Object.hasOwnProperty.call(message, "dataItemCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.dataItemCount); if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.description != null && Object.hasOwnProperty.call(message, "description")) @@ -220209,6 +220610,10 @@ message.metadata = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; } + case 10: { + message.dataItemCount = reader.int64(); + break; + } case 4: { message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; @@ -220310,6 +220715,9 @@ if (error) return "metadata." + error; } + if (message.dataItemCount != null && message.hasOwnProperty("dataItemCount")) + if (!$util.isInteger(message.dataItemCount) && !(message.dataItemCount && $util.isInteger(message.dataItemCount.low) && $util.isInteger(message.dataItemCount.high))) + return "dataItemCount: integer|Long expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) @@ -220376,6 +220784,15 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.Dataset.metadata: object expected"); message.metadata = $root.google.protobuf.Value.fromObject(object.metadata); } + if (object.dataItemCount != null) + if ($util.Long) + (message.dataItemCount = $util.Long.fromValue(object.dataItemCount)).unsigned = false; + else if (typeof object.dataItemCount === "string") + message.dataItemCount = parseInt(object.dataItemCount, 10); + else if (typeof object.dataItemCount === "number") + message.dataItemCount = object.dataItemCount; + else if (typeof object.dataItemCount === "object") + message.dataItemCount = new $util.LongBits(object.dataItemCount.low >>> 0, object.dataItemCount.high >>> 0).toNumber(); if (object.createTime != null) { if (typeof object.createTime !== "object") throw TypeError(".google.cloud.aiplatform.v1beta1.Dataset.createTime: object expected"); @@ -220440,6 +220857,11 @@ object.updateTime = null; object.etag = ""; object.metadata = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataItemCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataItemCount = options.longs === String ? "0" : 0; object.encryptionSpec = null; object.description = ""; object.metadataArtifact = ""; @@ -220469,6 +220891,11 @@ for (var j = 0; j < message.savedQueries.length; ++j) object.savedQueries[j] = $root.google.cloud.aiplatform.v1beta1.SavedQuery.toObject(message.savedQueries[j], options); } + if (message.dataItemCount != null && message.hasOwnProperty("dataItemCount")) + if (typeof message.dataItemCount === "number") + object.dataItemCount = options.longs === String ? String(message.dataItemCount) : message.dataItemCount; + else + object.dataItemCount = options.longs === String ? $util.Long.prototype.toString.call(message.dataItemCount) : options.longs === Number ? new $util.LongBits(message.dataItemCount.low >>> 0, message.dataItemCount.high >>> 0).toNumber() : message.dataItemCount; if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) object.encryptionSpec = $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.toObject(message.encryptionSpec, options); if (message.description != null && message.hasOwnProperty("description")) @@ -222208,6 +222635,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.DatasetService|deleteSavedQuery}. + * @memberof google.cloud.aiplatform.v1beta1.DatasetService + * @typedef DeleteSavedQueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteSavedQuery. + * @function deleteSavedQuery + * @memberof google.cloud.aiplatform.v1beta1.DatasetService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest} request DeleteSavedQueryRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.DatasetService.DeleteSavedQueryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DatasetService.prototype.deleteSavedQuery = function deleteSavedQuery(request, callback) { + return this.rpcCall(deleteSavedQuery, $root.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteSavedQuery" }); + + /** + * Calls DeleteSavedQuery. + * @function deleteSavedQuery + * @memberof google.cloud.aiplatform.v1beta1.DatasetService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest} request DeleteSavedQueryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.DatasetService|getAnnotationSpec}. * @memberof google.cloud.aiplatform.v1beta1.DatasetService @@ -227704,6 +228164,209 @@ return ListSavedQueriesResponse; })(); + v1beta1.DeleteSavedQueryRequest = (function() { + + /** + * Properties of a DeleteSavedQueryRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IDeleteSavedQueryRequest + * @property {string|null} [name] DeleteSavedQueryRequest name + */ + + /** + * Constructs a new DeleteSavedQueryRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a DeleteSavedQueryRequest. + * @implements IDeleteSavedQueryRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest=} [properties] Properties to set + */ + function DeleteSavedQueryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSavedQueryRequest name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @instance + */ + DeleteSavedQueryRequest.prototype.name = ""; + + /** + * Creates a new DeleteSavedQueryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest} DeleteSavedQueryRequest instance + */ + DeleteSavedQueryRequest.create = function create(properties) { + return new DeleteSavedQueryRequest(properties); + }; + + /** + * Encodes the specified DeleteSavedQueryRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest} message DeleteSavedQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSavedQueryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteSavedQueryRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest} message DeleteSavedQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSavedQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSavedQueryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest} DeleteSavedQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSavedQueryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSavedQueryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest} DeleteSavedQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSavedQueryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSavedQueryRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSavedQueryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteSavedQueryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest} DeleteSavedQueryRequest + */ + DeleteSavedQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSavedQueryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest} message DeleteSavedQueryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSavedQueryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteSavedQueryRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSavedQueryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSavedQueryRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSavedQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest"; + }; + + return DeleteSavedQueryRequest; + })(); + v1beta1.GetAnnotationSpecRequest = (function() { /** @@ -262298,6 +262961,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -262434,6 +263098,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } if (object.createTime != null) { if (typeof object.createTime !== "object") @@ -293111,6 +293779,7 @@ case 8: case 9: case 10: + case 11: break; } if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -293234,6 +293903,10 @@ case 10: message.state = 10; break; + case "JOB_STATE_PARTIALLY_SUCCEEDED": + case 11: + message.state = 11; + break; } if (object.createTime != null) { if (typeof object.createTime !== "object") @@ -330773,57 +331446,39 @@ return ListModelEvaluationSlicesResponse; })(); - /** - * PipelineFailurePolicy enum. - * @name google.cloud.aiplatform.v1beta1.PipelineFailurePolicy - * @enum {number} - * @property {number} PIPELINE_FAILURE_POLICY_UNSPECIFIED=0 PIPELINE_FAILURE_POLICY_UNSPECIFIED value - * @property {number} PIPELINE_FAILURE_POLICY_FAIL_SLOW=1 PIPELINE_FAILURE_POLICY_FAIL_SLOW value - * @property {number} PIPELINE_FAILURE_POLICY_FAIL_FAST=2 PIPELINE_FAILURE_POLICY_FAIL_FAST value - */ - v1beta1.PipelineFailurePolicy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PIPELINE_FAILURE_POLICY_UNSPECIFIED"] = 0; - values[valuesById[1] = "PIPELINE_FAILURE_POLICY_FAIL_SLOW"] = 1; - values[valuesById[2] = "PIPELINE_FAILURE_POLICY_FAIL_FAST"] = 2; - return values; - })(); - - v1beta1.PipelineJob = (function() { + v1beta1.PersistentResource = (function() { /** - * Properties of a PipelineJob. + * Properties of a PersistentResource. * @memberof google.cloud.aiplatform.v1beta1 - * @interface IPipelineJob - * @property {string|null} [name] PipelineJob name - * @property {string|null} [displayName] PipelineJob displayName - * @property {google.protobuf.ITimestamp|null} [createTime] PipelineJob createTime - * @property {google.protobuf.ITimestamp|null} [startTime] PipelineJob startTime - * @property {google.protobuf.ITimestamp|null} [endTime] PipelineJob endTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PipelineJob updateTime - * @property {google.protobuf.IStruct|null} [pipelineSpec] PipelineJob pipelineSpec - * @property {google.cloud.aiplatform.v1beta1.PipelineState|null} [state] PipelineJob state - * @property {google.cloud.aiplatform.v1beta1.IPipelineJobDetail|null} [jobDetail] PipelineJob jobDetail - * @property {google.rpc.IStatus|null} [error] PipelineJob error - * @property {Object.|null} [labels] PipelineJob labels - * @property {google.cloud.aiplatform.v1beta1.PipelineJob.IRuntimeConfig|null} [runtimeConfig] PipelineJob runtimeConfig - * @property {google.cloud.aiplatform.v1beta1.IEncryptionSpec|null} [encryptionSpec] PipelineJob encryptionSpec - * @property {string|null} [serviceAccount] PipelineJob serviceAccount - * @property {string|null} [network] PipelineJob network - * @property {string|null} [templateUri] PipelineJob templateUri - * @property {google.cloud.aiplatform.v1beta1.IPipelineTemplateMetadata|null} [templateMetadata] PipelineJob templateMetadata + * @interface IPersistentResource + * @property {string|null} [name] PersistentResource name + * @property {string|null} [displayName] PersistentResource displayName + * @property {Array.|null} [resourcePools] PersistentResource resourcePools + * @property {google.cloud.aiplatform.v1beta1.PersistentResource.State|null} [state] PersistentResource state + * @property {google.rpc.IStatus|null} [error] PersistentResource error + * @property {google.protobuf.ITimestamp|null} [createTime] PersistentResource createTime + * @property {google.protobuf.ITimestamp|null} [startTime] PersistentResource startTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PersistentResource updateTime + * @property {Object.|null} [labels] PersistentResource labels + * @property {string|null} [network] PersistentResource network + * @property {google.cloud.aiplatform.v1beta1.IEncryptionSpec|null} [encryptionSpec] PersistentResource encryptionSpec + * @property {google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec|null} [resourceRuntimeSpec] PersistentResource resourceRuntimeSpec + * @property {Array.|null} [reservedIpRanges] PersistentResource reservedIpRanges */ /** - * Constructs a new PipelineJob. + * Constructs a new PersistentResource. * @memberof google.cloud.aiplatform.v1beta1 - * @classdesc Represents a PipelineJob. - * @implements IPipelineJob + * @classdesc Represents a PersistentResource. + * @implements IPersistentResource * @constructor - * @param {google.cloud.aiplatform.v1beta1.IPipelineJob=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1beta1.IPersistentResource=} [properties] Properties to set */ - function PipelineJob(properties) { + function PersistentResource(properties) { + this.resourcePools = []; this.labels = {}; + this.reservedIpRanges = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -330831,231 +331486,193 @@ } /** - * PipelineJob name. + * PersistentResource name. * @member {string} name - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.name = ""; + PersistentResource.prototype.name = ""; /** - * PipelineJob displayName. + * PersistentResource displayName. * @member {string} displayName - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob - * @instance - */ - PipelineJob.prototype.displayName = ""; - - /** - * PipelineJob createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob - * @instance - */ - PipelineJob.prototype.createTime = null; - - /** - * PipelineJob startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.startTime = null; + PersistentResource.prototype.displayName = ""; /** - * PipelineJob endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * PersistentResource resourcePools. + * @member {Array.} resourcePools + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.endTime = null; + PersistentResource.prototype.resourcePools = $util.emptyArray; /** - * PipelineJob updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * PersistentResource state. + * @member {google.cloud.aiplatform.v1beta1.PersistentResource.State} state + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.updateTime = null; + PersistentResource.prototype.state = 0; /** - * PipelineJob pipelineSpec. - * @member {google.protobuf.IStruct|null|undefined} pipelineSpec - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * PersistentResource error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.pipelineSpec = null; + PersistentResource.prototype.error = null; /** - * PipelineJob state. - * @member {google.cloud.aiplatform.v1beta1.PipelineState} state - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * PersistentResource createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.state = 0; + PersistentResource.prototype.createTime = null; /** - * PipelineJob jobDetail. - * @member {google.cloud.aiplatform.v1beta1.IPipelineJobDetail|null|undefined} jobDetail - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * PersistentResource startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.jobDetail = null; + PersistentResource.prototype.startTime = null; /** - * PipelineJob error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * PersistentResource updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.error = null; + PersistentResource.prototype.updateTime = null; /** - * PipelineJob labels. + * PersistentResource labels. * @member {Object.} labels - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.labels = $util.emptyObject; + PersistentResource.prototype.labels = $util.emptyObject; /** - * PipelineJob runtimeConfig. - * @member {google.cloud.aiplatform.v1beta1.PipelineJob.IRuntimeConfig|null|undefined} runtimeConfig - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * PersistentResource network. + * @member {string} network + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.runtimeConfig = null; + PersistentResource.prototype.network = ""; /** - * PipelineJob encryptionSpec. + * PersistentResource encryptionSpec. * @member {google.cloud.aiplatform.v1beta1.IEncryptionSpec|null|undefined} encryptionSpec - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob - * @instance - */ - PipelineJob.prototype.encryptionSpec = null; - - /** - * PipelineJob serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob - * @instance - */ - PipelineJob.prototype.serviceAccount = ""; - - /** - * PipelineJob network. - * @member {string} network - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.network = ""; + PersistentResource.prototype.encryptionSpec = null; /** - * PipelineJob templateUri. - * @member {string} templateUri - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * PersistentResource resourceRuntimeSpec. + * @member {google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec|null|undefined} resourceRuntimeSpec + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.templateUri = ""; + PersistentResource.prototype.resourceRuntimeSpec = null; /** - * PipelineJob templateMetadata. - * @member {google.cloud.aiplatform.v1beta1.IPipelineTemplateMetadata|null|undefined} templateMetadata - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * PersistentResource reservedIpRanges. + * @member {Array.} reservedIpRanges + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @instance */ - PipelineJob.prototype.templateMetadata = null; + PersistentResource.prototype.reservedIpRanges = $util.emptyArray; /** - * Creates a new PipelineJob instance using the specified properties. + * Creates a new PersistentResource instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @static - * @param {google.cloud.aiplatform.v1beta1.IPipelineJob=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1beta1.PipelineJob} PipelineJob instance + * @param {google.cloud.aiplatform.v1beta1.IPersistentResource=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PersistentResource} PersistentResource instance */ - PipelineJob.create = function create(properties) { - return new PipelineJob(properties); + PersistentResource.create = function create(properties) { + return new PersistentResource(properties); }; /** - * Encodes the specified PipelineJob message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PipelineJob.verify|verify} messages. + * Encodes the specified PersistentResource message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PersistentResource.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @static - * @param {google.cloud.aiplatform.v1beta1.IPipelineJob} message PipelineJob message or plain object to encode + * @param {google.cloud.aiplatform.v1beta1.IPersistentResource} message PersistentResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PipelineJob.encode = function encode(message, writer) { + PersistentResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.resourcePools != null && message.resourcePools.length) + for (var i = 0; i < message.resourcePools.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ResourcePool.encode(message.resourcePools[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.pipelineSpec != null && Object.hasOwnProperty.call(message, "pipelineSpec")) - $root.google.protobuf.Struct.encode(message.pipelineSpec, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.jobDetail != null && Object.hasOwnProperty.call(message, "jobDetail")) - $root.google.cloud.aiplatform.v1beta1.PipelineJobDetail.encode(message.jobDetail, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.runtimeConfig != null && Object.hasOwnProperty.call(message, "runtimeConfig")) - $root.google.cloud.aiplatform.v1beta1.PipelineJob.RuntimeConfig.encode(message.runtimeConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) - $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.serviceAccount); + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.network); - if (message.templateUri != null && Object.hasOwnProperty.call(message, "templateUri")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.templateUri); - if (message.templateMetadata != null && Object.hasOwnProperty.call(message, "templateMetadata")) - $root.google.cloud.aiplatform.v1beta1.PipelineTemplateMetadata.encode(message.templateMetadata, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + writer.uint32(/* id 11, wireType 2 =*/90).string(message.network); + if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) + $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.resourceRuntimeSpec != null && Object.hasOwnProperty.call(message, "resourceRuntimeSpec")) + $root.google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec.encode(message.resourceRuntimeSpec, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.reservedIpRanges != null && message.reservedIpRanges.length) + for (var i = 0; i < message.reservedIpRanges.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.reservedIpRanges[i]); return writer; }; /** - * Encodes the specified PipelineJob message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PipelineJob.verify|verify} messages. + * Encodes the specified PersistentResource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PersistentResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @static - * @param {google.cloud.aiplatform.v1beta1.IPipelineJob} message PipelineJob message or plain object to encode + * @param {google.cloud.aiplatform.v1beta1.IPersistentResource} message PersistentResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PipelineJob.encodeDelimited = function encodeDelimited(message, writer) { + PersistentResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PipelineJob message from the specified reader or buffer. + * Decodes a PersistentResource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1beta1.PipelineJob} PipelineJob + * @returns {google.cloud.aiplatform.v1beta1.PersistentResource} PersistentResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PipelineJob.decode = function decode(reader, length) { + PersistentResource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.PipelineJob(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.PersistentResource(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -331067,39 +331684,3409 @@ message.displayName = reader.string(); break; } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } case 4: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.resourcePools && message.resourcePools.length)) + message.resourcePools = []; + message.resourcePools.push($root.google.cloud.aiplatform.v1beta1.ResourcePool.decode(reader, reader.uint32())); break; } case 5: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.state = reader.int32(); break; } case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); break; } case 7: { - message.pipelineSpec = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 8: { - message.state = reader.int32(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 9: { - message.jobDetail = $root.google.cloud.aiplatform.v1beta1.PipelineJobDetail.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 10: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 11: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 11: { + message.network = reader.string(); + break; + } + case 12: { + message.encryptionSpec = $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.decode(reader, reader.uint32()); + break; + } + case 13: { + message.resourceRuntimeSpec = $root.google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec.decode(reader, reader.uint32()); + break; + } + case 15: { + if (!(message.reservedIpRanges && message.reservedIpRanges.length)) + message.reservedIpRanges = []; + message.reservedIpRanges.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PersistentResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PersistentResource} PersistentResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PersistentResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PersistentResource message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PersistentResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.resourcePools != null && message.hasOwnProperty("resourcePools")) { + if (!Array.isArray(message.resourcePools)) + return "resourcePools: array expected"; + for (var i = 0; i < message.resourcePools.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ResourcePool.verify(message.resourcePools[i]); + if (error) + return "resourcePools." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 3: + case 4: + case 5: + break; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.verify(message.encryptionSpec); + if (error) + return "encryptionSpec." + error; + } + if (message.resourceRuntimeSpec != null && message.hasOwnProperty("resourceRuntimeSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec.verify(message.resourceRuntimeSpec); + if (error) + return "resourceRuntimeSpec." + error; + } + if (message.reservedIpRanges != null && message.hasOwnProperty("reservedIpRanges")) { + if (!Array.isArray(message.reservedIpRanges)) + return "reservedIpRanges: array expected"; + for (var i = 0; i < message.reservedIpRanges.length; ++i) + if (!$util.isString(message.reservedIpRanges[i])) + return "reservedIpRanges: string[] expected"; + } + return null; + }; + + /** + * Creates a PersistentResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PersistentResource} PersistentResource + */ + PersistentResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PersistentResource) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PersistentResource(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.resourcePools) { + if (!Array.isArray(object.resourcePools)) + throw TypeError(".google.cloud.aiplatform.v1beta1.PersistentResource.resourcePools: array expected"); + message.resourcePools = []; + for (var i = 0; i < object.resourcePools.length; ++i) { + if (typeof object.resourcePools[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PersistentResource.resourcePools: object expected"); + message.resourcePools[i] = $root.google.cloud.aiplatform.v1beta1.ResourcePool.fromObject(object.resourcePools[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PROVISIONING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 3: + message.state = 3; + break; + case "STOPPING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PersistentResource.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PersistentResource.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PersistentResource.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PersistentResource.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PersistentResource.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.network != null) + message.network = String(object.network); + if (object.encryptionSpec != null) { + if (typeof object.encryptionSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PersistentResource.encryptionSpec: object expected"); + message.encryptionSpec = $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.fromObject(object.encryptionSpec); + } + if (object.resourceRuntimeSpec != null) { + if (typeof object.resourceRuntimeSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PersistentResource.resourceRuntimeSpec: object expected"); + message.resourceRuntimeSpec = $root.google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec.fromObject(object.resourceRuntimeSpec); + } + if (object.reservedIpRanges) { + if (!Array.isArray(object.reservedIpRanges)) + throw TypeError(".google.cloud.aiplatform.v1beta1.PersistentResource.reservedIpRanges: array expected"); + message.reservedIpRanges = []; + for (var i = 0; i < object.reservedIpRanges.length; ++i) + message.reservedIpRanges[i] = String(object.reservedIpRanges[i]); + } + return message; + }; + + /** + * Creates a plain object from a PersistentResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource + * @static + * @param {google.cloud.aiplatform.v1beta1.PersistentResource} message PersistentResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PersistentResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resourcePools = []; + object.reservedIpRanges = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.error = null; + object.createTime = null; + object.startTime = null; + object.updateTime = null; + object.network = ""; + object.encryptionSpec = null; + object.resourceRuntimeSpec = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.resourcePools && message.resourcePools.length) { + object.resourcePools = []; + for (var j = 0; j < message.resourcePools.length; ++j) + object.resourcePools[j] = $root.google.cloud.aiplatform.v1beta1.ResourcePool.toObject(message.resourcePools[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.PersistentResource.State[message.state] === undefined ? message.state : $root.google.cloud.aiplatform.v1beta1.PersistentResource.State[message.state] : message.state; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) + object.encryptionSpec = $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.toObject(message.encryptionSpec, options); + if (message.resourceRuntimeSpec != null && message.hasOwnProperty("resourceRuntimeSpec")) + object.resourceRuntimeSpec = $root.google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec.toObject(message.resourceRuntimeSpec, options); + if (message.reservedIpRanges && message.reservedIpRanges.length) { + object.reservedIpRanges = []; + for (var j = 0; j < message.reservedIpRanges.length; ++j) + object.reservedIpRanges[j] = message.reservedIpRanges[j]; + } + return object; + }; + + /** + * Converts this PersistentResource to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource + * @instance + * @returns {Object.} JSON object + */ + PersistentResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PersistentResource + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PersistentResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PersistentResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PersistentResource"; + }; + + /** + * State enum. + * @name google.cloud.aiplatform.v1beta1.PersistentResource.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PROVISIONING=1 PROVISIONING value + * @property {number} RUNNING=3 RUNNING value + * @property {number} STOPPING=4 STOPPING value + * @property {number} ERROR=5 ERROR value + */ + PersistentResource.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROVISIONING"] = 1; + values[valuesById[3] = "RUNNING"] = 3; + values[valuesById[4] = "STOPPING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + return values; + })(); + + return PersistentResource; + })(); + + v1beta1.ResourcePool = (function() { + + /** + * Properties of a ResourcePool. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IResourcePool + * @property {string|null} [id] ResourcePool id + * @property {google.cloud.aiplatform.v1beta1.IMachineSpec|null} [machineSpec] ResourcePool machineSpec + * @property {number|Long|null} [replicaCount] ResourcePool replicaCount + * @property {google.cloud.aiplatform.v1beta1.IDiskSpec|null} [diskSpec] ResourcePool diskSpec + * @property {number|Long|null} [idleReplicaCount] ResourcePool idleReplicaCount + * @property {number|Long|null} [usedReplicaCount] ResourcePool usedReplicaCount + * @property {google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec|null} [autoscalingSpec] ResourcePool autoscalingSpec + */ + + /** + * Constructs a new ResourcePool. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ResourcePool. + * @implements IResourcePool + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IResourcePool=} [properties] Properties to set + */ + function ResourcePool(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourcePool id. + * @member {string} id + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @instance + */ + ResourcePool.prototype.id = ""; + + /** + * ResourcePool machineSpec. + * @member {google.cloud.aiplatform.v1beta1.IMachineSpec|null|undefined} machineSpec + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @instance + */ + ResourcePool.prototype.machineSpec = null; + + /** + * ResourcePool replicaCount. + * @member {number|Long|null|undefined} replicaCount + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @instance + */ + ResourcePool.prototype.replicaCount = null; + + /** + * ResourcePool diskSpec. + * @member {google.cloud.aiplatform.v1beta1.IDiskSpec|null|undefined} diskSpec + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @instance + */ + ResourcePool.prototype.diskSpec = null; + + /** + * ResourcePool idleReplicaCount. + * @member {number|Long} idleReplicaCount + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @instance + */ + ResourcePool.prototype.idleReplicaCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResourcePool usedReplicaCount. + * @member {number|Long} usedReplicaCount + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @instance + */ + ResourcePool.prototype.usedReplicaCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResourcePool autoscalingSpec. + * @member {google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec|null|undefined} autoscalingSpec + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @instance + */ + ResourcePool.prototype.autoscalingSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResourcePool _replicaCount. + * @member {"replicaCount"|undefined} _replicaCount + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @instance + */ + Object.defineProperty(ResourcePool.prototype, "_replicaCount", { + get: $util.oneOfGetter($oneOfFields = ["replicaCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResourcePool instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @static + * @param {google.cloud.aiplatform.v1beta1.IResourcePool=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ResourcePool} ResourcePool instance + */ + ResourcePool.create = function create(properties) { + return new ResourcePool(properties); + }; + + /** + * Encodes the specified ResourcePool message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourcePool.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @static + * @param {google.cloud.aiplatform.v1beta1.IResourcePool} message ResourcePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourcePool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.machineSpec != null && Object.hasOwnProperty.call(message, "machineSpec")) + $root.google.cloud.aiplatform.v1beta1.MachineSpec.encode(message.machineSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.replicaCount != null && Object.hasOwnProperty.call(message, "replicaCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.replicaCount); + if (message.diskSpec != null && Object.hasOwnProperty.call(message, "diskSpec")) + $root.google.cloud.aiplatform.v1beta1.DiskSpec.encode(message.diskSpec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.idleReplicaCount != null && Object.hasOwnProperty.call(message, "idleReplicaCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.idleReplicaCount); + if (message.usedReplicaCount != null && Object.hasOwnProperty.call(message, "usedReplicaCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.usedReplicaCount); + if (message.autoscalingSpec != null && Object.hasOwnProperty.call(message, "autoscalingSpec")) + $root.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec.encode(message.autoscalingSpec, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourcePool message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourcePool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @static + * @param {google.cloud.aiplatform.v1beta1.IResourcePool} message ResourcePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourcePool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourcePool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ResourcePool} ResourcePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourcePool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ResourcePool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.machineSpec = $root.google.cloud.aiplatform.v1beta1.MachineSpec.decode(reader, reader.uint32()); + break; + } + case 3: { + message.replicaCount = reader.int64(); + break; + } + case 4: { + message.diskSpec = $root.google.cloud.aiplatform.v1beta1.DiskSpec.decode(reader, reader.uint32()); + break; + } + case 5: { + message.idleReplicaCount = reader.int64(); + break; + } + case 6: { + message.usedReplicaCount = reader.int64(); + break; + } + case 7: { + message.autoscalingSpec = $root.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourcePool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ResourcePool} ResourcePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourcePool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourcePool message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourcePool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.machineSpec != null && message.hasOwnProperty("machineSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.MachineSpec.verify(message.machineSpec); + if (error) + return "machineSpec." + error; + } + if (message.replicaCount != null && message.hasOwnProperty("replicaCount")) { + properties._replicaCount = 1; + if (!$util.isInteger(message.replicaCount) && !(message.replicaCount && $util.isInteger(message.replicaCount.low) && $util.isInteger(message.replicaCount.high))) + return "replicaCount: integer|Long expected"; + } + if (message.diskSpec != null && message.hasOwnProperty("diskSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.DiskSpec.verify(message.diskSpec); + if (error) + return "diskSpec." + error; + } + if (message.idleReplicaCount != null && message.hasOwnProperty("idleReplicaCount")) + if (!$util.isInteger(message.idleReplicaCount) && !(message.idleReplicaCount && $util.isInteger(message.idleReplicaCount.low) && $util.isInteger(message.idleReplicaCount.high))) + return "idleReplicaCount: integer|Long expected"; + if (message.usedReplicaCount != null && message.hasOwnProperty("usedReplicaCount")) + if (!$util.isInteger(message.usedReplicaCount) && !(message.usedReplicaCount && $util.isInteger(message.usedReplicaCount.low) && $util.isInteger(message.usedReplicaCount.high))) + return "usedReplicaCount: integer|Long expected"; + if (message.autoscalingSpec != null && message.hasOwnProperty("autoscalingSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec.verify(message.autoscalingSpec); + if (error) + return "autoscalingSpec." + error; + } + return null; + }; + + /** + * Creates a ResourcePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ResourcePool} ResourcePool + */ + ResourcePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ResourcePool) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ResourcePool(); + if (object.id != null) + message.id = String(object.id); + if (object.machineSpec != null) { + if (typeof object.machineSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ResourcePool.machineSpec: object expected"); + message.machineSpec = $root.google.cloud.aiplatform.v1beta1.MachineSpec.fromObject(object.machineSpec); + } + if (object.replicaCount != null) + if ($util.Long) + (message.replicaCount = $util.Long.fromValue(object.replicaCount)).unsigned = false; + else if (typeof object.replicaCount === "string") + message.replicaCount = parseInt(object.replicaCount, 10); + else if (typeof object.replicaCount === "number") + message.replicaCount = object.replicaCount; + else if (typeof object.replicaCount === "object") + message.replicaCount = new $util.LongBits(object.replicaCount.low >>> 0, object.replicaCount.high >>> 0).toNumber(); + if (object.diskSpec != null) { + if (typeof object.diskSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ResourcePool.diskSpec: object expected"); + message.diskSpec = $root.google.cloud.aiplatform.v1beta1.DiskSpec.fromObject(object.diskSpec); + } + if (object.idleReplicaCount != null) + if ($util.Long) + (message.idleReplicaCount = $util.Long.fromValue(object.idleReplicaCount)).unsigned = false; + else if (typeof object.idleReplicaCount === "string") + message.idleReplicaCount = parseInt(object.idleReplicaCount, 10); + else if (typeof object.idleReplicaCount === "number") + message.idleReplicaCount = object.idleReplicaCount; + else if (typeof object.idleReplicaCount === "object") + message.idleReplicaCount = new $util.LongBits(object.idleReplicaCount.low >>> 0, object.idleReplicaCount.high >>> 0).toNumber(); + if (object.usedReplicaCount != null) + if ($util.Long) + (message.usedReplicaCount = $util.Long.fromValue(object.usedReplicaCount)).unsigned = false; + else if (typeof object.usedReplicaCount === "string") + message.usedReplicaCount = parseInt(object.usedReplicaCount, 10); + else if (typeof object.usedReplicaCount === "number") + message.usedReplicaCount = object.usedReplicaCount; + else if (typeof object.usedReplicaCount === "object") + message.usedReplicaCount = new $util.LongBits(object.usedReplicaCount.low >>> 0, object.usedReplicaCount.high >>> 0).toNumber(); + if (object.autoscalingSpec != null) { + if (typeof object.autoscalingSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ResourcePool.autoscalingSpec: object expected"); + message.autoscalingSpec = $root.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec.fromObject(object.autoscalingSpec); + } + return message; + }; + + /** + * Creates a plain object from a ResourcePool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @static + * @param {google.cloud.aiplatform.v1beta1.ResourcePool} message ResourcePool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourcePool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.machineSpec = null; + object.diskSpec = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.idleReplicaCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.idleReplicaCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.usedReplicaCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.usedReplicaCount = options.longs === String ? "0" : 0; + object.autoscalingSpec = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.machineSpec != null && message.hasOwnProperty("machineSpec")) + object.machineSpec = $root.google.cloud.aiplatform.v1beta1.MachineSpec.toObject(message.machineSpec, options); + if (message.replicaCount != null && message.hasOwnProperty("replicaCount")) { + if (typeof message.replicaCount === "number") + object.replicaCount = options.longs === String ? String(message.replicaCount) : message.replicaCount; + else + object.replicaCount = options.longs === String ? $util.Long.prototype.toString.call(message.replicaCount) : options.longs === Number ? new $util.LongBits(message.replicaCount.low >>> 0, message.replicaCount.high >>> 0).toNumber() : message.replicaCount; + if (options.oneofs) + object._replicaCount = "replicaCount"; + } + if (message.diskSpec != null && message.hasOwnProperty("diskSpec")) + object.diskSpec = $root.google.cloud.aiplatform.v1beta1.DiskSpec.toObject(message.diskSpec, options); + if (message.idleReplicaCount != null && message.hasOwnProperty("idleReplicaCount")) + if (typeof message.idleReplicaCount === "number") + object.idleReplicaCount = options.longs === String ? String(message.idleReplicaCount) : message.idleReplicaCount; + else + object.idleReplicaCount = options.longs === String ? $util.Long.prototype.toString.call(message.idleReplicaCount) : options.longs === Number ? new $util.LongBits(message.idleReplicaCount.low >>> 0, message.idleReplicaCount.high >>> 0).toNumber() : message.idleReplicaCount; + if (message.usedReplicaCount != null && message.hasOwnProperty("usedReplicaCount")) + if (typeof message.usedReplicaCount === "number") + object.usedReplicaCount = options.longs === String ? String(message.usedReplicaCount) : message.usedReplicaCount; + else + object.usedReplicaCount = options.longs === String ? $util.Long.prototype.toString.call(message.usedReplicaCount) : options.longs === Number ? new $util.LongBits(message.usedReplicaCount.low >>> 0, message.usedReplicaCount.high >>> 0).toNumber() : message.usedReplicaCount; + if (message.autoscalingSpec != null && message.hasOwnProperty("autoscalingSpec")) + object.autoscalingSpec = $root.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec.toObject(message.autoscalingSpec, options); + return object; + }; + + /** + * Converts this ResourcePool to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @instance + * @returns {Object.} JSON object + */ + ResourcePool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourcePool + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourcePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ResourcePool"; + }; + + ResourcePool.AutoscalingSpec = (function() { + + /** + * Properties of an AutoscalingSpec. + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @interface IAutoscalingSpec + * @property {number|Long|null} [minReplicaCount] AutoscalingSpec minReplicaCount + * @property {number|Long|null} [maxReplicaCount] AutoscalingSpec maxReplicaCount + */ + + /** + * Constructs a new AutoscalingSpec. + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool + * @classdesc Represents an AutoscalingSpec. + * @implements IAutoscalingSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec=} [properties] Properties to set + */ + function AutoscalingSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoscalingSpec minReplicaCount. + * @member {number|Long|null|undefined} minReplicaCount + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @instance + */ + AutoscalingSpec.prototype.minReplicaCount = null; + + /** + * AutoscalingSpec maxReplicaCount. + * @member {number|Long|null|undefined} maxReplicaCount + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @instance + */ + AutoscalingSpec.prototype.maxReplicaCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AutoscalingSpec _minReplicaCount. + * @member {"minReplicaCount"|undefined} _minReplicaCount + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @instance + */ + Object.defineProperty(AutoscalingSpec.prototype, "_minReplicaCount", { + get: $util.oneOfGetter($oneOfFields = ["minReplicaCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AutoscalingSpec _maxReplicaCount. + * @member {"maxReplicaCount"|undefined} _maxReplicaCount + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @instance + */ + Object.defineProperty(AutoscalingSpec.prototype, "_maxReplicaCount", { + get: $util.oneOfGetter($oneOfFields = ["maxReplicaCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AutoscalingSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec} AutoscalingSpec instance + */ + AutoscalingSpec.create = function create(properties) { + return new AutoscalingSpec(properties); + }; + + /** + * Encodes the specified AutoscalingSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec} message AutoscalingSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minReplicaCount != null && Object.hasOwnProperty.call(message, "minReplicaCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.minReplicaCount); + if (message.maxReplicaCount != null && Object.hasOwnProperty.call(message, "maxReplicaCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxReplicaCount); + return writer; + }; + + /** + * Encodes the specified AutoscalingSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ResourcePool.IAutoscalingSpec} message AutoscalingSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoscalingSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec} AutoscalingSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minReplicaCount = reader.int64(); + break; + } + case 2: { + message.maxReplicaCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoscalingSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec} AutoscalingSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoscalingSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoscalingSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.minReplicaCount != null && message.hasOwnProperty("minReplicaCount")) { + properties._minReplicaCount = 1; + if (!$util.isInteger(message.minReplicaCount) && !(message.minReplicaCount && $util.isInteger(message.minReplicaCount.low) && $util.isInteger(message.minReplicaCount.high))) + return "minReplicaCount: integer|Long expected"; + } + if (message.maxReplicaCount != null && message.hasOwnProperty("maxReplicaCount")) { + properties._maxReplicaCount = 1; + if (!$util.isInteger(message.maxReplicaCount) && !(message.maxReplicaCount && $util.isInteger(message.maxReplicaCount.low) && $util.isInteger(message.maxReplicaCount.high))) + return "maxReplicaCount: integer|Long expected"; + } + return null; + }; + + /** + * Creates an AutoscalingSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec} AutoscalingSpec + */ + AutoscalingSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec(); + if (object.minReplicaCount != null) + if ($util.Long) + (message.minReplicaCount = $util.Long.fromValue(object.minReplicaCount)).unsigned = false; + else if (typeof object.minReplicaCount === "string") + message.minReplicaCount = parseInt(object.minReplicaCount, 10); + else if (typeof object.minReplicaCount === "number") + message.minReplicaCount = object.minReplicaCount; + else if (typeof object.minReplicaCount === "object") + message.minReplicaCount = new $util.LongBits(object.minReplicaCount.low >>> 0, object.minReplicaCount.high >>> 0).toNumber(); + if (object.maxReplicaCount != null) + if ($util.Long) + (message.maxReplicaCount = $util.Long.fromValue(object.maxReplicaCount)).unsigned = false; + else if (typeof object.maxReplicaCount === "string") + message.maxReplicaCount = parseInt(object.maxReplicaCount, 10); + else if (typeof object.maxReplicaCount === "number") + message.maxReplicaCount = object.maxReplicaCount; + else if (typeof object.maxReplicaCount === "object") + message.maxReplicaCount = new $util.LongBits(object.maxReplicaCount.low >>> 0, object.maxReplicaCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an AutoscalingSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec} message AutoscalingSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoscalingSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.minReplicaCount != null && message.hasOwnProperty("minReplicaCount")) { + if (typeof message.minReplicaCount === "number") + object.minReplicaCount = options.longs === String ? String(message.minReplicaCount) : message.minReplicaCount; + else + object.minReplicaCount = options.longs === String ? $util.Long.prototype.toString.call(message.minReplicaCount) : options.longs === Number ? new $util.LongBits(message.minReplicaCount.low >>> 0, message.minReplicaCount.high >>> 0).toNumber() : message.minReplicaCount; + if (options.oneofs) + object._minReplicaCount = "minReplicaCount"; + } + if (message.maxReplicaCount != null && message.hasOwnProperty("maxReplicaCount")) { + if (typeof message.maxReplicaCount === "number") + object.maxReplicaCount = options.longs === String ? String(message.maxReplicaCount) : message.maxReplicaCount; + else + object.maxReplicaCount = options.longs === String ? $util.Long.prototype.toString.call(message.maxReplicaCount) : options.longs === Number ? new $util.LongBits(message.maxReplicaCount.low >>> 0, message.maxReplicaCount.high >>> 0).toNumber() : message.maxReplicaCount; + if (options.oneofs) + object._maxReplicaCount = "maxReplicaCount"; + } + return object; + }; + + /** + * Converts this AutoscalingSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @instance + * @returns {Object.} JSON object + */ + AutoscalingSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoscalingSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoscalingSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec"; + }; + + return AutoscalingSpec; + })(); + + return ResourcePool; + })(); + + v1beta1.ResourceRuntimeSpec = (function() { + + /** + * Properties of a ResourceRuntimeSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IResourceRuntimeSpec + * @property {google.cloud.aiplatform.v1beta1.IServiceAccountSpec|null} [serviceAccountSpec] ResourceRuntimeSpec serviceAccountSpec + */ + + /** + * Constructs a new ResourceRuntimeSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ResourceRuntimeSpec. + * @implements IResourceRuntimeSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec=} [properties] Properties to set + */ + function ResourceRuntimeSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceRuntimeSpec serviceAccountSpec. + * @member {google.cloud.aiplatform.v1beta1.IServiceAccountSpec|null|undefined} serviceAccountSpec + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @instance + */ + ResourceRuntimeSpec.prototype.serviceAccountSpec = null; + + /** + * Creates a new ResourceRuntimeSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec} ResourceRuntimeSpec instance + */ + ResourceRuntimeSpec.create = function create(properties) { + return new ResourceRuntimeSpec(properties); + }; + + /** + * Encodes the specified ResourceRuntimeSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec} message ResourceRuntimeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceRuntimeSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceAccountSpec != null && Object.hasOwnProperty.call(message, "serviceAccountSpec")) + $root.google.cloud.aiplatform.v1beta1.ServiceAccountSpec.encode(message.serviceAccountSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceRuntimeSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IResourceRuntimeSpec} message ResourceRuntimeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceRuntimeSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceRuntimeSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec} ResourceRuntimeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceRuntimeSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.serviceAccountSpec = $root.google.cloud.aiplatform.v1beta1.ServiceAccountSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceRuntimeSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec} ResourceRuntimeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceRuntimeSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceRuntimeSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceRuntimeSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceAccountSpec != null && message.hasOwnProperty("serviceAccountSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ServiceAccountSpec.verify(message.serviceAccountSpec); + if (error) + return "serviceAccountSpec." + error; + } + return null; + }; + + /** + * Creates a ResourceRuntimeSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec} ResourceRuntimeSpec + */ + ResourceRuntimeSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec(); + if (object.serviceAccountSpec != null) { + if (typeof object.serviceAccountSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec.serviceAccountSpec: object expected"); + message.serviceAccountSpec = $root.google.cloud.aiplatform.v1beta1.ServiceAccountSpec.fromObject(object.serviceAccountSpec); + } + return message; + }; + + /** + * Creates a plain object from a ResourceRuntimeSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec} message ResourceRuntimeSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceRuntimeSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.serviceAccountSpec = null; + if (message.serviceAccountSpec != null && message.hasOwnProperty("serviceAccountSpec")) + object.serviceAccountSpec = $root.google.cloud.aiplatform.v1beta1.ServiceAccountSpec.toObject(message.serviceAccountSpec, options); + return object; + }; + + /** + * Converts this ResourceRuntimeSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @instance + * @returns {Object.} JSON object + */ + ResourceRuntimeSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceRuntimeSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceRuntimeSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec"; + }; + + return ResourceRuntimeSpec; + })(); + + v1beta1.ServiceAccountSpec = (function() { + + /** + * Properties of a ServiceAccountSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IServiceAccountSpec + * @property {boolean|null} [enableCustomServiceAccount] ServiceAccountSpec enableCustomServiceAccount + * @property {string|null} [serviceAccount] ServiceAccountSpec serviceAccount + */ + + /** + * Constructs a new ServiceAccountSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ServiceAccountSpec. + * @implements IServiceAccountSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IServiceAccountSpec=} [properties] Properties to set + */ + function ServiceAccountSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceAccountSpec enableCustomServiceAccount. + * @member {boolean} enableCustomServiceAccount + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @instance + */ + ServiceAccountSpec.prototype.enableCustomServiceAccount = false; + + /** + * ServiceAccountSpec serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @instance + */ + ServiceAccountSpec.prototype.serviceAccount = ""; + + /** + * Creates a new ServiceAccountSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IServiceAccountSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ServiceAccountSpec} ServiceAccountSpec instance + */ + ServiceAccountSpec.create = function create(properties) { + return new ServiceAccountSpec(properties); + }; + + /** + * Encodes the specified ServiceAccountSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ServiceAccountSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IServiceAccountSpec} message ServiceAccountSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccountSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableCustomServiceAccount != null && Object.hasOwnProperty.call(message, "enableCustomServiceAccount")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableCustomServiceAccount); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccount); + return writer; + }; + + /** + * Encodes the specified ServiceAccountSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ServiceAccountSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IServiceAccountSpec} message ServiceAccountSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccountSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceAccountSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ServiceAccountSpec} ServiceAccountSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccountSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ServiceAccountSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableCustomServiceAccount = reader.bool(); + break; + } + case 2: { + message.serviceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceAccountSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ServiceAccountSpec} ServiceAccountSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccountSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceAccountSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceAccountSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableCustomServiceAccount != null && message.hasOwnProperty("enableCustomServiceAccount")) + if (typeof message.enableCustomServiceAccount !== "boolean") + return "enableCustomServiceAccount: boolean expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + return null; + }; + + /** + * Creates a ServiceAccountSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ServiceAccountSpec} ServiceAccountSpec + */ + ServiceAccountSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ServiceAccountSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ServiceAccountSpec(); + if (object.enableCustomServiceAccount != null) + message.enableCustomServiceAccount = Boolean(object.enableCustomServiceAccount); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + return message; + }; + + /** + * Creates a plain object from a ServiceAccountSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ServiceAccountSpec} message ServiceAccountSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceAccountSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enableCustomServiceAccount = false; + object.serviceAccount = ""; + } + if (message.enableCustomServiceAccount != null && message.hasOwnProperty("enableCustomServiceAccount")) + object.enableCustomServiceAccount = message.enableCustomServiceAccount; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + return object; + }; + + /** + * Converts this ServiceAccountSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @instance + * @returns {Object.} JSON object + */ + ServiceAccountSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceAccountSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ServiceAccountSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceAccountSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ServiceAccountSpec"; + }; + + return ServiceAccountSpec; + })(); + + v1beta1.PersistentResourceService = (function() { + + /** + * Constructs a new PersistentResourceService service. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PersistentResourceService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function PersistentResourceService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (PersistentResourceService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PersistentResourceService; + + /** + * Creates new PersistentResourceService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {PersistentResourceService} RPC service. Useful where requests and/or responses are streamed. + */ + PersistentResourceService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.PersistentResourceService|createPersistentResource}. + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @typedef CreatePersistentResourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreatePersistentResource. + * @function createPersistentResource + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @instance + * @param {google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest} request CreatePersistentResourceRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.PersistentResourceService.CreatePersistentResourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PersistentResourceService.prototype.createPersistentResource = function createPersistentResource(request, callback) { + return this.rpcCall(createPersistentResource, $root.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreatePersistentResource" }); + + /** + * Calls CreatePersistentResource. + * @function createPersistentResource + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @instance + * @param {google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest} request CreatePersistentResourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.PersistentResourceService|getPersistentResource}. + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @typedef GetPersistentResourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.PersistentResource} [response] PersistentResource + */ + + /** + * Calls GetPersistentResource. + * @function getPersistentResource + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest} request GetPersistentResourceRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.PersistentResourceService.GetPersistentResourceCallback} callback Node-style callback called with the error, if any, and PersistentResource + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PersistentResourceService.prototype.getPersistentResource = function getPersistentResource(request, callback) { + return this.rpcCall(getPersistentResource, $root.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest, $root.google.cloud.aiplatform.v1beta1.PersistentResource, request, callback); + }, "name", { value: "GetPersistentResource" }); + + /** + * Calls GetPersistentResource. + * @function getPersistentResource + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest} request GetPersistentResourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.PersistentResourceService|listPersistentResources}. + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @typedef ListPersistentResourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse} [response] ListPersistentResourcesResponse + */ + + /** + * Calls ListPersistentResources. + * @function listPersistentResources + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest} request ListPersistentResourcesRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.PersistentResourceService.ListPersistentResourcesCallback} callback Node-style callback called with the error, if any, and ListPersistentResourcesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PersistentResourceService.prototype.listPersistentResources = function listPersistentResources(request, callback) { + return this.rpcCall(listPersistentResources, $root.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest, $root.google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse, request, callback); + }, "name", { value: "ListPersistentResources" }); + + /** + * Calls ListPersistentResources. + * @function listPersistentResources + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest} request ListPersistentResourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.PersistentResourceService|deletePersistentResource}. + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @typedef DeletePersistentResourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeletePersistentResource. + * @function deletePersistentResource + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest} request DeletePersistentResourceRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.PersistentResourceService.DeletePersistentResourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PersistentResourceService.prototype.deletePersistentResource = function deletePersistentResource(request, callback) { + return this.rpcCall(deletePersistentResource, $root.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeletePersistentResource" }); + + /** + * Calls DeletePersistentResource. + * @function deletePersistentResource + * @memberof google.cloud.aiplatform.v1beta1.PersistentResourceService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest} request DeletePersistentResourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return PersistentResourceService; + })(); + + v1beta1.CreatePersistentResourceRequest = (function() { + + /** + * Properties of a CreatePersistentResourceRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ICreatePersistentResourceRequest + * @property {string|null} [parent] CreatePersistentResourceRequest parent + * @property {google.cloud.aiplatform.v1beta1.IPersistentResource|null} [persistentResource] CreatePersistentResourceRequest persistentResource + * @property {string|null} [persistentResourceId] CreatePersistentResourceRequest persistentResourceId + */ + + /** + * Constructs a new CreatePersistentResourceRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a CreatePersistentResourceRequest. + * @implements ICreatePersistentResourceRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest=} [properties] Properties to set + */ + function CreatePersistentResourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePersistentResourceRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @instance + */ + CreatePersistentResourceRequest.prototype.parent = ""; + + /** + * CreatePersistentResourceRequest persistentResource. + * @member {google.cloud.aiplatform.v1beta1.IPersistentResource|null|undefined} persistentResource + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @instance + */ + CreatePersistentResourceRequest.prototype.persistentResource = null; + + /** + * CreatePersistentResourceRequest persistentResourceId. + * @member {string} persistentResourceId + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @instance + */ + CreatePersistentResourceRequest.prototype.persistentResourceId = ""; + + /** + * Creates a new CreatePersistentResourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest} CreatePersistentResourceRequest instance + */ + CreatePersistentResourceRequest.create = function create(properties) { + return new CreatePersistentResourceRequest(properties); + }; + + /** + * Encodes the specified CreatePersistentResourceRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest} message CreatePersistentResourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePersistentResourceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.persistentResource != null && Object.hasOwnProperty.call(message, "persistentResource")) + $root.google.cloud.aiplatform.v1beta1.PersistentResource.encode(message.persistentResource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.persistentResourceId != null && Object.hasOwnProperty.call(message, "persistentResourceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.persistentResourceId); + return writer; + }; + + /** + * Encodes the specified CreatePersistentResourceRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest} message CreatePersistentResourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePersistentResourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePersistentResourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest} CreatePersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePersistentResourceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.persistentResource = $root.google.cloud.aiplatform.v1beta1.PersistentResource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.persistentResourceId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePersistentResourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest} CreatePersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePersistentResourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePersistentResourceRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePersistentResourceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.persistentResource != null && message.hasOwnProperty("persistentResource")) { + var error = $root.google.cloud.aiplatform.v1beta1.PersistentResource.verify(message.persistentResource); + if (error) + return "persistentResource." + error; + } + if (message.persistentResourceId != null && message.hasOwnProperty("persistentResourceId")) + if (!$util.isString(message.persistentResourceId)) + return "persistentResourceId: string expected"; + return null; + }; + + /** + * Creates a CreatePersistentResourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest} CreatePersistentResourceRequest + */ + CreatePersistentResourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.persistentResource != null) { + if (typeof object.persistentResource !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest.persistentResource: object expected"); + message.persistentResource = $root.google.cloud.aiplatform.v1beta1.PersistentResource.fromObject(object.persistentResource); + } + if (object.persistentResourceId != null) + message.persistentResourceId = String(object.persistentResourceId); + return message; + }; + + /** + * Creates a plain object from a CreatePersistentResourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest} message CreatePersistentResourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePersistentResourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.persistentResource = null; + object.persistentResourceId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.persistentResource != null && message.hasOwnProperty("persistentResource")) + object.persistentResource = $root.google.cloud.aiplatform.v1beta1.PersistentResource.toObject(message.persistentResource, options); + if (message.persistentResourceId != null && message.hasOwnProperty("persistentResourceId")) + object.persistentResourceId = message.persistentResourceId; + return object; + }; + + /** + * Converts this CreatePersistentResourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePersistentResourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePersistentResourceRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePersistentResourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest"; + }; + + return CreatePersistentResourceRequest; + })(); + + v1beta1.CreatePersistentResourceOperationMetadata = (function() { + + /** + * Properties of a CreatePersistentResourceOperationMetadata. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ICreatePersistentResourceOperationMetadata + * @property {google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null} [genericMetadata] CreatePersistentResourceOperationMetadata genericMetadata + */ + + /** + * Constructs a new CreatePersistentResourceOperationMetadata. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a CreatePersistentResourceOperationMetadata. + * @implements ICreatePersistentResourceOperationMetadata + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata=} [properties] Properties to set + */ + function CreatePersistentResourceOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePersistentResourceOperationMetadata genericMetadata. + * @member {google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null|undefined} genericMetadata + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @instance + */ + CreatePersistentResourceOperationMetadata.prototype.genericMetadata = null; + + /** + * Creates a new CreatePersistentResourceOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata} CreatePersistentResourceOperationMetadata instance + */ + CreatePersistentResourceOperationMetadata.create = function create(properties) { + return new CreatePersistentResourceOperationMetadata(properties); + }; + + /** + * Encodes the specified CreatePersistentResourceOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata} message CreatePersistentResourceOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePersistentResourceOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.genericMetadata != null && Object.hasOwnProperty.call(message, "genericMetadata")) + $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.encode(message.genericMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePersistentResourceOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata} message CreatePersistentResourceOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePersistentResourceOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePersistentResourceOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata} CreatePersistentResourceOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePersistentResourceOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePersistentResourceOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata} CreatePersistentResourceOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePersistentResourceOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePersistentResourceOperationMetadata message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePersistentResourceOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) { + var error = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.verify(message.genericMetadata); + if (error) + return "genericMetadata." + error; + } + return null; + }; + + /** + * Creates a CreatePersistentResourceOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata} CreatePersistentResourceOperationMetadata + */ + CreatePersistentResourceOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata(); + if (object.genericMetadata != null) { + if (typeof object.genericMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata.genericMetadata: object expected"); + message.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.fromObject(object.genericMetadata); + } + return message; + }; + + /** + * Creates a plain object from a CreatePersistentResourceOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata} message CreatePersistentResourceOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePersistentResourceOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.genericMetadata = null; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) + object.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.toObject(message.genericMetadata, options); + return object; + }; + + /** + * Converts this CreatePersistentResourceOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + CreatePersistentResourceOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePersistentResourceOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePersistentResourceOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata"; + }; + + return CreatePersistentResourceOperationMetadata; + })(); + + v1beta1.GetPersistentResourceRequest = (function() { + + /** + * Properties of a GetPersistentResourceRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IGetPersistentResourceRequest + * @property {string|null} [name] GetPersistentResourceRequest name + */ + + /** + * Constructs a new GetPersistentResourceRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a GetPersistentResourceRequest. + * @implements IGetPersistentResourceRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest=} [properties] Properties to set + */ + function GetPersistentResourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPersistentResourceRequest name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @instance + */ + GetPersistentResourceRequest.prototype.name = ""; + + /** + * Creates a new GetPersistentResourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest} GetPersistentResourceRequest instance + */ + GetPersistentResourceRequest.create = function create(properties) { + return new GetPersistentResourceRequest(properties); + }; + + /** + * Encodes the specified GetPersistentResourceRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest} message GetPersistentResourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPersistentResourceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetPersistentResourceRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest} message GetPersistentResourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPersistentResourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPersistentResourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest} GetPersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPersistentResourceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPersistentResourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest} GetPersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPersistentResourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPersistentResourceRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPersistentResourceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetPersistentResourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest} GetPersistentResourceRequest + */ + GetPersistentResourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPersistentResourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest} message GetPersistentResourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPersistentResourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetPersistentResourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @instance + * @returns {Object.} JSON object + */ + GetPersistentResourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPersistentResourceRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPersistentResourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest"; + }; + + return GetPersistentResourceRequest; + })(); + + v1beta1.ListPersistentResourcesRequest = (function() { + + /** + * Properties of a ListPersistentResourcesRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IListPersistentResourcesRequest + * @property {string|null} [parent] ListPersistentResourcesRequest parent + * @property {number|null} [pageSize] ListPersistentResourcesRequest pageSize + * @property {string|null} [pageToken] ListPersistentResourcesRequest pageToken + */ + + /** + * Constructs a new ListPersistentResourcesRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ListPersistentResourcesRequest. + * @implements IListPersistentResourcesRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest=} [properties] Properties to set + */ + function ListPersistentResourcesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPersistentResourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @instance + */ + ListPersistentResourcesRequest.prototype.parent = ""; + + /** + * ListPersistentResourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @instance + */ + ListPersistentResourcesRequest.prototype.pageSize = 0; + + /** + * ListPersistentResourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @instance + */ + ListPersistentResourcesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPersistentResourcesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest} ListPersistentResourcesRequest instance + */ + ListPersistentResourcesRequest.create = function create(properties) { + return new ListPersistentResourcesRequest(properties); + }; + + /** + * Encodes the specified ListPersistentResourcesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest} message ListPersistentResourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPersistentResourcesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListPersistentResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest} message ListPersistentResourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPersistentResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPersistentResourcesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest} ListPersistentResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPersistentResourcesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPersistentResourcesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest} ListPersistentResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPersistentResourcesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPersistentResourcesRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPersistentResourcesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListPersistentResourcesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest} ListPersistentResourcesRequest + */ + ListPersistentResourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListPersistentResourcesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest} message ListPersistentResourcesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPersistentResourcesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListPersistentResourcesRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @instance + * @returns {Object.} JSON object + */ + ListPersistentResourcesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPersistentResourcesRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPersistentResourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest"; + }; + + return ListPersistentResourcesRequest; + })(); + + v1beta1.ListPersistentResourcesResponse = (function() { + + /** + * Properties of a ListPersistentResourcesResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IListPersistentResourcesResponse + * @property {Array.|null} [persistentResources] ListPersistentResourcesResponse persistentResources + * @property {string|null} [nextPageToken] ListPersistentResourcesResponse nextPageToken + */ + + /** + * Constructs a new ListPersistentResourcesResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ListPersistentResourcesResponse. + * @implements IListPersistentResourcesResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse=} [properties] Properties to set + */ + function ListPersistentResourcesResponse(properties) { + this.persistentResources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPersistentResourcesResponse persistentResources. + * @member {Array.} persistentResources + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @instance + */ + ListPersistentResourcesResponse.prototype.persistentResources = $util.emptyArray; + + /** + * ListPersistentResourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @instance + */ + ListPersistentResourcesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPersistentResourcesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse} ListPersistentResourcesResponse instance + */ + ListPersistentResourcesResponse.create = function create(properties) { + return new ListPersistentResourcesResponse(properties); + }; + + /** + * Encodes the specified ListPersistentResourcesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse} message ListPersistentResourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPersistentResourcesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.persistentResources != null && message.persistentResources.length) + for (var i = 0; i < message.persistentResources.length; ++i) + $root.google.cloud.aiplatform.v1beta1.PersistentResource.encode(message.persistentResources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListPersistentResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse} message ListPersistentResourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPersistentResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPersistentResourcesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse} ListPersistentResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPersistentResourcesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.persistentResources && message.persistentResources.length)) + message.persistentResources = []; + message.persistentResources.push($root.google.cloud.aiplatform.v1beta1.PersistentResource.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPersistentResourcesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse} ListPersistentResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPersistentResourcesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPersistentResourcesResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPersistentResourcesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.persistentResources != null && message.hasOwnProperty("persistentResources")) { + if (!Array.isArray(message.persistentResources)) + return "persistentResources: array expected"; + for (var i = 0; i < message.persistentResources.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.PersistentResource.verify(message.persistentResources[i]); + if (error) + return "persistentResources." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPersistentResourcesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse} ListPersistentResourcesResponse + */ + ListPersistentResourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse(); + if (object.persistentResources) { + if (!Array.isArray(object.persistentResources)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse.persistentResources: array expected"); + message.persistentResources = []; + for (var i = 0; i < object.persistentResources.length; ++i) { + if (typeof object.persistentResources[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse.persistentResources: object expected"); + message.persistentResources[i] = $root.google.cloud.aiplatform.v1beta1.PersistentResource.fromObject(object.persistentResources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPersistentResourcesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse} message ListPersistentResourcesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPersistentResourcesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.persistentResources = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.persistentResources && message.persistentResources.length) { + object.persistentResources = []; + for (var j = 0; j < message.persistentResources.length; ++j) + object.persistentResources[j] = $root.google.cloud.aiplatform.v1beta1.PersistentResource.toObject(message.persistentResources[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPersistentResourcesResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @instance + * @returns {Object.} JSON object + */ + ListPersistentResourcesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPersistentResourcesResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPersistentResourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse"; + }; + + return ListPersistentResourcesResponse; + })(); + + v1beta1.DeletePersistentResourceRequest = (function() { + + /** + * Properties of a DeletePersistentResourceRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IDeletePersistentResourceRequest + * @property {string|null} [name] DeletePersistentResourceRequest name + */ + + /** + * Constructs a new DeletePersistentResourceRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a DeletePersistentResourceRequest. + * @implements IDeletePersistentResourceRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest=} [properties] Properties to set + */ + function DeletePersistentResourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePersistentResourceRequest name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @instance + */ + DeletePersistentResourceRequest.prototype.name = ""; + + /** + * Creates a new DeletePersistentResourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest} DeletePersistentResourceRequest instance + */ + DeletePersistentResourceRequest.create = function create(properties) { + return new DeletePersistentResourceRequest(properties); + }; + + /** + * Encodes the specified DeletePersistentResourceRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest} message DeletePersistentResourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePersistentResourceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeletePersistentResourceRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest} message DeletePersistentResourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePersistentResourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePersistentResourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest} DeletePersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePersistentResourceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePersistentResourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest} DeletePersistentResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePersistentResourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePersistentResourceRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePersistentResourceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeletePersistentResourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest} DeletePersistentResourceRequest + */ + DeletePersistentResourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeletePersistentResourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest} message DeletePersistentResourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePersistentResourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeletePersistentResourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePersistentResourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeletePersistentResourceRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePersistentResourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest"; + }; + + return DeletePersistentResourceRequest; + })(); + + /** + * PipelineFailurePolicy enum. + * @name google.cloud.aiplatform.v1beta1.PipelineFailurePolicy + * @enum {number} + * @property {number} PIPELINE_FAILURE_POLICY_UNSPECIFIED=0 PIPELINE_FAILURE_POLICY_UNSPECIFIED value + * @property {number} PIPELINE_FAILURE_POLICY_FAIL_SLOW=1 PIPELINE_FAILURE_POLICY_FAIL_SLOW value + * @property {number} PIPELINE_FAILURE_POLICY_FAIL_FAST=2 PIPELINE_FAILURE_POLICY_FAIL_FAST value + */ + v1beta1.PipelineFailurePolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PIPELINE_FAILURE_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "PIPELINE_FAILURE_POLICY_FAIL_SLOW"] = 1; + values[valuesById[2] = "PIPELINE_FAILURE_POLICY_FAIL_FAST"] = 2; + return values; + })(); + + v1beta1.PipelineJob = (function() { + + /** + * Properties of a PipelineJob. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IPipelineJob + * @property {string|null} [name] PipelineJob name + * @property {string|null} [displayName] PipelineJob displayName + * @property {google.protobuf.ITimestamp|null} [createTime] PipelineJob createTime + * @property {google.protobuf.ITimestamp|null} [startTime] PipelineJob startTime + * @property {google.protobuf.ITimestamp|null} [endTime] PipelineJob endTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PipelineJob updateTime + * @property {google.protobuf.IStruct|null} [pipelineSpec] PipelineJob pipelineSpec + * @property {google.cloud.aiplatform.v1beta1.PipelineState|null} [state] PipelineJob state + * @property {google.cloud.aiplatform.v1beta1.IPipelineJobDetail|null} [jobDetail] PipelineJob jobDetail + * @property {google.rpc.IStatus|null} [error] PipelineJob error + * @property {Object.|null} [labels] PipelineJob labels + * @property {google.cloud.aiplatform.v1beta1.PipelineJob.IRuntimeConfig|null} [runtimeConfig] PipelineJob runtimeConfig + * @property {google.cloud.aiplatform.v1beta1.IEncryptionSpec|null} [encryptionSpec] PipelineJob encryptionSpec + * @property {string|null} [serviceAccount] PipelineJob serviceAccount + * @property {string|null} [network] PipelineJob network + * @property {Array.|null} [reservedIpRanges] PipelineJob reservedIpRanges + * @property {string|null} [templateUri] PipelineJob templateUri + * @property {google.cloud.aiplatform.v1beta1.IPipelineTemplateMetadata|null} [templateMetadata] PipelineJob templateMetadata + */ + + /** + * Constructs a new PipelineJob. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PipelineJob. + * @implements IPipelineJob + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IPipelineJob=} [properties] Properties to set + */ + function PipelineJob(properties) { + this.labels = {}; + this.reservedIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PipelineJob name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.name = ""; + + /** + * PipelineJob displayName. + * @member {string} displayName + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.displayName = ""; + + /** + * PipelineJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.createTime = null; + + /** + * PipelineJob startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.startTime = null; + + /** + * PipelineJob endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.endTime = null; + + /** + * PipelineJob updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.updateTime = null; + + /** + * PipelineJob pipelineSpec. + * @member {google.protobuf.IStruct|null|undefined} pipelineSpec + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.pipelineSpec = null; + + /** + * PipelineJob state. + * @member {google.cloud.aiplatform.v1beta1.PipelineState} state + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.state = 0; + + /** + * PipelineJob jobDetail. + * @member {google.cloud.aiplatform.v1beta1.IPipelineJobDetail|null|undefined} jobDetail + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.jobDetail = null; + + /** + * PipelineJob error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.error = null; + + /** + * PipelineJob labels. + * @member {Object.} labels + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.labels = $util.emptyObject; + + /** + * PipelineJob runtimeConfig. + * @member {google.cloud.aiplatform.v1beta1.PipelineJob.IRuntimeConfig|null|undefined} runtimeConfig + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.runtimeConfig = null; + + /** + * PipelineJob encryptionSpec. + * @member {google.cloud.aiplatform.v1beta1.IEncryptionSpec|null|undefined} encryptionSpec + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.encryptionSpec = null; + + /** + * PipelineJob serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.serviceAccount = ""; + + /** + * PipelineJob network. + * @member {string} network + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.network = ""; + + /** + * PipelineJob reservedIpRanges. + * @member {Array.} reservedIpRanges + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.reservedIpRanges = $util.emptyArray; + + /** + * PipelineJob templateUri. + * @member {string} templateUri + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.templateUri = ""; + + /** + * PipelineJob templateMetadata. + * @member {google.cloud.aiplatform.v1beta1.IPipelineTemplateMetadata|null|undefined} templateMetadata + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @instance + */ + PipelineJob.prototype.templateMetadata = null; + + /** + * Creates a new PipelineJob instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @static + * @param {google.cloud.aiplatform.v1beta1.IPipelineJob=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PipelineJob} PipelineJob instance + */ + PipelineJob.create = function create(properties) { + return new PipelineJob(properties); + }; + + /** + * Encodes the specified PipelineJob message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PipelineJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @static + * @param {google.cloud.aiplatform.v1beta1.IPipelineJob} message PipelineJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PipelineJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.pipelineSpec != null && Object.hasOwnProperty.call(message, "pipelineSpec")) + $root.google.protobuf.Struct.encode(message.pipelineSpec, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.jobDetail != null && Object.hasOwnProperty.call(message, "jobDetail")) + $root.google.cloud.aiplatform.v1beta1.PipelineJobDetail.encode(message.jobDetail, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.runtimeConfig != null && Object.hasOwnProperty.call(message, "runtimeConfig")) + $root.google.cloud.aiplatform.v1beta1.PipelineJob.RuntimeConfig.encode(message.runtimeConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) + $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.serviceAccount); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.network); + if (message.templateUri != null && Object.hasOwnProperty.call(message, "templateUri")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.templateUri); + if (message.templateMetadata != null && Object.hasOwnProperty.call(message, "templateMetadata")) + $root.google.cloud.aiplatform.v1beta1.PipelineTemplateMetadata.encode(message.templateMetadata, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.reservedIpRanges != null && message.reservedIpRanges.length) + for (var i = 0; i < message.reservedIpRanges.length; ++i) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.reservedIpRanges[i]); + return writer; + }; + + /** + * Encodes the specified PipelineJob message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PipelineJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @static + * @param {google.cloud.aiplatform.v1beta1.IPipelineJob} message PipelineJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PipelineJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PipelineJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PipelineJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.PipelineJob} PipelineJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PipelineJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.PipelineJob(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.pipelineSpec = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.jobDetail = $root.google.cloud.aiplatform.v1beta1.PipelineJobDetail.decode(reader, reader.uint32()); + break; + } + case 10: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 11: { if (message.labels === $util.emptyObject) message.labels = {}; var end2 = reader.uint32() + reader.pos; @@ -331138,6 +335125,12 @@ message.network = reader.string(); break; } + case 25: { + if (!(message.reservedIpRanges && message.reservedIpRanges.length)) + message.reservedIpRanges = []; + message.reservedIpRanges.push(reader.string()); + break; + } case 19: { message.templateUri = reader.string(); break; @@ -331261,6 +335254,13 @@ if (message.network != null && message.hasOwnProperty("network")) if (!$util.isString(message.network)) return "network: string expected"; + if (message.reservedIpRanges != null && message.hasOwnProperty("reservedIpRanges")) { + if (!Array.isArray(message.reservedIpRanges)) + return "reservedIpRanges: array expected"; + for (var i = 0; i < message.reservedIpRanges.length; ++i) + if (!$util.isString(message.reservedIpRanges[i])) + return "reservedIpRanges: string[] expected"; + } if (message.templateUri != null && message.hasOwnProperty("templateUri")) if (!$util.isString(message.templateUri)) return "templateUri: string expected"; @@ -331388,6 +335388,13 @@ message.serviceAccount = String(object.serviceAccount); if (object.network != null) message.network = String(object.network); + if (object.reservedIpRanges) { + if (!Array.isArray(object.reservedIpRanges)) + throw TypeError(".google.cloud.aiplatform.v1beta1.PipelineJob.reservedIpRanges: array expected"); + message.reservedIpRanges = []; + for (var i = 0; i < object.reservedIpRanges.length; ++i) + message.reservedIpRanges[i] = String(object.reservedIpRanges[i]); + } if (object.templateUri != null) message.templateUri = String(object.templateUri); if (object.templateMetadata != null) { @@ -331411,6 +335418,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.reservedIpRanges = []; if (options.objects || options.defaults) object.labels = {}; if (options.defaults) { @@ -331469,6 +335478,11 @@ object.templateUri = message.templateUri; if (message.templateMetadata != null && message.hasOwnProperty("templateMetadata")) object.templateMetadata = $root.google.cloud.aiplatform.v1beta1.PipelineTemplateMetadata.toObject(message.templateMetadata, options); + if (message.reservedIpRanges && message.reservedIpRanges.length) { + object.reservedIpRanges = []; + for (var j = 0; j < message.reservedIpRanges.length; ++j) + object.reservedIpRanges[j] = message.reservedIpRanges[j]; + } return object; }; @@ -377768,39 +381782,6 @@ * @variation 2 */ - /** - * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|readTensorboardUsage}. - * @memberof google.cloud.aiplatform.v1beta1.TensorboardService - * @typedef ReadTensorboardUsageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1beta1.ReadTensorboardUsageResponse} [response] ReadTensorboardUsageResponse - */ - - /** - * Calls ReadTensorboardUsage. - * @function readTensorboardUsage - * @memberof google.cloud.aiplatform.v1beta1.TensorboardService - * @instance - * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardUsageRequest} request ReadTensorboardUsageRequest message or plain object - * @param {google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsageCallback} callback Node-style callback called with the error, if any, and ReadTensorboardUsageResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TensorboardService.prototype.readTensorboardUsage = function readTensorboardUsage(request, callback) { - return this.rpcCall(readTensorboardUsage, $root.google.cloud.aiplatform.v1beta1.ReadTensorboardUsageRequest, $root.google.cloud.aiplatform.v1beta1.ReadTensorboardUsageResponse, request, callback); - }, "name", { value: "ReadTensorboardUsage" }); - - /** - * Calls ReadTensorboardUsage. - * @function readTensorboardUsage - * @memberof google.cloud.aiplatform.v1beta1.TensorboardService - * @instance - * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardUsageRequest} request ReadTensorboardUsageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|updateTensorboard}. * @memberof google.cloud.aiplatform.v1beta1.TensorboardService @@ -377862,41 +381843,107 @@ * @function listTensorboards * @memberof google.cloud.aiplatform.v1beta1.TensorboardService * @instance - * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsRequest} request ListTensorboardsRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsRequest} request ListTensorboardsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|deleteTensorboard}. + * @memberof google.cloud.aiplatform.v1beta1.TensorboardService + * @typedef DeleteTensorboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteTensorboard. + * @function deleteTensorboard + * @memberof google.cloud.aiplatform.v1beta1.TensorboardService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest} request DeleteTensorboardRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.TensorboardService.DeleteTensorboardCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TensorboardService.prototype.deleteTensorboard = function deleteTensorboard(request, callback) { + return this.rpcCall(deleteTensorboard, $root.google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTensorboard" }); + + /** + * Calls DeleteTensorboard. + * @function deleteTensorboard + * @memberof google.cloud.aiplatform.v1beta1.TensorboardService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest} request DeleteTensorboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|readTensorboardUsage}. + * @memberof google.cloud.aiplatform.v1beta1.TensorboardService + * @typedef ReadTensorboardUsageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.ReadTensorboardUsageResponse} [response] ReadTensorboardUsageResponse + */ + + /** + * Calls ReadTensorboardUsage. + * @function readTensorboardUsage + * @memberof google.cloud.aiplatform.v1beta1.TensorboardService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardUsageRequest} request ReadTensorboardUsageRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsageCallback} callback Node-style callback called with the error, if any, and ReadTensorboardUsageResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TensorboardService.prototype.readTensorboardUsage = function readTensorboardUsage(request, callback) { + return this.rpcCall(readTensorboardUsage, $root.google.cloud.aiplatform.v1beta1.ReadTensorboardUsageRequest, $root.google.cloud.aiplatform.v1beta1.ReadTensorboardUsageResponse, request, callback); + }, "name", { value: "ReadTensorboardUsage" }); + + /** + * Calls ReadTensorboardUsage. + * @function readTensorboardUsage + * @memberof google.cloud.aiplatform.v1beta1.TensorboardService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardUsageRequest} request ReadTensorboardUsageRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|deleteTensorboard}. + * Callback as used by {@link google.cloud.aiplatform.v1beta1.TensorboardService|readTensorboardSize}. * @memberof google.cloud.aiplatform.v1beta1.TensorboardService - * @typedef DeleteTensorboardCallback + * @typedef ReadTensorboardSizeCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * @param {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse} [response] ReadTensorboardSizeResponse */ /** - * Calls DeleteTensorboard. - * @function deleteTensorboard + * Calls ReadTensorboardSize. + * @function readTensorboardSize * @memberof google.cloud.aiplatform.v1beta1.TensorboardService * @instance - * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest} request DeleteTensorboardRequest message or plain object - * @param {google.cloud.aiplatform.v1beta1.TensorboardService.DeleteTensorboardCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest} request ReadTensorboardSizeRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardSizeCallback} callback Node-style callback called with the error, if any, and ReadTensorboardSizeResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(TensorboardService.prototype.deleteTensorboard = function deleteTensorboard(request, callback) { - return this.rpcCall(deleteTensorboard, $root.google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteTensorboard" }); + Object.defineProperty(TensorboardService.prototype.readTensorboardSize = function readTensorboardSize(request, callback) { + return this.rpcCall(readTensorboardSize, $root.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest, $root.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse, request, callback); + }, "name", { value: "ReadTensorboardSize" }); /** - * Calls DeleteTensorboard. - * @function deleteTensorboard + * Calls ReadTensorboardSize. + * @function readTensorboardSize * @memberof google.cloud.aiplatform.v1beta1.TensorboardService * @instance - * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest} request DeleteTensorboardRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest} request ReadTensorboardSizeRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ @@ -378659,28 +382706,1035 @@ * @variation 2 */ - return TensorboardService; + return TensorboardService; + })(); + + v1beta1.CreateTensorboardRequest = (function() { + + /** + * Properties of a CreateTensorboardRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ICreateTensorboardRequest + * @property {string|null} [parent] CreateTensorboardRequest parent + * @property {google.cloud.aiplatform.v1beta1.ITensorboard|null} [tensorboard] CreateTensorboardRequest tensorboard + */ + + /** + * Constructs a new CreateTensorboardRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a CreateTensorboardRequest. + * @implements ICreateTensorboardRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ICreateTensorboardRequest=} [properties] Properties to set + */ + function CreateTensorboardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTensorboardRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @instance + */ + CreateTensorboardRequest.prototype.parent = ""; + + /** + * CreateTensorboardRequest tensorboard. + * @member {google.cloud.aiplatform.v1beta1.ITensorboard|null|undefined} tensorboard + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @instance + */ + CreateTensorboardRequest.prototype.tensorboard = null; + + /** + * Creates a new CreateTensorboardRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreateTensorboardRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.CreateTensorboardRequest} CreateTensorboardRequest instance + */ + CreateTensorboardRequest.create = function create(properties) { + return new CreateTensorboardRequest(properties); + }; + + /** + * Encodes the specified CreateTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateTensorboardRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreateTensorboardRequest} message CreateTensorboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTensorboardRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.tensorboard != null && Object.hasOwnProperty.call(message, "tensorboard")) + $root.google.cloud.aiplatform.v1beta1.Tensorboard.encode(message.tensorboard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateTensorboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreateTensorboardRequest} message CreateTensorboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTensorboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTensorboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.CreateTensorboardRequest} CreateTensorboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTensorboardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.CreateTensorboardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.tensorboard = $root.google.cloud.aiplatform.v1beta1.Tensorboard.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTensorboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.CreateTensorboardRequest} CreateTensorboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTensorboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTensorboardRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTensorboardRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) { + var error = $root.google.cloud.aiplatform.v1beta1.Tensorboard.verify(message.tensorboard); + if (error) + return "tensorboard." + error; + } + return null; + }; + + /** + * Creates a CreateTensorboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.CreateTensorboardRequest} CreateTensorboardRequest + */ + CreateTensorboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.CreateTensorboardRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.CreateTensorboardRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tensorboard != null) { + if (typeof object.tensorboard !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.CreateTensorboardRequest.tensorboard: object expected"); + message.tensorboard = $root.google.cloud.aiplatform.v1beta1.Tensorboard.fromObject(object.tensorboard); + } + return message; + }; + + /** + * Creates a plain object from a CreateTensorboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.CreateTensorboardRequest} message CreateTensorboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTensorboardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.tensorboard = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) + object.tensorboard = $root.google.cloud.aiplatform.v1beta1.Tensorboard.toObject(message.tensorboard, options); + return object; + }; + + /** + * Converts this CreateTensorboardRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTensorboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTensorboardRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTensorboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.CreateTensorboardRequest"; + }; + + return CreateTensorboardRequest; + })(); + + v1beta1.GetTensorboardRequest = (function() { + + /** + * Properties of a GetTensorboardRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IGetTensorboardRequest + * @property {string|null} [name] GetTensorboardRequest name + */ + + /** + * Constructs a new GetTensorboardRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a GetTensorboardRequest. + * @implements IGetTensorboardRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IGetTensorboardRequest=} [properties] Properties to set + */ + function GetTensorboardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTensorboardRequest name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @instance + */ + GetTensorboardRequest.prototype.name = ""; + + /** + * Creates a new GetTensorboardRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetTensorboardRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.GetTensorboardRequest} GetTensorboardRequest instance + */ + GetTensorboardRequest.create = function create(properties) { + return new GetTensorboardRequest(properties); + }; + + /** + * Encodes the specified GetTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetTensorboardRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetTensorboardRequest} message GetTensorboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTensorboardRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetTensorboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetTensorboardRequest} message GetTensorboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTensorboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTensorboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.GetTensorboardRequest} GetTensorboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTensorboardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.GetTensorboardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTensorboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.GetTensorboardRequest} GetTensorboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTensorboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTensorboardRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTensorboardRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetTensorboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.GetTensorboardRequest} GetTensorboardRequest + */ + GetTensorboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.GetTensorboardRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.GetTensorboardRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTensorboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.GetTensorboardRequest} message GetTensorboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTensorboardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetTensorboardRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @instance + * @returns {Object.} JSON object + */ + GetTensorboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetTensorboardRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTensorboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.GetTensorboardRequest"; + }; + + return GetTensorboardRequest; + })(); + + v1beta1.ListTensorboardsRequest = (function() { + + /** + * Properties of a ListTensorboardsRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IListTensorboardsRequest + * @property {string|null} [parent] ListTensorboardsRequest parent + * @property {string|null} [filter] ListTensorboardsRequest filter + * @property {number|null} [pageSize] ListTensorboardsRequest pageSize + * @property {string|null} [pageToken] ListTensorboardsRequest pageToken + * @property {string|null} [orderBy] ListTensorboardsRequest orderBy + * @property {google.protobuf.IFieldMask|null} [readMask] ListTensorboardsRequest readMask + */ + + /** + * Constructs a new ListTensorboardsRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ListTensorboardsRequest. + * @implements IListTensorboardsRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsRequest=} [properties] Properties to set + */ + function ListTensorboardsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTensorboardsRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @instance + */ + ListTensorboardsRequest.prototype.parent = ""; + + /** + * ListTensorboardsRequest filter. + * @member {string} filter + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @instance + */ + ListTensorboardsRequest.prototype.filter = ""; + + /** + * ListTensorboardsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @instance + */ + ListTensorboardsRequest.prototype.pageSize = 0; + + /** + * ListTensorboardsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @instance + */ + ListTensorboardsRequest.prototype.pageToken = ""; + + /** + * ListTensorboardsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @instance + */ + ListTensorboardsRequest.prototype.orderBy = ""; + + /** + * ListTensorboardsRequest readMask. + * @member {google.protobuf.IFieldMask|null|undefined} readMask + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @instance + */ + ListTensorboardsRequest.prototype.readMask = null; + + /** + * Creates a new ListTensorboardsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsRequest} ListTensorboardsRequest instance + */ + ListTensorboardsRequest.create = function create(properties) { + return new ListTensorboardsRequest(properties); + }; + + /** + * Encodes the specified ListTensorboardsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsRequest} message ListTensorboardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTensorboardsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) + $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListTensorboardsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsRequest} message ListTensorboardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTensorboardsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTensorboardsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsRequest} ListTensorboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTensorboardsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ListTensorboardsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + case 6: { + message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTensorboardsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsRequest} ListTensorboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTensorboardsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTensorboardsRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTensorboardsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.readMask != null && message.hasOwnProperty("readMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.readMask); + if (error) + return "readMask." + error; + } + return null; + }; + + /** + * Creates a ListTensorboardsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsRequest} ListTensorboardsRequest + */ + ListTensorboardsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ListTensorboardsRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ListTensorboardsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.readMask != null) { + if (typeof object.readMask !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ListTensorboardsRequest.readMask: object expected"); + message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); + } + return message; + }; + + /** + * Creates a plain object from a ListTensorboardsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ListTensorboardsRequest} message ListTensorboardsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTensorboardsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.readMask = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.readMask != null && message.hasOwnProperty("readMask")) + object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); + return object; + }; + + /** + * Converts this ListTensorboardsRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTensorboardsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTensorboardsRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTensorboardsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ListTensorboardsRequest"; + }; + + return ListTensorboardsRequest; + })(); + + v1beta1.ListTensorboardsResponse = (function() { + + /** + * Properties of a ListTensorboardsResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IListTensorboardsResponse + * @property {Array.|null} [tensorboards] ListTensorboardsResponse tensorboards + * @property {string|null} [nextPageToken] ListTensorboardsResponse nextPageToken + */ + + /** + * Constructs a new ListTensorboardsResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ListTensorboardsResponse. + * @implements IListTensorboardsResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsResponse=} [properties] Properties to set + */ + function ListTensorboardsResponse(properties) { + this.tensorboards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTensorboardsResponse tensorboards. + * @member {Array.} tensorboards + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @instance + */ + ListTensorboardsResponse.prototype.tensorboards = $util.emptyArray; + + /** + * ListTensorboardsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @instance + */ + ListTensorboardsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTensorboardsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsResponse} ListTensorboardsResponse instance + */ + ListTensorboardsResponse.create = function create(properties) { + return new ListTensorboardsResponse(properties); + }; + + /** + * Encodes the specified ListTensorboardsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsResponse} message ListTensorboardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTensorboardsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tensorboards != null && message.tensorboards.length) + for (var i = 0; i < message.tensorboards.length; ++i) + $root.google.cloud.aiplatform.v1beta1.Tensorboard.encode(message.tensorboards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListTensorboardsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsResponse} message ListTensorboardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTensorboardsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTensorboardsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsResponse} ListTensorboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTensorboardsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ListTensorboardsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.tensorboards && message.tensorboards.length)) + message.tensorboards = []; + message.tensorboards.push($root.google.cloud.aiplatform.v1beta1.Tensorboard.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTensorboardsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsResponse} ListTensorboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTensorboardsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTensorboardsResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTensorboardsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tensorboards != null && message.hasOwnProperty("tensorboards")) { + if (!Array.isArray(message.tensorboards)) + return "tensorboards: array expected"; + for (var i = 0; i < message.tensorboards.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.Tensorboard.verify(message.tensorboards[i]); + if (error) + return "tensorboards." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListTensorboardsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsResponse} ListTensorboardsResponse + */ + ListTensorboardsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ListTensorboardsResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ListTensorboardsResponse(); + if (object.tensorboards) { + if (!Array.isArray(object.tensorboards)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.tensorboards: array expected"); + message.tensorboards = []; + for (var i = 0; i < object.tensorboards.length; ++i) { + if (typeof object.tensorboards[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.tensorboards: object expected"); + message.tensorboards[i] = $root.google.cloud.aiplatform.v1beta1.Tensorboard.fromObject(object.tensorboards[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListTensorboardsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.ListTensorboardsResponse} message ListTensorboardsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTensorboardsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tensorboards = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.tensorboards && message.tensorboards.length) { + object.tensorboards = []; + for (var j = 0; j < message.tensorboards.length; ++j) + object.tensorboards[j] = $root.google.cloud.aiplatform.v1beta1.Tensorboard.toObject(message.tensorboards[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListTensorboardsResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTensorboardsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTensorboardsResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTensorboardsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ListTensorboardsResponse"; + }; + + return ListTensorboardsResponse; })(); - v1beta1.CreateTensorboardRequest = (function() { + v1beta1.UpdateTensorboardRequest = (function() { /** - * Properties of a CreateTensorboardRequest. + * Properties of an UpdateTensorboardRequest. * @memberof google.cloud.aiplatform.v1beta1 - * @interface ICreateTensorboardRequest - * @property {string|null} [parent] CreateTensorboardRequest parent - * @property {google.cloud.aiplatform.v1beta1.ITensorboard|null} [tensorboard] CreateTensorboardRequest tensorboard + * @interface IUpdateTensorboardRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTensorboardRequest updateMask + * @property {google.cloud.aiplatform.v1beta1.ITensorboard|null} [tensorboard] UpdateTensorboardRequest tensorboard */ /** - * Constructs a new CreateTensorboardRequest. + * Constructs a new UpdateTensorboardRequest. * @memberof google.cloud.aiplatform.v1beta1 - * @classdesc Represents a CreateTensorboardRequest. - * @implements ICreateTensorboardRequest + * @classdesc Represents an UpdateTensorboardRequest. + * @implements IUpdateTensorboardRequest * @constructor - * @param {google.cloud.aiplatform.v1beta1.ICreateTensorboardRequest=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest=} [properties] Properties to set */ - function CreateTensorboardRequest(properties) { + function UpdateTensorboardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -378688,85 +383742,85 @@ } /** - * CreateTensorboardRequest parent. - * @member {string} parent - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * UpdateTensorboardRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @instance */ - CreateTensorboardRequest.prototype.parent = ""; + UpdateTensorboardRequest.prototype.updateMask = null; /** - * CreateTensorboardRequest tensorboard. + * UpdateTensorboardRequest tensorboard. * @member {google.cloud.aiplatform.v1beta1.ITensorboard|null|undefined} tensorboard - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @instance */ - CreateTensorboardRequest.prototype.tensorboard = null; + UpdateTensorboardRequest.prototype.tensorboard = null; /** - * Creates a new CreateTensorboardRequest instance using the specified properties. + * Creates a new UpdateTensorboardRequest instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @static - * @param {google.cloud.aiplatform.v1beta1.ICreateTensorboardRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1beta1.CreateTensorboardRequest} CreateTensorboardRequest instance + * @param {google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest} UpdateTensorboardRequest instance */ - CreateTensorboardRequest.create = function create(properties) { - return new CreateTensorboardRequest(properties); + UpdateTensorboardRequest.create = function create(properties) { + return new UpdateTensorboardRequest(properties); }; /** - * Encodes the specified CreateTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateTensorboardRequest.verify|verify} messages. + * Encodes the specified UpdateTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @static - * @param {google.cloud.aiplatform.v1beta1.ICreateTensorboardRequest} message CreateTensorboardRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest} message UpdateTensorboardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTensorboardRequest.encode = function encode(message, writer) { + UpdateTensorboardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.tensorboard != null && Object.hasOwnProperty.call(message, "tensorboard")) $root.google.cloud.aiplatform.v1beta1.Tensorboard.encode(message.tensorboard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateTensorboardRequest.verify|verify} messages. + * Encodes the specified UpdateTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @static - * @param {google.cloud.aiplatform.v1beta1.ICreateTensorboardRequest} message CreateTensorboardRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest} message UpdateTensorboardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTensorboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTensorboardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTensorboardRequest message from the specified reader or buffer. + * Decodes an UpdateTensorboardRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1beta1.CreateTensorboardRequest} CreateTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest} UpdateTensorboardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTensorboardRequest.decode = function decode(reader, length) { + UpdateTensorboardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.CreateTensorboardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { @@ -378782,35 +383836,37 @@ }; /** - * Decodes a CreateTensorboardRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateTensorboardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1beta1.CreateTensorboardRequest} CreateTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest} UpdateTensorboardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTensorboardRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateTensorboardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTensorboardRequest message. + * Verifies an UpdateTensorboardRequest message. * @function verify - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTensorboardRequest.verify = function verify(message) { + UpdateTensorboardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) { var error = $root.google.cloud.aiplatform.v1beta1.Tensorboard.verify(message.tensorboard); if (error) @@ -378820,98 +383876,101 @@ }; /** - * Creates a CreateTensorboardRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTensorboardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1beta1.CreateTensorboardRequest} CreateTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest} UpdateTensorboardRequest */ - CreateTensorboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1beta1.CreateTensorboardRequest) + UpdateTensorboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest) return object; - var message = new $root.google.cloud.aiplatform.v1beta1.CreateTensorboardRequest(); - if (object.parent != null) - message.parent = String(object.parent); + var message = new $root.google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } if (object.tensorboard != null) { if (typeof object.tensorboard !== "object") - throw TypeError(".google.cloud.aiplatform.v1beta1.CreateTensorboardRequest.tensorboard: object expected"); + throw TypeError(".google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.tensorboard: object expected"); message.tensorboard = $root.google.cloud.aiplatform.v1beta1.Tensorboard.fromObject(object.tensorboard); } return message; }; /** - * Creates a plain object from a CreateTensorboardRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTensorboardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @static - * @param {google.cloud.aiplatform.v1beta1.CreateTensorboardRequest} message CreateTensorboardRequest + * @param {google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest} message UpdateTensorboardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTensorboardRequest.toObject = function toObject(message, options) { + UpdateTensorboardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; + object.updateMask = null; object.tensorboard = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) object.tensorboard = $root.google.cloud.aiplatform.v1beta1.Tensorboard.toObject(message.tensorboard, options); return object; }; /** - * Converts this CreateTensorboardRequest to JSON. + * Converts this UpdateTensorboardRequest to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @instance * @returns {Object.} JSON object */ - CreateTensorboardRequest.prototype.toJSON = function toJSON() { + UpdateTensorboardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateTensorboardRequest + * Gets the default type url for UpdateTensorboardRequest * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1beta1.CreateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateTensorboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateTensorboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.CreateTensorboardRequest"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest"; }; - return CreateTensorboardRequest; + return UpdateTensorboardRequest; })(); - v1beta1.GetTensorboardRequest = (function() { + v1beta1.DeleteTensorboardRequest = (function() { /** - * Properties of a GetTensorboardRequest. + * Properties of a DeleteTensorboardRequest. * @memberof google.cloud.aiplatform.v1beta1 - * @interface IGetTensorboardRequest - * @property {string|null} [name] GetTensorboardRequest name + * @interface IDeleteTensorboardRequest + * @property {string|null} [name] DeleteTensorboardRequest name */ /** - * Constructs a new GetTensorboardRequest. + * Constructs a new DeleteTensorboardRequest. * @memberof google.cloud.aiplatform.v1beta1 - * @classdesc Represents a GetTensorboardRequest. - * @implements IGetTensorboardRequest + * @classdesc Represents a DeleteTensorboardRequest. + * @implements IDeleteTensorboardRequest * @constructor - * @param {google.cloud.aiplatform.v1beta1.IGetTensorboardRequest=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest=} [properties] Properties to set */ - function GetTensorboardRequest(properties) { + function DeleteTensorboardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -378919,35 +383978,35 @@ } /** - * GetTensorboardRequest name. + * DeleteTensorboardRequest name. * @member {string} name - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @instance */ - GetTensorboardRequest.prototype.name = ""; + DeleteTensorboardRequest.prototype.name = ""; /** - * Creates a new GetTensorboardRequest instance using the specified properties. + * Creates a new DeleteTensorboardRequest instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @static - * @param {google.cloud.aiplatform.v1beta1.IGetTensorboardRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1beta1.GetTensorboardRequest} GetTensorboardRequest instance + * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest} DeleteTensorboardRequest instance */ - GetTensorboardRequest.create = function create(properties) { - return new GetTensorboardRequest(properties); + DeleteTensorboardRequest.create = function create(properties) { + return new DeleteTensorboardRequest(properties); }; /** - * Encodes the specified GetTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetTensorboardRequest.verify|verify} messages. + * Encodes the specified DeleteTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @static - * @param {google.cloud.aiplatform.v1beta1.IGetTensorboardRequest} message GetTensorboardRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest} message DeleteTensorboardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTensorboardRequest.encode = function encode(message, writer) { + DeleteTensorboardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -378956,33 +384015,33 @@ }; /** - * Encodes the specified GetTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetTensorboardRequest.verify|verify} messages. + * Encodes the specified DeleteTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @static - * @param {google.cloud.aiplatform.v1beta1.IGetTensorboardRequest} message GetTensorboardRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest} message DeleteTensorboardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTensorboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTensorboardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTensorboardRequest message from the specified reader or buffer. + * Decodes a DeleteTensorboardRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1beta1.GetTensorboardRequest} GetTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest} DeleteTensorboardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTensorboardRequest.decode = function decode(reader, length) { + DeleteTensorboardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.GetTensorboardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -378999,30 +384058,30 @@ }; /** - * Decodes a GetTensorboardRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTensorboardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1beta1.GetTensorboardRequest} GetTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest} DeleteTensorboardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTensorboardRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteTensorboardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTensorboardRequest message. + * Verifies a DeleteTensorboardRequest message. * @function verify - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTensorboardRequest.verify = function verify(message) { + DeleteTensorboardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -379032,32 +384091,32 @@ }; /** - * Creates a GetTensorboardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTensorboardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1beta1.GetTensorboardRequest} GetTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest} DeleteTensorboardRequest */ - GetTensorboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1beta1.GetTensorboardRequest) + DeleteTensorboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest) return object; - var message = new $root.google.cloud.aiplatform.v1beta1.GetTensorboardRequest(); + var message = new $root.google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetTensorboardRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTensorboardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @static - * @param {google.cloud.aiplatform.v1beta1.GetTensorboardRequest} message GetTensorboardRequest + * @param {google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest} message DeleteTensorboardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTensorboardRequest.toObject = function toObject(message, options) { + DeleteTensorboardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -379069,32 +384128,32 @@ }; /** - * Converts this GetTensorboardRequest to JSON. + * Converts this DeleteTensorboardRequest to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @instance * @returns {Object.} JSON object */ - GetTensorboardRequest.prototype.toJSON = function toJSON() { + DeleteTensorboardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTensorboardRequest + * Gets the default type url for DeleteTensorboardRequest * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1beta1.GetTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTensorboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteTensorboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.GetTensorboardRequest"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest"; }; - return GetTensorboardRequest; + return DeleteTensorboardRequest; })(); v1beta1.ReadTensorboardUsageRequest = (function() { @@ -380010,597 +385069,24 @@ return ReadTensorboardUsageResponse; })(); - v1beta1.ListTensorboardsRequest = (function() { - - /** - * Properties of a ListTensorboardsRequest. - * @memberof google.cloud.aiplatform.v1beta1 - * @interface IListTensorboardsRequest - * @property {string|null} [parent] ListTensorboardsRequest parent - * @property {string|null} [filter] ListTensorboardsRequest filter - * @property {number|null} [pageSize] ListTensorboardsRequest pageSize - * @property {string|null} [pageToken] ListTensorboardsRequest pageToken - * @property {string|null} [orderBy] ListTensorboardsRequest orderBy - * @property {google.protobuf.IFieldMask|null} [readMask] ListTensorboardsRequest readMask - */ - - /** - * Constructs a new ListTensorboardsRequest. - * @memberof google.cloud.aiplatform.v1beta1 - * @classdesc Represents a ListTensorboardsRequest. - * @implements IListTensorboardsRequest - * @constructor - * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsRequest=} [properties] Properties to set - */ - function ListTensorboardsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTensorboardsRequest parent. - * @member {string} parent - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @instance - */ - ListTensorboardsRequest.prototype.parent = ""; - - /** - * ListTensorboardsRequest filter. - * @member {string} filter - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @instance - */ - ListTensorboardsRequest.prototype.filter = ""; - - /** - * ListTensorboardsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @instance - */ - ListTensorboardsRequest.prototype.pageSize = 0; - - /** - * ListTensorboardsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @instance - */ - ListTensorboardsRequest.prototype.pageToken = ""; - - /** - * ListTensorboardsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @instance - */ - ListTensorboardsRequest.prototype.orderBy = ""; - - /** - * ListTensorboardsRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @instance - */ - ListTensorboardsRequest.prototype.readMask = null; - - /** - * Creates a new ListTensorboardsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @static - * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsRequest} ListTensorboardsRequest instance - */ - ListTensorboardsRequest.create = function create(properties) { - return new ListTensorboardsRequest(properties); - }; - - /** - * Encodes the specified ListTensorboardsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @static - * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsRequest} message ListTensorboardsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTensorboardsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListTensorboardsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @static - * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsRequest} message ListTensorboardsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTensorboardsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTensorboardsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsRequest} ListTensorboardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTensorboardsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ListTensorboardsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - case 6: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTensorboardsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsRequest} ListTensorboardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTensorboardsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTensorboardsRequest message. - * @function verify - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTensorboardsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - return null; - }; - - /** - * Creates a ListTensorboardsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsRequest} ListTensorboardsRequest - */ - ListTensorboardsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1beta1.ListTensorboardsRequest) - return object; - var message = new $root.google.cloud.aiplatform.v1beta1.ListTensorboardsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.aiplatform.v1beta1.ListTensorboardsRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - return message; - }; - - /** - * Creates a plain object from a ListTensorboardsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @static - * @param {google.cloud.aiplatform.v1beta1.ListTensorboardsRequest} message ListTensorboardsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTensorboardsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - object.readMask = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - return object; - }; - - /** - * Converts this ListTensorboardsRequest to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @instance - * @returns {Object.} JSON object - */ - ListTensorboardsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTensorboardsRequest - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTensorboardsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ListTensorboardsRequest"; - }; - - return ListTensorboardsRequest; - })(); - - v1beta1.ListTensorboardsResponse = (function() { - - /** - * Properties of a ListTensorboardsResponse. - * @memberof google.cloud.aiplatform.v1beta1 - * @interface IListTensorboardsResponse - * @property {Array.|null} [tensorboards] ListTensorboardsResponse tensorboards - * @property {string|null} [nextPageToken] ListTensorboardsResponse nextPageToken - */ - - /** - * Constructs a new ListTensorboardsResponse. - * @memberof google.cloud.aiplatform.v1beta1 - * @classdesc Represents a ListTensorboardsResponse. - * @implements IListTensorboardsResponse - * @constructor - * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsResponse=} [properties] Properties to set - */ - function ListTensorboardsResponse(properties) { - this.tensorboards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTensorboardsResponse tensorboards. - * @member {Array.} tensorboards - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @instance - */ - ListTensorboardsResponse.prototype.tensorboards = $util.emptyArray; - - /** - * ListTensorboardsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @instance - */ - ListTensorboardsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListTensorboardsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @static - * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsResponse=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsResponse} ListTensorboardsResponse instance - */ - ListTensorboardsResponse.create = function create(properties) { - return new ListTensorboardsResponse(properties); - }; - - /** - * Encodes the specified ListTensorboardsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @static - * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsResponse} message ListTensorboardsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTensorboardsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tensorboards != null && message.tensorboards.length) - for (var i = 0; i < message.tensorboards.length; ++i) - $root.google.cloud.aiplatform.v1beta1.Tensorboard.encode(message.tensorboards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListTensorboardsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @static - * @param {google.cloud.aiplatform.v1beta1.IListTensorboardsResponse} message ListTensorboardsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTensorboardsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTensorboardsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsResponse} ListTensorboardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTensorboardsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ListTensorboardsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.tensorboards && message.tensorboards.length)) - message.tensorboards = []; - message.tensorboards.push($root.google.cloud.aiplatform.v1beta1.Tensorboard.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTensorboardsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsResponse} ListTensorboardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTensorboardsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTensorboardsResponse message. - * @function verify - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTensorboardsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tensorboards != null && message.hasOwnProperty("tensorboards")) { - if (!Array.isArray(message.tensorboards)) - return "tensorboards: array expected"; - for (var i = 0; i < message.tensorboards.length; ++i) { - var error = $root.google.cloud.aiplatform.v1beta1.Tensorboard.verify(message.tensorboards[i]); - if (error) - return "tensorboards." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListTensorboardsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1beta1.ListTensorboardsResponse} ListTensorboardsResponse - */ - ListTensorboardsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1beta1.ListTensorboardsResponse) - return object; - var message = new $root.google.cloud.aiplatform.v1beta1.ListTensorboardsResponse(); - if (object.tensorboards) { - if (!Array.isArray(object.tensorboards)) - throw TypeError(".google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.tensorboards: array expected"); - message.tensorboards = []; - for (var i = 0; i < object.tensorboards.length; ++i) { - if (typeof object.tensorboards[i] !== "object") - throw TypeError(".google.cloud.aiplatform.v1beta1.ListTensorboardsResponse.tensorboards: object expected"); - message.tensorboards[i] = $root.google.cloud.aiplatform.v1beta1.Tensorboard.fromObject(object.tensorboards[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListTensorboardsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @static - * @param {google.cloud.aiplatform.v1beta1.ListTensorboardsResponse} message ListTensorboardsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTensorboardsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tensorboards = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.tensorboards && message.tensorboards.length) { - object.tensorboards = []; - for (var j = 0; j < message.tensorboards.length; ++j) - object.tensorboards[j] = $root.google.cloud.aiplatform.v1beta1.Tensorboard.toObject(message.tensorboards[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListTensorboardsResponse to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @instance - * @returns {Object.} JSON object - */ - ListTensorboardsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTensorboardsResponse - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1beta1.ListTensorboardsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTensorboardsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ListTensorboardsResponse"; - }; - - return ListTensorboardsResponse; - })(); - - v1beta1.UpdateTensorboardRequest = (function() { + v1beta1.ReadTensorboardSizeRequest = (function() { /** - * Properties of an UpdateTensorboardRequest. + * Properties of a ReadTensorboardSizeRequest. * @memberof google.cloud.aiplatform.v1beta1 - * @interface IUpdateTensorboardRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTensorboardRequest updateMask - * @property {google.cloud.aiplatform.v1beta1.ITensorboard|null} [tensorboard] UpdateTensorboardRequest tensorboard + * @interface IReadTensorboardSizeRequest + * @property {string|null} [tensorboard] ReadTensorboardSizeRequest tensorboard */ /** - * Constructs a new UpdateTensorboardRequest. + * Constructs a new ReadTensorboardSizeRequest. * @memberof google.cloud.aiplatform.v1beta1 - * @classdesc Represents an UpdateTensorboardRequest. - * @implements IUpdateTensorboardRequest + * @classdesc Represents a ReadTensorboardSizeRequest. + * @implements IReadTensorboardSizeRequest * @constructor - * @param {google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest=} [properties] Properties to set */ - function UpdateTensorboardRequest(properties) { + function ReadTensorboardSizeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -380608,89 +385094,75 @@ } /** - * UpdateTensorboardRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest - * @instance - */ - UpdateTensorboardRequest.prototype.updateMask = null; - - /** - * UpdateTensorboardRequest tensorboard. - * @member {google.cloud.aiplatform.v1beta1.ITensorboard|null|undefined} tensorboard - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * ReadTensorboardSizeRequest tensorboard. + * @member {string} tensorboard + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @instance */ - UpdateTensorboardRequest.prototype.tensorboard = null; + ReadTensorboardSizeRequest.prototype.tensorboard = ""; /** - * Creates a new UpdateTensorboardRequest instance using the specified properties. + * Creates a new ReadTensorboardSizeRequest instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @static - * @param {google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest} UpdateTensorboardRequest instance + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest} ReadTensorboardSizeRequest instance */ - UpdateTensorboardRequest.create = function create(properties) { - return new UpdateTensorboardRequest(properties); + ReadTensorboardSizeRequest.create = function create(properties) { + return new ReadTensorboardSizeRequest(properties); }; /** - * Encodes the specified UpdateTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.verify|verify} messages. + * Encodes the specified ReadTensorboardSizeRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @static - * @param {google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest} message UpdateTensorboardRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest} message ReadTensorboardSizeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTensorboardRequest.encode = function encode(message, writer) { + ReadTensorboardSizeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.tensorboard != null && Object.hasOwnProperty.call(message, "tensorboard")) - $root.google.cloud.aiplatform.v1beta1.Tensorboard.encode(message.tensorboard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tensorboard); return writer; }; /** - * Encodes the specified UpdateTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.verify|verify} messages. + * Encodes the specified ReadTensorboardSizeRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @static - * @param {google.cloud.aiplatform.v1beta1.IUpdateTensorboardRequest} message UpdateTensorboardRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest} message ReadTensorboardSizeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTensorboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + ReadTensorboardSizeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTensorboardRequest message from the specified reader or buffer. + * Decodes a ReadTensorboardSizeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest} UpdateTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest} ReadTensorboardSizeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTensorboardRequest.decode = function decode(reader, length) { + ReadTensorboardSizeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.tensorboard = $root.google.cloud.aiplatform.v1beta1.Tensorboard.decode(reader, reader.uint32()); + message.tensorboard = reader.string(); break; } default: @@ -380702,141 +385174,122 @@ }; /** - * Decodes an UpdateTensorboardRequest message from the specified reader or buffer, length delimited. + * Decodes a ReadTensorboardSizeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest} UpdateTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest} ReadTensorboardSizeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTensorboardRequest.decodeDelimited = function decodeDelimited(reader) { + ReadTensorboardSizeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTensorboardRequest message. + * Verifies a ReadTensorboardSizeRequest message. * @function verify - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTensorboardRequest.verify = function verify(message) { + ReadTensorboardSizeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) { - var error = $root.google.cloud.aiplatform.v1beta1.Tensorboard.verify(message.tensorboard); - if (error) - return "tensorboard." + error; - } + if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) + if (!$util.isString(message.tensorboard)) + return "tensorboard: string expected"; return null; }; /** - * Creates an UpdateTensorboardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReadTensorboardSizeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest} UpdateTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest} ReadTensorboardSizeRequest */ - UpdateTensorboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest) + ReadTensorboardSizeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest) return object; - var message = new $root.google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.tensorboard != null) { - if (typeof object.tensorboard !== "object") - throw TypeError(".google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest.tensorboard: object expected"); - message.tensorboard = $root.google.cloud.aiplatform.v1beta1.Tensorboard.fromObject(object.tensorboard); - } + var message = new $root.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest(); + if (object.tensorboard != null) + message.tensorboard = String(object.tensorboard); return message; }; /** - * Creates a plain object from an UpdateTensorboardRequest message. Also converts values to other types if specified. + * Creates a plain object from a ReadTensorboardSizeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @static - * @param {google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest} message UpdateTensorboardRequest + * @param {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest} message ReadTensorboardSizeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTensorboardRequest.toObject = function toObject(message, options) { + ReadTensorboardSizeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.tensorboard = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.tensorboard = ""; if (message.tensorboard != null && message.hasOwnProperty("tensorboard")) - object.tensorboard = $root.google.cloud.aiplatform.v1beta1.Tensorboard.toObject(message.tensorboard, options); + object.tensorboard = message.tensorboard; return object; }; /** - * Converts this UpdateTensorboardRequest to JSON. + * Converts this ReadTensorboardSizeRequest to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @instance * @returns {Object.} JSON object */ - UpdateTensorboardRequest.prototype.toJSON = function toJSON() { + ReadTensorboardSizeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateTensorboardRequest + * Gets the default type url for ReadTensorboardSizeRequest * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateTensorboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReadTensorboardSizeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.UpdateTensorboardRequest"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest"; }; - return UpdateTensorboardRequest; + return ReadTensorboardSizeRequest; })(); - v1beta1.DeleteTensorboardRequest = (function() { + v1beta1.ReadTensorboardSizeResponse = (function() { /** - * Properties of a DeleteTensorboardRequest. + * Properties of a ReadTensorboardSizeResponse. * @memberof google.cloud.aiplatform.v1beta1 - * @interface IDeleteTensorboardRequest - * @property {string|null} [name] DeleteTensorboardRequest name + * @interface IReadTensorboardSizeResponse + * @property {number|Long|null} [storageSizeByte] ReadTensorboardSizeResponse storageSizeByte */ /** - * Constructs a new DeleteTensorboardRequest. + * Constructs a new ReadTensorboardSizeResponse. * @memberof google.cloud.aiplatform.v1beta1 - * @classdesc Represents a DeleteTensorboardRequest. - * @implements IDeleteTensorboardRequest + * @classdesc Represents a ReadTensorboardSizeResponse. + * @implements IReadTensorboardSizeResponse * @constructor - * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse=} [properties] Properties to set */ - function DeleteTensorboardRequest(properties) { + function ReadTensorboardSizeResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -380844,75 +385297,75 @@ } /** - * DeleteTensorboardRequest name. - * @member {string} name - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * ReadTensorboardSizeResponse storageSizeByte. + * @member {number|Long} storageSizeByte + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @instance */ - DeleteTensorboardRequest.prototype.name = ""; + ReadTensorboardSizeResponse.prototype.storageSizeByte = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new DeleteTensorboardRequest instance using the specified properties. + * Creates a new ReadTensorboardSizeResponse instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @static - * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest} DeleteTensorboardRequest instance + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse} ReadTensorboardSizeResponse instance */ - DeleteTensorboardRequest.create = function create(properties) { - return new DeleteTensorboardRequest(properties); + ReadTensorboardSizeResponse.create = function create(properties) { + return new ReadTensorboardSizeResponse(properties); }; /** - * Encodes the specified DeleteTensorboardRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest.verify|verify} messages. + * Encodes the specified ReadTensorboardSizeResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @static - * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest} message DeleteTensorboardRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse} message ReadTensorboardSizeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTensorboardRequest.encode = function encode(message, writer) { + ReadTensorboardSizeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.storageSizeByte != null && Object.hasOwnProperty.call(message, "storageSizeByte")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.storageSizeByte); return writer; }; /** - * Encodes the specified DeleteTensorboardRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest.verify|verify} messages. + * Encodes the specified ReadTensorboardSizeResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @static - * @param {google.cloud.aiplatform.v1beta1.IDeleteTensorboardRequest} message DeleteTensorboardRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse} message ReadTensorboardSizeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTensorboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + ReadTensorboardSizeResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTensorboardRequest message from the specified reader or buffer. + * Decodes a ReadTensorboardSizeResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest} DeleteTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse} ReadTensorboardSizeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTensorboardRequest.decode = function decode(reader, length) { + ReadTensorboardSizeResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.storageSizeByte = reader.int64(); break; } default: @@ -380924,102 +385377,116 @@ }; /** - * Decodes a DeleteTensorboardRequest message from the specified reader or buffer, length delimited. + * Decodes a ReadTensorboardSizeResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest} DeleteTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse} ReadTensorboardSizeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTensorboardRequest.decodeDelimited = function decodeDelimited(reader) { + ReadTensorboardSizeResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTensorboardRequest message. + * Verifies a ReadTensorboardSizeResponse message. * @function verify - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTensorboardRequest.verify = function verify(message) { + ReadTensorboardSizeResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.storageSizeByte != null && message.hasOwnProperty("storageSizeByte")) + if (!$util.isInteger(message.storageSizeByte) && !(message.storageSizeByte && $util.isInteger(message.storageSizeByte.low) && $util.isInteger(message.storageSizeByte.high))) + return "storageSizeByte: integer|Long expected"; return null; }; /** - * Creates a DeleteTensorboardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReadTensorboardSizeResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest} DeleteTensorboardRequest + * @returns {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse} ReadTensorboardSizeResponse */ - DeleteTensorboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest) + ReadTensorboardSizeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse) return object; - var message = new $root.google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse(); + if (object.storageSizeByte != null) + if ($util.Long) + (message.storageSizeByte = $util.Long.fromValue(object.storageSizeByte)).unsigned = false; + else if (typeof object.storageSizeByte === "string") + message.storageSizeByte = parseInt(object.storageSizeByte, 10); + else if (typeof object.storageSizeByte === "number") + message.storageSizeByte = object.storageSizeByte; + else if (typeof object.storageSizeByte === "object") + message.storageSizeByte = new $util.LongBits(object.storageSizeByte.low >>> 0, object.storageSizeByte.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a DeleteTensorboardRequest message. Also converts values to other types if specified. + * Creates a plain object from a ReadTensorboardSizeResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @static - * @param {google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest} message DeleteTensorboardRequest + * @param {google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse} message ReadTensorboardSizeResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTensorboardRequest.toObject = function toObject(message, options) { + ReadTensorboardSizeResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.storageSizeByte = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.storageSizeByte = options.longs === String ? "0" : 0; + if (message.storageSizeByte != null && message.hasOwnProperty("storageSizeByte")) + if (typeof message.storageSizeByte === "number") + object.storageSizeByte = options.longs === String ? String(message.storageSizeByte) : message.storageSizeByte; + else + object.storageSizeByte = options.longs === String ? $util.Long.prototype.toString.call(message.storageSizeByte) : options.longs === Number ? new $util.LongBits(message.storageSizeByte.low >>> 0, message.storageSizeByte.high >>> 0).toNumber() : message.storageSizeByte; return object; }; /** - * Converts this DeleteTensorboardRequest to JSON. + * Converts this ReadTensorboardSizeResponse to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @instance * @returns {Object.} JSON object */ - DeleteTensorboardRequest.prototype.toJSON = function toJSON() { + ReadTensorboardSizeResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteTensorboardRequest + * Gets the default type url for ReadTensorboardSizeResponse * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest + * @memberof google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteTensorboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReadTensorboardSizeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteTensorboardRequest"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse"; }; - return DeleteTensorboardRequest; + return ReadTensorboardSizeResponse; })(); v1beta1.CreateTensorboardExperimentRequest = (function() { diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 314cf2a6db06..cbbd89aa5590 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -1332,7 +1332,8 @@ "JOB_STATE_CANCELLED": 7, "JOB_STATE_PAUSED": 8, "JOB_STATE_EXPIRED": 9, - "JOB_STATE_UPDATING": 10 + "JOB_STATE_UPDATING": 10, + "JOB_STATE_PARTIALLY_SUCCEEDED": 11 } }, "MachineSpec": { @@ -1615,6 +1616,7 @@ "type": "string", "id": 47, "options": { + "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "aiplatform.googleapis.com/PipelineJob" } }, @@ -2568,6 +2570,13 @@ "(google.api.field_behavior)": "REQUIRED" } }, + "dataItemCount": { + "type": "int64", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "createTime": { "type": "google.protobuf.Timestamp", "id": 4, @@ -2979,6 +2988,32 @@ } ] }, + "DeleteSavedQuery": { + "requestType": "DeleteSavedQueryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "DeleteOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "DeleteOperationMetadata" + } + } + ] + }, "GetAnnotationSpec": { "requestType": "GetAnnotationSpecRequest", "responseType": "AnnotationSpec", @@ -3422,6 +3457,18 @@ } } }, + "DeleteSavedQueryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/SavedQuery" + } + } + } + }, "GetAnnotationSpecRequest": { "fields": { "name": { @@ -6300,7 +6347,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "aiplatform.googleapis.com/EntityType" + "(google.api.resource_reference).child_type": "aiplatform.googleapis.com/Feature" } }, "feature": { @@ -14542,9 +14589,6 @@ } } }, - "UpdateExplanationDatasetResponse": { - "fields": {} - }, "ExportModelOperationMetadata": { "fields": { "genericMetadata": { @@ -14580,6 +14624,9 @@ } } }, + "UpdateExplanationDatasetResponse": { + "fields": {} + }, "ExportModelResponse": { "fields": {} }, @@ -14945,6 +14992,11 @@ "(google.api.resource_reference).type": "compute.googleapis.com/Network" } }, + "reservedIpRanges": { + "rule": "repeated", + "type": "string", + "id": 25 + }, "templateUri": { "type": "string", "id": 19 @@ -18010,24 +18062,6 @@ } ] }, - "ReadTensorboardUsage": { - "requestType": "ReadTensorboardUsageRequest", - "responseType": "ReadTensorboardUsageResponse", - "options": { - "(google.api.http).get": "/v1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage", - "(google.api.method_signature)": "tensorboard" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage" - } - }, - { - "(google.api.method_signature)": "tensorboard" - } - ] - }, "UpdateTensorboard": { "requestType": "UpdateTensorboardRequest", "responseType": "google.longrunning.Operation", @@ -18100,6 +18134,24 @@ } ] }, + "ReadTensorboardUsage": { + "requestType": "ReadTensorboardUsageRequest", + "responseType": "ReadTensorboardUsageResponse", + "options": { + "(google.api.http).get": "/v1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage", + "(google.api.method_signature)": "tensorboard" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage" + } + }, + { + "(google.api.method_signature)": "tensorboard" + } + ] + }, "CreateTensorboardExperiment": { "requestType": "CreateTensorboardExperimentRequest", "responseType": "TensorboardExperiment", @@ -18594,6 +18646,81 @@ } } }, + "ListTensorboardsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "aiplatform.googleapis.com/Tensorboard" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + }, + "readMask": { + "type": "google.protobuf.FieldMask", + "id": 6 + } + } + }, + "ListTensorboardsResponse": { + "fields": { + "tensorboards": { + "rule": "repeated", + "type": "Tensorboard", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateTensorboardRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tensorboard": { + "type": "Tensorboard", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteTensorboardRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Tensorboard" + } + } + } + }, "ReadTensorboardUsageRequest": { "fields": { "tensorboard": { @@ -18638,14 +18765,49 @@ } } }, - "ListTensorboardsRequest": { + "CreateTensorboardExperimentRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "aiplatform.googleapis.com/Tensorboard" + "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardExperiment" + } + }, + "tensorboardExperiment": { + "type": "TensorboardExperiment", + "id": 2 + }, + "tensorboardExperimentId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetTensorboardExperimentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardExperiment" + } + } + } + }, + "ListTensorboardExperimentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "aiplatform.googleapis.com/TensorboardExperiment" } }, "filter": { @@ -18670,11 +18832,11 @@ } } }, - "ListTensorboardsResponse": { + "ListTensorboardExperimentsResponse": { "fields": { - "tensorboards": { + "tensorboardExperiments": { "rule": "repeated", - "type": "Tensorboard", + "type": "TensorboardExperiment", "id": 1 }, "nextPageToken": { @@ -18683,7 +18845,7 @@ } } }, - "UpdateTensorboardRequest": { + "UpdateTensorboardExperimentRequest": { "fields": { "updateMask": { "type": "google.protobuf.FieldMask", @@ -18692,8 +18854,8 @@ "(google.api.field_behavior)": "REQUIRED" } }, - "tensorboard": { - "type": "Tensorboard", + "tensorboardExperiment": { + "type": "TensorboardExperiment", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -18701,19 +18863,19 @@ } } }, - "DeleteTensorboardRequest": { + "DeleteTensorboardExperimentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "aiplatform.googleapis.com/Tensorboard" + "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardExperiment" } } } }, - "CreateTensorboardExperimentRequest": { + "BatchCreateTensorboardRunsRequest": { "fields": { "parent": { "type": "string", @@ -18723,11 +18885,43 @@ "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardExperiment" } }, - "tensorboardExperiment": { - "type": "TensorboardExperiment", - "id": 2 + "requests": { + "rule": "repeated", + "type": "CreateTensorboardRunRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateTensorboardRunsResponse": { + "fields": { + "tensorboardRuns": { + "rule": "repeated", + "type": "TensorboardRun", + "id": 1 + } + } + }, + "CreateTensorboardRunRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardRun" + } }, - "tensorboardExperimentId": { + "tensorboardRun": { + "type": "TensorboardRun", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tensorboardRunId": { "type": "string", "id": 3, "options": { @@ -18736,194 +18930,52 @@ } } }, - "GetTensorboardExperimentRequest": { + "GetTensorboardRunRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardExperiment" + "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardRun" } } } }, - "ListTensorboardExperimentsRequest": { + "ReadTensorboardBlobDataRequest": { + "fields": { + "timeSeries": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardTimeSeries" + } + }, + "blobIds": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "ReadTensorboardBlobDataResponse": { + "fields": { + "blobs": { + "rule": "repeated", + "type": "TensorboardBlob", + "id": 1 + } + } + }, + "ListTensorboardRunsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "aiplatform.googleapis.com/TensorboardExperiment" - } - }, - "filter": { - "type": "string", - "id": 2 - }, - "pageSize": { - "type": "int32", - "id": 3 - }, - "pageToken": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 6 - } - } - }, - "ListTensorboardExperimentsResponse": { - "fields": { - "tensorboardExperiments": { - "rule": "repeated", - "type": "TensorboardExperiment", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "UpdateTensorboardExperimentRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "tensorboardExperiment": { - "type": "TensorboardExperiment", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteTensorboardExperimentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardExperiment" - } - } - } - }, - "BatchCreateTensorboardRunsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardExperiment" - } - }, - "requests": { - "rule": "repeated", - "type": "CreateTensorboardRunRequest", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "BatchCreateTensorboardRunsResponse": { - "fields": { - "tensorboardRuns": { - "rule": "repeated", - "type": "TensorboardRun", - "id": 1 - } - } - }, - "CreateTensorboardRunRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardRun" - } - }, - "tensorboardRun": { - "type": "TensorboardRun", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "tensorboardRunId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetTensorboardRunRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardRun" - } - } - } - }, - "ReadTensorboardBlobDataRequest": { - "fields": { - "timeSeries": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "aiplatform.googleapis.com/TensorboardTimeSeries" - } - }, - "blobIds": { - "rule": "repeated", - "type": "string", - "id": 2 - } - } - }, - "ReadTensorboardBlobDataResponse": { - "fields": { - "blobs": { - "rule": "repeated", - "type": "TensorboardBlob", - "id": 1 - } - } - }, - "ListTensorboardRunsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "aiplatform.googleapis.com/TensorboardRun" + "(google.api.resource_reference).child_type": "aiplatform.googleapis.com/TensorboardRun" } }, "filter": { @@ -21297,7 +21349,8 @@ "JOB_STATE_CANCELLED": 7, "JOB_STATE_PAUSED": 8, "JOB_STATE_EXPIRED": 9, - "JOB_STATE_UPDATING": 10 + "JOB_STATE_UPDATING": 10, + "JOB_STATE_PARTIALLY_SUCCEEDED": 11 } }, "MachineSpec": { @@ -22594,6 +22647,14 @@ }, "CustomJobSpec": { "fields": { + "persistentResourceId": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/PersistentResource" + } + }, "workerPoolSpecs": { "rule": "repeated", "type": "WorkerPoolSpec", @@ -23075,6 +23136,13 @@ "(google.api.field_behavior)": "REQUIRED" } }, + "dataItemCount": { + "type": "int64", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "createTime": { "type": "google.protobuf.Timestamp", "id": 4, @@ -23486,6 +23554,32 @@ } ] }, + "DeleteSavedQuery": { + "requestType": "DeleteSavedQueryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "DeleteOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "DeleteOperationMetadata" + } + } + ] + }, "GetAnnotationSpec": { "requestType": "GetAnnotationSpecRequest", "responseType": "AnnotationSpec", @@ -23929,6 +24023,18 @@ } } }, + "DeleteSavedQueryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/SavedQuery" + } + } + } + }, "GetAnnotationSpecRequest": { "fields": { "name": { @@ -27098,7 +27204,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "aiplatform.googleapis.com/EntityType" + "(google.api.resource_reference).child_type": "aiplatform.googleapis.com/Feature" } }, "feature": { @@ -35214,6 +35320,440 @@ } } }, + "PersistentResource": { + "options": { + "(google.api.resource).type": "aiplatform.googleapis.com/PersistentResource", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/persistentResources/{persistent_resource}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resourcePools": { + "rule": "repeated", + "type": "ResourcePool", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "error": { + "type": "google.rpc.Status", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "network": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "compute.googleapis.com/Network" + } + }, + "encryptionSpec": { + "type": "EncryptionSpec", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resourceRuntimeSpec": { + "type": "ResourceRuntimeSpec", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "reservedIpRanges": { + "rule": "repeated", + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 3, + "STOPPING": 4, + "ERROR": 5 + } + } + } + }, + "ResourcePool": { + "oneofs": { + "_replicaCount": { + "oneof": [ + "replicaCount" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "machineSpec": { + "type": "MachineSpec", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "replicaCount": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "diskSpec": { + "type": "DiskSpec", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "idleReplicaCount": { + "type": "int64", + "id": 5, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "usedReplicaCount": { + "type": "int64", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "autoscalingSpec": { + "type": "AutoscalingSpec", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "AutoscalingSpec": { + "oneofs": { + "_minReplicaCount": { + "oneof": [ + "minReplicaCount" + ] + }, + "_maxReplicaCount": { + "oneof": [ + "maxReplicaCount" + ] + } + }, + "fields": { + "minReplicaCount": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "maxReplicaCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + } + } + }, + "ResourceRuntimeSpec": { + "fields": { + "serviceAccountSpec": { + "type": "ServiceAccountSpec", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ServiceAccountSpec": { + "fields": { + "enableCustomServiceAccount": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "serviceAccount": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PersistentResourceService": { + "options": { + "(google.api.default_host)": "aiplatform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreatePersistentResource": { + "requestType": "CreatePersistentResourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/persistentResources", + "(google.api.http).body": "persistent_resource", + "(google.api.method_signature)": "parent,persistent_resource,persistent_resource_id", + "(google.longrunning.operation_info).response_type": "PersistentResource", + "(google.longrunning.operation_info).metadata_type": "CreatePersistentResourceOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/persistentResources", + "body": "persistent_resource" + } + }, + { + "(google.api.method_signature)": "parent,persistent_resource,persistent_resource_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "PersistentResource", + "metadata_type": "CreatePersistentResourceOperationMetadata" + } + } + ] + }, + "GetPersistentResource": { + "requestType": "GetPersistentResourceRequest", + "responseType": "PersistentResource", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/persistentResources/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/persistentResources/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPersistentResources": { + "requestType": "ListPersistentResourcesRequest", + "responseType": "ListPersistentResourcesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/persistentResources", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/persistentResources" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeletePersistentResource": { + "requestType": "DeletePersistentResourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/persistentResources/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "DeleteOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/persistentResources/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "DeleteOperationMetadata" + } + } + ] + } + } + }, + "CreatePersistentResourceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "persistentResource": { + "type": "PersistentResource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "persistentResourceId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreatePersistentResourceOperationMetadata": { + "fields": { + "genericMetadata": { + "type": "GenericOperationMetadata", + "id": 1 + } + } + }, + "GetPersistentResourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/PersistentResource" + } + } + } + }, + "ListPersistentResourcesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPersistentResourcesResponse": { + "fields": { + "persistentResources": { + "rule": "repeated", + "type": "PersistentResource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeletePersistentResourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/PersistentResource" + } + } + } + }, "PipelineFailurePolicy": { "values": { "PIPELINE_FAILURE_POLICY_UNSPECIFIED": 0, @@ -35315,6 +35855,11 @@ "(google.api.resource_reference).type": "compute.googleapis.com/Network" } }, + "reservedIpRanges": { + "rule": "repeated", + "type": "string", + "id": 25 + }, "templateUri": { "type": "string", "id": 19 @@ -39509,24 +40054,6 @@ } ] }, - "ReadTensorboardUsage": { - "requestType": "ReadTensorboardUsageRequest", - "responseType": "ReadTensorboardUsageResponse", - "options": { - "(google.api.http).get": "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage", - "(google.api.method_signature)": "tensorboard" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage" - } - }, - { - "(google.api.method_signature)": "tensorboard" - } - ] - }, "UpdateTensorboard": { "requestType": "UpdateTensorboardRequest", "responseType": "google.longrunning.Operation", @@ -39599,6 +40126,42 @@ } ] }, + "ReadTensorboardUsage": { + "requestType": "ReadTensorboardUsageRequest", + "responseType": "ReadTensorboardUsageResponse", + "options": { + "(google.api.http).get": "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage", + "(google.api.method_signature)": "tensorboard" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}:readUsage" + } + }, + { + "(google.api.method_signature)": "tensorboard" + } + ] + }, + "ReadTensorboardSize": { + "requestType": "ReadTensorboardSizeRequest", + "responseType": "ReadTensorboardSizeResponse", + "options": { + "(google.api.http).get": "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}:readSize", + "(google.api.method_signature)": "tensorboard" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}:readSize" + } + }, + { + "(google.api.method_signature)": "tensorboard" + } + ] + }, "CreateTensorboardExperiment": { "requestType": "CreateTensorboardExperimentRequest", "responseType": "TensorboardExperiment", @@ -40093,50 +40656,6 @@ } } }, - "ReadTensorboardUsageRequest": { - "fields": { - "tensorboard": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "aiplatform.googleapis.com/Tensorboard" - } - } - } - }, - "ReadTensorboardUsageResponse": { - "fields": { - "monthlyUsageData": { - "keyType": "string", - "type": "PerMonthUsageData", - "id": 1 - } - }, - "nested": { - "PerUserUsageData": { - "fields": { - "username": { - "type": "string", - "id": 1 - }, - "viewCount": { - "type": "int64", - "id": 2 - } - } - }, - "PerMonthUsageData": { - "fields": { - "userUsageData": { - "rule": "repeated", - "type": "PerUserUsageData", - "id": 1 - } - } - } - } - }, "ListTensorboardsRequest": { "fields": { "parent": { @@ -40212,6 +40731,70 @@ } } }, + "ReadTensorboardUsageRequest": { + "fields": { + "tensorboard": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Tensorboard" + } + } + } + }, + "ReadTensorboardUsageResponse": { + "fields": { + "monthlyUsageData": { + "keyType": "string", + "type": "PerMonthUsageData", + "id": 1 + } + }, + "nested": { + "PerUserUsageData": { + "fields": { + "username": { + "type": "string", + "id": 1 + }, + "viewCount": { + "type": "int64", + "id": 2 + } + } + }, + "PerMonthUsageData": { + "fields": { + "userUsageData": { + "rule": "repeated", + "type": "PerUserUsageData", + "id": 1 + } + } + } + } + }, + "ReadTensorboardSizeRequest": { + "fields": { + "tensorboard": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Tensorboard" + } + } + } + }, + "ReadTensorboardSizeResponse": { + "fields": { + "storageSizeByte": { + "type": "int64", + "id": 1 + } + } + }, "CreateTensorboardExperimentRequest": { "fields": { "parent": { diff --git a/packages/google-cloud-aiplatform/samples/README.md b/packages/google-cloud-aiplatform/samples/README.md index cb201739e773..a02060c0d539 100644 --- a/packages/google-cloud-aiplatform/samples/README.md +++ b/packages/google-cloud-aiplatform/samples/README.md @@ -14,6 +14,7 @@ * [Samples](#samples) * [Dataset_service.create_dataset](#dataset_service.create_dataset) * [Dataset_service.delete_dataset](#dataset_service.delete_dataset) + * [Dataset_service.delete_saved_query](#dataset_service.delete_saved_query) * [Dataset_service.export_data](#dataset_service.export_data) * [Dataset_service.get_annotation_spec](#dataset_service.get_annotation_spec) * [Dataset_service.get_dataset](#dataset_service.get_dataset) @@ -225,6 +226,7 @@ * [Vizier_service.suggest_trials](#vizier_service.suggest_trials) * [Dataset_service.create_dataset](#dataset_service.create_dataset) * [Dataset_service.delete_dataset](#dataset_service.delete_dataset) + * [Dataset_service.delete_saved_query](#dataset_service.delete_saved_query) * [Dataset_service.export_data](#dataset_service.export_data) * [Dataset_service.get_annotation_spec](#dataset_service.get_annotation_spec) * [Dataset_service.get_dataset](#dataset_service.get_dataset) @@ -377,6 +379,10 @@ * [Model_service.update_explanation_dataset](#model_service.update_explanation_dataset) * [Model_service.update_model](#model_service.update_model) * [Model_service.upload_model](#model_service.upload_model) + * [Persistent_resource_service.create_persistent_resource](#persistent_resource_service.create_persistent_resource) + * [Persistent_resource_service.delete_persistent_resource](#persistent_resource_service.delete_persistent_resource) + * [Persistent_resource_service.get_persistent_resource](#persistent_resource_service.get_persistent_resource) + * [Persistent_resource_service.list_persistent_resources](#persistent_resource_service.list_persistent_resources) * [Pipeline_service.cancel_pipeline_job](#pipeline_service.cancel_pipeline_job) * [Pipeline_service.cancel_training_pipeline](#pipeline_service.cancel_training_pipeline) * [Pipeline_service.create_pipeline_job](#pipeline_service.create_pipeline_job) @@ -423,6 +429,7 @@ * [Tensorboard_service.list_tensorboard_time_series](#tensorboard_service.list_tensorboard_time_series) * [Tensorboard_service.list_tensorboards](#tensorboard_service.list_tensorboards) * [Tensorboard_service.read_tensorboard_blob_data](#tensorboard_service.read_tensorboard_blob_data) + * [Tensorboard_service.read_tensorboard_size](#tensorboard_service.read_tensorboard_size) * [Tensorboard_service.read_tensorboard_time_series_data](#tensorboard_service.read_tensorboard_time_series_data) * [Tensorboard_service.read_tensorboard_usage](#tensorboard_service.read_tensorboard_usage) * [Tensorboard_service.update_tensorboard](#tensorboard_service.update_tensorboard) @@ -497,6 +504,23 @@ __Usage:__ +### Dataset_service.delete_saved_query + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_saved_query.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_saved_query.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_saved_query.js` + + +----- + + + + ### Dataset_service.export_data View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.export_data.js). @@ -4084,6 +4108,23 @@ __Usage:__ +### Dataset_service.delete_saved_query + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_saved_query.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_saved_query.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_saved_query.js` + + +----- + + + + ### Dataset_service.export_data View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.export_data.js). @@ -6668,6 +6709,74 @@ __Usage:__ +### Persistent_resource_service.create_persistent_resource + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js` + + +----- + + + + +### Persistent_resource_service.delete_persistent_resource + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js` + + +----- + + + + +### Persistent_resource_service.get_persistent_resource + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.get_persistent_resource.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.get_persistent_resource.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.get_persistent_resource.js` + + +----- + + + + +### Persistent_resource_service.list_persistent_resources + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.list_persistent_resources.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.list_persistent_resources.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.list_persistent_resources.js` + + +----- + + + + ### Pipeline_service.cancel_pipeline_job View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_pipeline_job.js). @@ -7450,6 +7559,23 @@ __Usage:__ +### Tensorboard_service.read_tensorboard_size + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_size.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_size.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_size.js` + + +----- + + + + ### Tensorboard_service.read_tensorboard_time_series_data View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_time_series_data.js). diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_saved_query.js b/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_saved_query.js new file mode 100644 index 000000000000..9110c1b566ad --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_saved_query.js @@ -0,0 +1,64 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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_DeleteSavedQuery_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 SavedQuery to delete. + * Format: + * `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}` + */ + // const name = 'abc123' + + // Imports the Aiplatform library + const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1; + + // Instantiates a client + const aiplatformClient = new DatasetServiceClient(); + + async function callDeleteSavedQuery() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await aiplatformClient.deleteSavedQuery(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteSavedQuery(); + // [END aiplatform_v1_generated_DatasetService_DeleteSavedQuery_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_featurestore.js b/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_featurestore.js index 68053dc84fc7..071dd0911cb3 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_featurestore.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_featurestore.js @@ -31,7 +31,7 @@ function main(parent, featurestore, featurestoreId) { /** * Required. The resource name of the Location to create Featurestores. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index a395906e327e..8426d6f17d27 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -539,6 +539,46 @@ } } }, + { + "regionTag": "aiplatform_v1_generated_DatasetService_DeleteSavedQuery_async", + "title": "DatasetService deleteSavedQuery Sample", + "origin": "API_DEFINITION", + "description": " Deletes a SavedQuery.", + "canonical": true, + "file": "dataset_service.delete_saved_query.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSavedQuery", + "fullName": "google.cloud.aiplatform.v1.DatasetService.DeleteSavedQuery", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DatasetServiceClient", + "fullName": "google.cloud.aiplatform.v1.DatasetServiceClient" + }, + "method": { + "shortName": "DeleteSavedQuery", + "fullName": "google.cloud.aiplatform.v1.DatasetService.DeleteSavedQuery", + "service": { + "shortName": "DatasetService", + "fullName": "google.cloud.aiplatform.v1.DatasetService" + } + } + } + }, { "regionTag": "aiplatform_v1_generated_DatasetService_GetAnnotationSpec_async", "title": "DatasetService getAnnotationSpec Sample", @@ -7931,46 +7971,6 @@ } } }, - { - "regionTag": "aiplatform_v1_generated_TensorboardService_ReadTensorboardUsage_async", - "title": "DatasetService readTensorboardUsage Sample", - "origin": "API_DEFINITION", - "description": " Returns a list of monthly active users for a given TensorBoard instance.", - "canonical": true, - "file": "tensorboard_service.read_tensorboard_usage.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadTensorboardUsage", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage", - "async": true, - "parameters": [ - { - "name": "tensorboard", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1.ReadTensorboardUsageResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" - }, - "method": { - "shortName": "ReadTensorboardUsage", - "fullName": "google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1.TensorboardService" - } - } - } - }, { "regionTag": "aiplatform_v1_generated_TensorboardService_UpdateTensorboard_async", "title": "DatasetService updateTensorboard Sample", @@ -8115,6 +8115,46 @@ } } }, + { + "regionTag": "aiplatform_v1_generated_TensorboardService_ReadTensorboardUsage_async", + "title": "DatasetService readTensorboardUsage Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of monthly active users for a given TensorBoard instance.", + "canonical": true, + "file": "tensorboard_service.read_tensorboard_usage.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadTensorboardUsage", + "fullName": "google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage", + "async": true, + "parameters": [ + { + "name": "tensorboard", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.aiplatform.v1.ReadTensorboardUsageResponse", + "client": { + "shortName": "TensorboardServiceClient", + "fullName": "google.cloud.aiplatform.v1.TensorboardServiceClient" + }, + "method": { + "shortName": "ReadTensorboardUsage", + "fullName": "google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage", + "service": { + "shortName": "TensorboardService", + "fullName": "google.cloud.aiplatform.v1.TensorboardService" + } + } + } + }, { "regionTag": "aiplatform_v1_generated_TensorboardService_CreateTensorboardExperiment_async", "title": "DatasetService createTensorboardExperiment Sample", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_saved_query.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_saved_query.js new file mode 100644 index 000000000000..92c9de93f53d --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_saved_query.js @@ -0,0 +1,64 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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_DeleteSavedQuery_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 SavedQuery to delete. + * Format: + * `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}` + */ + // const name = 'abc123' + + // Imports the Aiplatform library + const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new DatasetServiceClient(); + + async function callDeleteSavedQuery() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await aiplatformClient.deleteSavedQuery(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteSavedQuery(); + // [END aiplatform_v1beta1_generated_DatasetService_DeleteSavedQuery_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_featurestore.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_featurestore.js index 4e22f904b182..cb8ec6ae500b 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_featurestore.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_featurestore.js @@ -31,7 +31,7 @@ function main(parent, featurestore, featurestoreId) { /** * Required. The resource name of the Location to create Featurestores. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js new file mode 100644 index 000000000000..db344081b36b --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js @@ -0,0 +1,76 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, persistentResource, persistentResourceId) { + // [START aiplatform_v1beta1_generated_PersistentResourceService_CreatePersistentResource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 + * PersistentResource in. Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. The PersistentResource to create. + */ + // const persistentResource = {} + /** + * Required. The ID to use for the PersistentResource, which become the final + * component of the PersistentResource's resource name. + * The maximum length is 63 characters, and valid characters + * are /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/. + */ + // const persistentResourceId = 'abc123' + + // Imports the Aiplatform library + const {PersistentResourceServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new PersistentResourceServiceClient(); + + async function callCreatePersistentResource() { + // Construct request + const request = { + parent, + persistentResource, + persistentResourceId, + }; + + // Run request + const [operation] = await aiplatformClient.createPersistentResource(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreatePersistentResource(); + // [END aiplatform_v1beta1_generated_PersistentResourceService_CreatePersistentResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js new file mode 100644 index 000000000000..2cc4ec028d9b --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js @@ -0,0 +1,64 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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_PersistentResourceService_DeletePersistentResource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 PersistentResource to be deleted. + * Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + */ + // const name = 'abc123' + + // Imports the Aiplatform library + const {PersistentResourceServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new PersistentResourceServiceClient(); + + async function callDeletePersistentResource() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await aiplatformClient.deletePersistentResource(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeletePersistentResource(); + // [END aiplatform_v1beta1_generated_PersistentResourceService_DeletePersistentResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.get_persistent_resource.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.get_persistent_resource.js new file mode 100644 index 000000000000..b535c4f8e5eb --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.get_persistent_resource.js @@ -0,0 +1,63 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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_PersistentResourceService_GetPersistentResource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + */ + // const name = 'abc123' + + // Imports the Aiplatform library + const {PersistentResourceServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new PersistentResourceServiceClient(); + + async function callGetPersistentResource() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await aiplatformClient.getPersistentResource(request); + console.log(response); + } + + callGetPersistentResource(); + // [END aiplatform_v1beta1_generated_PersistentResourceService_GetPersistentResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.list_persistent_resources.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.list_persistent_resources.js new file mode 100644 index 000000000000..c26a92324832 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/persistent_resource_service.list_persistent_resources.js @@ -0,0 +1,75 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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_PersistentResourceService_ListPersistentResources_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 PersistentResources + * from. Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The standard list page size. + */ + // const pageSize = 1234 + /** + * Optional. The standard list page token. + * Typically obtained via + * ListPersistentResourceResponse.next_page_token of the previous + * PersistentResourceService.ListPersistentResource call. + */ + // const pageToken = 'abc123' + + // Imports the Aiplatform library + const {PersistentResourceServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new PersistentResourceServiceClient(); + + async function callListPersistentResources() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await aiplatformClient.listPersistentResourcesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPersistentResources(); + // [END aiplatform_v1beta1_generated_PersistentResourceService_ListPersistentResources_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index d45c26a3c7c0..172dc6eb4f29 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -539,6 +539,46 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_DatasetService_DeleteSavedQuery_async", + "title": "DatasetService deleteSavedQuery Sample", + "origin": "API_DEFINITION", + "description": " Deletes a SavedQuery.", + "canonical": true, + "file": "dataset_service.delete_saved_query.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSavedQuery", + "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.DeleteSavedQuery", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DatasetServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.DatasetServiceClient" + }, + "method": { + "shortName": "DeleteSavedQuery", + "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.DeleteSavedQuery", + "service": { + "shortName": "DatasetService", + "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_DatasetService_GetAnnotationSpec_async", "title": "DatasetService getAnnotationSpec Sample", @@ -7243,6 +7283,182 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_PersistentResourceService_CreatePersistentResource_async", + "title": "DatasetService createPersistentResource Sample", + "origin": "API_DEFINITION", + "description": " Uploads a Model artifact into Vertex AI.", + "canonical": true, + "file": "persistent_resource_service.create_persistent_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePersistentResource", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService.CreatePersistentResource", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "persistent_resource", + "type": ".google.cloud.aiplatform.v1beta1.PersistentResource" + }, + { + "name": "persistent_resource_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "PersistentResourceServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceServiceClient" + }, + "method": { + "shortName": "CreatePersistentResource", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService.CreatePersistentResource", + "service": { + "shortName": "PersistentResourceService", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService" + } + } + } + }, + { + "regionTag": "aiplatform_v1beta1_generated_PersistentResourceService_GetPersistentResource_async", + "title": "DatasetService getPersistentResource Sample", + "origin": "API_DEFINITION", + "description": " Gets a PersistentResource.", + "canonical": true, + "file": "persistent_resource_service.get_persistent_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPersistentResource", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService.GetPersistentResource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.PersistentResource", + "client": { + "shortName": "PersistentResourceServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceServiceClient" + }, + "method": { + "shortName": "GetPersistentResource", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService.GetPersistentResource", + "service": { + "shortName": "PersistentResourceService", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService" + } + } + } + }, + { + "regionTag": "aiplatform_v1beta1_generated_PersistentResourceService_ListPersistentResources_async", + "title": "DatasetService listPersistentResources Sample", + "origin": "API_DEFINITION", + "description": " Lists PersistentResources in a Location.", + "canonical": true, + "file": "persistent_resource_service.list_persistent_resources.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPersistentResources", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService.ListPersistentResources", + "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.ListPersistentResourcesResponse", + "client": { + "shortName": "PersistentResourceServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceServiceClient" + }, + "method": { + "shortName": "ListPersistentResources", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService.ListPersistentResources", + "service": { + "shortName": "PersistentResourceService", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService" + } + } + } + }, + { + "regionTag": "aiplatform_v1beta1_generated_PersistentResourceService_DeletePersistentResource_async", + "title": "DatasetService deletePersistentResource Sample", + "origin": "API_DEFINITION", + "description": " Deletes a PersistentResource.", + "canonical": true, + "file": "persistent_resource_service.delete_persistent_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePersistentResource", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService.DeletePersistentResource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "PersistentResourceServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceServiceClient" + }, + "method": { + "shortName": "DeletePersistentResource", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService.DeletePersistentResource", + "service": { + "shortName": "PersistentResourceService", + "fullName": "google.cloud.aiplatform.v1beta1.PersistentResourceService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_PipelineService_CreateTrainingPipeline_async", "title": "DatasetService createTrainingPipeline Sample", @@ -8455,46 +8671,6 @@ } } }, - { - "regionTag": "aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardUsage_async", - "title": "DatasetService readTensorboardUsage Sample", - "origin": "API_DEFINITION", - "description": " Returns a list of monthly active users for a given TensorBoard instance.", - "canonical": true, - "file": "tensorboard_service.read_tensorboard_usage.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadTensorboardUsage", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsage", - "async": true, - "parameters": [ - { - "name": "tensorboard", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.aiplatform.v1beta1.ReadTensorboardUsageResponse", - "client": { - "shortName": "TensorboardServiceClient", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" - }, - "method": { - "shortName": "ReadTensorboardUsage", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsage", - "service": { - "shortName": "TensorboardService", - "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" - } - } - } - }, { "regionTag": "aiplatform_v1beta1_generated_TensorboardService_UpdateTensorboard_async", "title": "DatasetService updateTensorboard Sample", @@ -8639,6 +8815,86 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardUsage_async", + "title": "DatasetService readTensorboardUsage Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of monthly active users for a given TensorBoard instance.", + "canonical": true, + "file": "tensorboard_service.read_tensorboard_usage.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadTensorboardUsage", + "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsage", + "async": true, + "parameters": [ + { + "name": "tensorboard", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.ReadTensorboardUsageResponse", + "client": { + "shortName": "TensorboardServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" + }, + "method": { + "shortName": "ReadTensorboardUsage", + "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsage", + "service": { + "shortName": "TensorboardService", + "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" + } + } + } + }, + { + "regionTag": "aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardSize_async", + "title": "DatasetService readTensorboardSize Sample", + "origin": "API_DEFINITION", + "description": " Returns the storage size for a given TensorBoard instance.", + "canonical": true, + "file": "tensorboard_service.read_tensorboard_size.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadTensorboardSize", + "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardSize", + "async": true, + "parameters": [ + { + "name": "tensorboard", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse", + "client": { + "shortName": "TensorboardServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.TensorboardServiceClient" + }, + "method": { + "shortName": "ReadTensorboardSize", + "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardSize", + "service": { + "shortName": "TensorboardService", + "fullName": "google.cloud.aiplatform.v1beta1.TensorboardService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_TensorboardService_CreateTensorboardExperiment_async", "title": "DatasetService createTensorboardExperiment Sample", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_size.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_size.js new file mode 100644 index 000000000000..7a16207cd01f --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_size.js @@ -0,0 +1,63 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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) { + // [START aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardSize_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 tensorboard = 'abc123' + + // Imports the Aiplatform library + const {TensorboardServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new TensorboardServiceClient(); + + async function callReadTensorboardSize() { + // Construct request + const request = { + tensorboard, + }; + + // Run request + const response = await aiplatformClient.readTensorboardSize(request); + console.log(response); + } + + callReadTensorboardSize(); + // [END aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardSize_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts b/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts index 37df669c89bc..dc8d6786ba7a 100644 --- a/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts @@ -44,8 +44,7 @@ import * as gapicConfig from './dataset_service_client_config.json'; const version = require('../../../package.json').version; /** - * The service that handles the CRUD of Vertex AI Dataset and its child - * resources. + * The service that manages Vertex AI Dataset and its child resources. * @class * @memberof v1 */ @@ -607,6 +606,9 @@ export class DatasetServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -839,6 +841,10 @@ export class DatasetServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1009,6 +1015,7 @@ export class DatasetServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1165,6 +1172,7 @@ export class DatasetServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1349,6 +1357,9 @@ export class DatasetServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, @@ -1395,6 +1406,12 @@ export class DatasetServiceClient { const exportDataMetadata = protoFilesRoot.lookup( '.google.cloud.aiplatform.v1.ExportDataOperationMetadata' ) as gax.protobuf.Type; + const deleteSavedQueryResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteSavedQueryMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1.DeleteOperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createDataset: new this._gaxModule.LongrunningDescriptor( @@ -1417,6 +1434,11 @@ export class DatasetServiceClient { exportDataResponse.decode.bind(exportDataResponse), exportDataMetadata.decode.bind(exportDataMetadata) ), + deleteSavedQuery: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteSavedQueryResponse.decode.bind(deleteSavedQueryResponse), + deleteSavedQueryMetadata.decode.bind(deleteSavedQueryMetadata) + ), }; // Put together the default options sent with requests. @@ -1479,6 +1501,7 @@ export class DatasetServiceClient { 'listDataItems', 'searchDataItems', 'listSavedQueries', + 'deleteSavedQuery', 'getAnnotationSpec', 'listAnnotations', ]; @@ -2415,6 +2438,146 @@ export class DatasetServiceClient { protos.google.cloud.aiplatform.v1.ExportDataOperationMetadata >; } + /** + * Deletes a SavedQuery. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the SavedQuery to delete. + * Format: + * `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataset_service.delete_saved_query.js + * region_tag:aiplatform_v1_generated_DatasetService_DeleteSavedQuery_async + */ + deleteSavedQuery( + request?: protos.google.cloud.aiplatform.v1.IDeleteSavedQueryRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteSavedQuery( + request: protos.google.cloud.aiplatform.v1.IDeleteSavedQueryRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteSavedQuery( + request: protos.google.cloud.aiplatform.v1.IDeleteSavedQueryRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteSavedQuery( + request?: protos.google.cloud.aiplatform.v1.IDeleteSavedQueryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteSavedQuery(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteSavedQuery()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataset_service.delete_saved_query.js + * region_tag:aiplatform_v1_generated_DatasetService_DeleteSavedQuery_async + */ + async checkDeleteSavedQueryProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.aiplatform.v1.DeleteOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteSavedQuery, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.aiplatform.v1.DeleteOperationMetadata + >; + } /** * Lists Datasets in a Location. * diff --git a/packages/google-cloud-aiplatform/src/v1/dataset_service_client_config.json b/packages/google-cloud-aiplatform/src/v1/dataset_service_client_config.json index ac943c50a3ee..1697a076b18c 100644 --- a/packages/google-cloud-aiplatform/src/v1/dataset_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1/dataset_service_client_config.json @@ -60,6 +60,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "DeleteSavedQuery": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetAnnotationSpec": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts index 7c31127c5de0..85776c67e455 100644 --- a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts @@ -586,6 +586,9 @@ export class EndpointServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -818,6 +821,10 @@ export class EndpointServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -988,6 +995,7 @@ export class EndpointServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1144,6 +1152,7 @@ export class EndpointServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1328,6 +1337,9 @@ export class EndpointServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts index 6b7c9c9a2aa9..880fc45d19f4 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts @@ -604,6 +604,9 @@ export class FeaturestoreServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -836,6 +839,10 @@ export class FeaturestoreServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1006,6 +1013,7 @@ export class FeaturestoreServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1162,6 +1170,7 @@ export class FeaturestoreServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1346,6 +1355,9 @@ export class FeaturestoreServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, @@ -2167,7 +2179,7 @@ export class FeaturestoreServiceClient { * @param {string} request.parent * Required. The resource name of the Location to create Featurestores. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` * @param {google.cloud.aiplatform.v1.Featurestore} request.featurestore * Required. The Featurestore to create. * @param {string} request.featurestoreId @@ -5051,6 +5063,7 @@ export class FeaturestoreServiceClient { * * `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. @@ -5220,6 +5233,7 @@ export class FeaturestoreServiceClient { * * `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. @@ -5337,6 +5351,7 @@ export class FeaturestoreServiceClient { * * `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. diff --git a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json index a3935f3cf875..fe8c2d64e4f9 100644 --- a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json @@ -45,6 +45,11 @@ "exportData" ] }, + "DeleteSavedQuery": { + "methods": [ + "deleteSavedQuery" + ] + }, "ListDatasets": { "methods": [ "listDatasets", @@ -120,6 +125,11 @@ "exportData" ] }, + "DeleteSavedQuery": { + "methods": [ + "deleteSavedQuery" + ] + }, "ListDatasets": { "methods": [ "listDatasets", diff --git a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts index fa0fac90cb1b..bc161d3e46d3 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts @@ -586,6 +586,9 @@ export class IndexEndpointServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -818,6 +821,10 @@ export class IndexEndpointServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -988,6 +995,7 @@ export class IndexEndpointServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1144,6 +1152,7 @@ export class IndexEndpointServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1328,6 +1337,9 @@ export class IndexEndpointServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/index_service_client.ts b/packages/google-cloud-aiplatform/src/v1/index_service_client.ts index fc884d007f20..a9e91b97afde 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/index_service_client.ts @@ -586,6 +586,9 @@ export class IndexServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -818,6 +821,10 @@ export class IndexServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -988,6 +995,7 @@ export class IndexServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1144,6 +1152,7 @@ export class IndexServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1328,6 +1337,9 @@ export class IndexServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/job_service_client.ts b/packages/google-cloud-aiplatform/src/v1/job_service_client.ts index 566dba606294..38b82871e825 100644 --- a/packages/google-cloud-aiplatform/src/v1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/job_service_client.ts @@ -622,6 +622,9 @@ export class JobServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -854,6 +857,10 @@ export class JobServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1024,6 +1031,7 @@ export class JobServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1180,6 +1188,7 @@ export class JobServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1364,6 +1373,9 @@ export class JobServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts b/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts index e4c343ce4b86..aa49975a75bc 100644 --- a/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts @@ -609,6 +609,9 @@ export class MetadataServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -841,6 +844,10 @@ export class MetadataServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1011,6 +1018,7 @@ export class MetadataServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1167,6 +1175,7 @@ export class MetadataServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1351,6 +1360,9 @@ export class MetadataServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts b/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts index 06bd846ad9ed..1f946a6e5c0b 100644 --- a/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts @@ -587,6 +587,9 @@ export class MigrationServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -819,6 +822,10 @@ export class MigrationServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -989,6 +996,7 @@ export class MigrationServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1145,6 +1153,7 @@ export class MigrationServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1329,6 +1338,9 @@ export class MigrationServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/model_service_client.ts b/packages/google-cloud-aiplatform/src/v1/model_service_client.ts index 1a9851cfe837..0f7b16850760 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/model_service_client.ts @@ -601,6 +601,9 @@ export class ModelServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -833,6 +836,10 @@ export class ModelServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1003,6 +1010,7 @@ export class ModelServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1159,6 +1167,7 @@ export class ModelServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1343,6 +1352,9 @@ export class ModelServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts b/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts index d94e3c91568d..a7ca18c0dd97 100644 --- a/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts @@ -593,6 +593,9 @@ export class PipelineServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -825,6 +828,10 @@ export class PipelineServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -995,6 +1002,7 @@ export class PipelineServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1151,6 +1159,7 @@ export class PipelineServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1335,6 +1344,9 @@ export class PipelineServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts index 31a3be9a73c4..96fea0278f92 100644 --- a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts @@ -592,6 +592,9 @@ export class SpecialistPoolServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -824,6 +827,10 @@ export class SpecialistPoolServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -994,6 +1001,7 @@ export class SpecialistPoolServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1150,6 +1158,7 @@ export class SpecialistPoolServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1334,6 +1343,9 @@ export class SpecialistPoolServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts index 5dda290f3c58..558a6bb220e1 100644 --- a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts @@ -618,6 +618,9 @@ export class TensorboardServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -850,6 +853,10 @@ export class TensorboardServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -1020,6 +1027,7 @@ export class TensorboardServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1176,6 +1184,7 @@ export class TensorboardServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1360,6 +1369,9 @@ export class TensorboardServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, @@ -1512,10 +1524,10 @@ export class TensorboardServiceClient { const tensorboardServiceStubMethods = [ 'createTensorboard', 'getTensorboard', - 'readTensorboardUsage', 'updateTensorboard', 'listTensorboards', 'deleteTensorboard', + 'readTensorboardUsage', 'createTensorboardExperiment', 'getTensorboardExperiment', 'updateTensorboardExperiment', diff --git a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client_config.json b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client_config.json index 649e11414ce0..0ea50e928c36 100644 --- a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client_config.json @@ -28,10 +28,6 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "ReadTensorboardUsage": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, "UpdateTensorboard": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" @@ -44,6 +40,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "ReadTensorboardUsage": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "CreateTensorboardExperiment": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts b/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts index 53f0d6f52f6f..22fb738c0d39 100644 --- a/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts @@ -595,6 +595,9 @@ export class VizierServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -827,6 +830,10 @@ export class VizierServiceClient { delete: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -997,6 +1004,7 @@ export class VizierServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1153,6 +1161,7 @@ export class VizierServiceClient { { get: '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/v1/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1337,6 +1346,9 @@ export class VizierServiceClient { { post: '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts index d55acdce93ee..424322c6113b 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts @@ -44,8 +44,7 @@ import * as gapicConfig from './dataset_service_client_config.json'; const version = require('../../../package.json').version; /** - * The service that handles the CRUD of Vertex AI Dataset and its child - * resources. + * The service that manages Vertex AI Dataset and its child resources. * @class * @memberof v1beta1 */ @@ -270,6 +269,9 @@ export class DatasetServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -1560,6 +1562,12 @@ export class DatasetServiceClient { const exportDataMetadata = protoFilesRoot.lookup( '.google.cloud.aiplatform.v1beta1.ExportDataOperationMetadata' ) as gax.protobuf.Type; + const deleteSavedQueryResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteSavedQueryMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createDataset: new this._gaxModule.LongrunningDescriptor( @@ -1582,6 +1590,11 @@ export class DatasetServiceClient { exportDataResponse.decode.bind(exportDataResponse), exportDataMetadata.decode.bind(exportDataMetadata) ), + deleteSavedQuery: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteSavedQueryResponse.decode.bind(deleteSavedQueryResponse), + deleteSavedQueryMetadata.decode.bind(deleteSavedQueryMetadata) + ), }; // Put together the default options sent with requests. @@ -1644,6 +1657,7 @@ export class DatasetServiceClient { 'listDataItems', 'searchDataItems', 'listSavedQueries', + 'deleteSavedQuery', 'getAnnotationSpec', 'listAnnotations', ]; @@ -2592,6 +2606,146 @@ export class DatasetServiceClient { protos.google.cloud.aiplatform.v1beta1.ExportDataOperationMetadata >; } + /** + * Deletes a SavedQuery. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the SavedQuery to delete. + * Format: + * `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataset_service.delete_saved_query.js + * region_tag:aiplatform_v1beta1_generated_DatasetService_DeleteSavedQuery_async + */ + deleteSavedQuery( + request?: protos.google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteSavedQuery( + request: protos.google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteSavedQuery( + request: protos.google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteSavedQuery( + request?: protos.google.cloud.aiplatform.v1beta1.IDeleteSavedQueryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteSavedQuery(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteSavedQuery()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataset_service.delete_saved_query.js + * region_tag:aiplatform_v1beta1_generated_DatasetService_DeleteSavedQuery_async + */ + async checkDeleteSavedQueryProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteSavedQuery, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata + >; + } /** * Lists Datasets in a Location. * @@ -5929,6 +6083,67 @@ export class DatasetServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client_config.json index 697d04ac3f85..8e262aaba697 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client_config.json @@ -68,6 +68,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "DeleteSavedQuery": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetAnnotationSpec": { "timeout_millis": 5000, "retry_codes_name": "non_idempotent", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts index e7c097f2891b..46c1b19aa8d9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts @@ -270,6 +270,9 @@ export class DeploymentResourcePoolServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -4589,6 +4592,67 @@ export class DeploymentResourcePoolServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts index 27c67867f889..af7783e38653 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts @@ -269,6 +269,9 @@ export class EndpointServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -4998,6 +5001,67 @@ export class EndpointServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts index f87759652a60..a74921df8f94 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts @@ -262,6 +262,9 @@ export class FeaturestoreOnlineServingServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -2582,6 +2585,67 @@ export class FeaturestoreOnlineServingServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts index b31c9c09d8e5..a72afc3fbd17 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts @@ -269,6 +269,9 @@ export class FeaturestoreServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -2351,7 +2354,7 @@ export class FeaturestoreServiceClient { * @param {string} request.parent * Required. The resource name of the Location to create Featurestores. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` * @param {google.cloud.aiplatform.v1beta1.Featurestore} request.featurestore * Required. The Featurestore to create. * @param {string} request.featurestoreId @@ -5235,6 +5238,7 @@ export class FeaturestoreServiceClient { * * `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. @@ -5404,6 +5408,7 @@ export class FeaturestoreServiceClient { * * `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. @@ -5521,6 +5526,7 @@ export class FeaturestoreServiceClient { * * `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. @@ -7637,6 +7643,67 @@ export class FeaturestoreServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json index 30394c79970b..babc223c07fa 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json @@ -45,6 +45,11 @@ "exportData" ] }, + "DeleteSavedQuery": { + "methods": [ + "deleteSavedQuery" + ] + }, "ListDatasets": { "methods": [ "listDatasets", @@ -120,6 +125,11 @@ "exportData" ] }, + "DeleteSavedQuery": { + "methods": [ + "deleteSavedQuery" + ] + }, "ListDatasets": { "methods": [ "listDatasets", @@ -1850,6 +1860,64 @@ } } }, + "PersistentResourceService": { + "clients": { + "grpc": { + "libraryClient": "PersistentResourceServiceClient", + "rpcs": { + "GetPersistentResource": { + "methods": [ + "getPersistentResource" + ] + }, + "CreatePersistentResource": { + "methods": [ + "createPersistentResource" + ] + }, + "DeletePersistentResource": { + "methods": [ + "deletePersistentResource" + ] + }, + "ListPersistentResources": { + "methods": [ + "listPersistentResources", + "listPersistentResourcesStream", + "listPersistentResourcesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "PersistentResourceServiceClient", + "rpcs": { + "GetPersistentResource": { + "methods": [ + "getPersistentResource" + ] + }, + "CreatePersistentResource": { + "methods": [ + "createPersistentResource" + ] + }, + "DeletePersistentResource": { + "methods": [ + "deletePersistentResource" + ] + }, + "ListPersistentResources": { + "methods": [ + "listPersistentResources", + "listPersistentResourcesStream", + "listPersistentResourcesAsync" + ] + } + } + } + } + }, "PipelineService": { "clients": { "grpc": { @@ -2187,6 +2255,11 @@ "readTensorboardUsage" ] }, + "ReadTensorboardSize": { + "methods": [ + "readTensorboardSize" + ] + }, "CreateTensorboardExperiment": { "methods": [ "createTensorboardExperiment" @@ -2347,6 +2420,11 @@ "readTensorboardUsage" ] }, + "ReadTensorboardSize": { + "methods": [ + "readTensorboardSize" + ] + }, "CreateTensorboardExperiment": { "methods": [ "createTensorboardExperiment" diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index.ts b/packages/google-cloud-aiplatform/src/v1beta1/index.ts index 2fc9ffeff23b..969de21b5e93 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index.ts @@ -29,6 +29,7 @@ export {MetadataServiceClient} from './metadata_service_client'; export {MigrationServiceClient} from './migration_service_client'; export {ModelGardenServiceClient} from './model_garden_service_client'; export {ModelServiceClient} from './model_service_client'; +export {PersistentResourceServiceClient} from './persistent_resource_service_client'; export {PipelineServiceClient} from './pipeline_service_client'; export {PredictionServiceClient} from './prediction_service_client'; export {ScheduleServiceClient} from './schedule_service_client'; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts index af5d9c55eaf6..515fa216fa09 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts @@ -269,6 +269,9 @@ export class IndexEndpointServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -4964,6 +4967,67 @@ export class IndexEndpointServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts index fbb528c76d47..46640b484a2b 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts @@ -269,6 +269,9 @@ export class IndexServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -4698,6 +4701,67 @@ export class IndexServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts index 489dedd41852..8731ac8ec0ab 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts @@ -269,6 +269,9 @@ export class JobServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -9106,6 +9109,67 @@ export class JobServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts index 380db2fb6ac1..cf31ab4635d5 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts @@ -262,6 +262,9 @@ export class MatchServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -2502,6 +2505,67 @@ export class MatchServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts index c18d0228468b..cefe019c5e85 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts @@ -269,6 +269,9 @@ export class MetadataServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -8484,6 +8487,67 @@ export class MetadataServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts index 91cfcbec1883..92ccd0d4dbda 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts @@ -270,6 +270,9 @@ export class MigrationServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -4128,6 +4131,67 @@ export class MigrationServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts index 5e047f3516d0..292d037a94fe 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts @@ -261,6 +261,9 @@ export class ModelGardenServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -2395,6 +2398,67 @@ export class ModelGardenServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts index eeed88a68aa4..50283fe54ccd 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts @@ -269,6 +269,9 @@ export class ModelServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -6553,6 +6556,67 @@ export class ModelServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts new file mode 100644 index 000000000000..83c30e1bca64 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts @@ -0,0 +1,5366 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/persistent_resource_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './persistent_resource_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * A service for managing Vertex AI's machine learning PersistentResource. + * @class + * @memberof v1beta1 + */ +export class PersistentResourceServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + persistentResourceServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of PersistentResourceServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new PersistentResourceServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof PersistentResourceServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + annotationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}/annotations/{annotation}' + ), + annotationSpecPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' + ), + artifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}' + ), + batchPredictionJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}' + ), + contextPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/contexts/{context}' + ), + customJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/customJobs/{custom_job}' + ), + dataItemPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}' + ), + dataLabelingJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}' + ), + datasetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}' + ), + deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' + ), + entityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' + ), + executionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/executions/{execution}' + ), + featurePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}' + ), + featurestorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}' + ), + hyperparameterTuningJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}' + ), + indexPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/indexes/{index}' + ), + indexEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + metadataSchemaPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/metadataSchemas/{metadata_schema}' + ), + metadataStorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}' + ), + modelPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}' + ), + modelDeploymentMonitoringJobPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}' + ), + modelEvaluationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}' + ), + modelEvaluationSlicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}' + ), + nasJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/nasJobs/{nas_job}' + ), + nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' + ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), + pipelineJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' + ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), + savedQueryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' + ), + schedulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schedules/{schedule}' + ), + specialistPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/specialistPools/{specialist_pool}' + ), + studyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/studies/{study}' + ), + tensorboardPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}' + ), + tensorboardExperimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}' + ), + tensorboardRunPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}' + ), + tensorboardTimeSeriesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}' + ), + trainingPipelinePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}' + ), + trialPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/studies/{study}/trials/{trial}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listPersistentResources: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'persistentResources' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/ui/{name=projects/*/locations/*}', + additional_bindings: [ + {get: '/v1beta1/{name=projects/*/locations/*}'}, + ], + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/ui/{name=projects/*}/locations', + additional_bindings: [{get: '/v1beta1/{name=projects/*}/locations'}], + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, + ], + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/ui/{name=projects/*/locations/*/operations/*}:cancel', + additional_bindings: [ + { + post: '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/models/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/edgeDevices/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/modelMonitors/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/models/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + }, + ], + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/ui/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + { + delete: + '/ui/{name=projects/*/locations/*/datasets/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/indexes/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + }, + {delete: '/ui/{name=projects/*/locations/*/models/*/operations/*}'}, + { + delete: + '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/studies/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + }, + {delete: '/v1beta1/{name=projects/*/locations/*/operations/*}'}, + { + delete: + '/v1beta1/{name=projects/*/locations/*/datasets/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/endpoints/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featurestores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/customJobs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/indexes/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/models/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, + ], + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/ui/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {get: '/ui/{name=projects/*/locations/*/datasets/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/edgeDeploymentJobs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + }, + {get: '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + }, + {get: '/ui/{name=projects/*/locations/*/indexes/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + }, + {get: '/ui/{name=projects/*/locations/*/models/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + }, + {get: '/ui/{name=projects/*/locations/*/studies/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + }, + {get: '/v1beta1/{name=projects/*/locations/*/operations/*}'}, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/endpoints/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/customJobs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/indexes/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/models/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, + ], + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/ui/{name=projects/*/locations/*}/operations', + additional_bindings: [ + {get: '/ui/{name=projects/*/locations/*/datasets/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/edgeDevices/*}/operations'}, + {get: '/ui/{name=projects/*/locations/*/endpoints/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/customJobs/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/indexes/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/indexEndpoints/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/modelMonitors/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/migratableResources/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/models/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/studies/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/studies/*/trials/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + }, + {get: '/v1beta1/{name=projects/*/locations/*}/operations'}, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/edgeDevices/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/endpoints/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/customJobs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/indexes/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/indexEndpoints/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/modelMonitors/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/migratableResources/*}/operations', + }, + {get: '/v1beta1/{name=projects/*/locations/*/models/*}/operations'}, + { + get: '/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/studies/*/trials/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/pipelineJobs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/schedules/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/specialistPools/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, + ], + }, + { + selector: 'google.longrunning.Operations.WaitOperation', + post: '/ui/{name=projects/*/locations/*/operations/*}:wait', + additional_bindings: [ + { + post: '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/models/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/studies/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + }, + {post: '/v1beta1/{name=projects/*/locations/*/operations/*}:wait'}, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/edgeDevices/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/modelMonitors/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/models/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, + ], + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createPersistentResourceResponse = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.PersistentResource' + ) as gax.protobuf.Type; + const createPersistentResourceMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata' + ) as gax.protobuf.Type; + const deletePersistentResourceResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deletePersistentResourceMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createPersistentResource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createPersistentResourceResponse.decode.bind( + createPersistentResourceResponse + ), + createPersistentResourceMetadata.decode.bind( + createPersistentResourceMetadata + ) + ), + deletePersistentResource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deletePersistentResourceResponse.decode.bind( + deletePersistentResourceResponse + ), + deletePersistentResourceMetadata.decode.bind( + deletePersistentResourceMetadata + ) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.aiplatform.v1beta1.PersistentResourceService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.persistentResourceServiceStub) { + return this.persistentResourceServiceStub; + } + + // Put together the "service stub" for + // google.cloud.aiplatform.v1beta1.PersistentResourceService. + this.persistentResourceServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.aiplatform.v1beta1.PersistentResourceService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.aiplatform.v1beta1 + .PersistentResourceService, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const persistentResourceServiceStubMethods = [ + 'createPersistentResource', + 'getPersistentResource', + 'listPersistentResources', + 'deletePersistentResource', + ]; + for (const methodName of persistentResourceServiceStubMethods) { + const callPromise = this.persistentResourceServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.persistentResourceServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'aiplatform.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'aiplatform.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Gets a PersistentResource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.aiplatform.v1beta1.PersistentResource | PersistentResource}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/persistent_resource_service.get_persistent_resource.js + * region_tag:aiplatform_v1beta1_generated_PersistentResourceService_GetPersistentResource_async + */ + getPersistentResource( + request?: protos.google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + ( + | protos.google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest + | undefined + ), + {} | undefined + ] + >; + getPersistentResource( + request: protos.google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + | protos.google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPersistentResource( + request: protos.google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + | protos.google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPersistentResource( + request?: protos.google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + | protos.google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + | protos.google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + ( + | protos.google.cloud.aiplatform.v1beta1.IGetPersistentResourceRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getPersistentResource(request, options, callback); + } + + /** + * Uploads a Model artifact into Vertex AI. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the Location to create the + * PersistentResource in. Format: `projects/{project}/locations/{location}` + * @param {google.cloud.aiplatform.v1beta1.PersistentResource} request.persistentResource + * Required. The PersistentResource to create. + * @param {string} request.persistentResourceId + * Required. The ID to use for the PersistentResource, which become the final + * component of the PersistentResource's resource name. + * + * The maximum length is 63 characters, and valid characters + * are /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js + * region_tag:aiplatform_v1beta1_generated_PersistentResourceService_CreatePersistentResource_async + */ + createPersistentResource( + request?: protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createPersistentResource( + request: protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createPersistentResource( + request: protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createPersistentResource( + request?: protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createPersistentResource( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createPersistentResource()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/persistent_resource_service.create_persistent_resource.js + * region_tag:aiplatform_v1beta1_generated_PersistentResourceService_CreatePersistentResource_async + */ + async checkCreatePersistentResourceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.aiplatform.v1beta1.PersistentResource, + protos.google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createPersistentResource, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.aiplatform.v1beta1.PersistentResource, + protos.google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata + >; + } + /** + * Deletes a PersistentResource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the PersistentResource to be deleted. + * Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js + * region_tag:aiplatform_v1beta1_generated_PersistentResourceService_DeletePersistentResource_async + */ + deletePersistentResource( + request?: protos.google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deletePersistentResource( + request: protos.google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deletePersistentResource( + request: protos.google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deletePersistentResource( + request?: protos.google.cloud.aiplatform.v1beta1.IDeletePersistentResourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deletePersistentResource( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deletePersistentResource()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/persistent_resource_service.delete_persistent_resource.js + * region_tag:aiplatform_v1beta1_generated_PersistentResourceService_DeletePersistentResource_async + */ + async checkDeletePersistentResourceProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deletePersistentResource, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata + >; + } + /** + * Lists PersistentResources in a Location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the Location to list the PersistentResources + * from. Format: `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The standard list page size. + * @param {string} [request.pageToken] + * Optional. The standard list page token. + * Typically obtained via + * {@link |ListPersistentResourceResponse.next_page_token} of the previous + * {@link |PersistentResourceService.ListPersistentResource} call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.aiplatform.v1beta1.PersistentResource | PersistentResource}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listPersistentResourcesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPersistentResources( + request?: protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IPersistentResource[], + protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest | null, + protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse + ] + >; + listPersistentResources( + request: protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, + | protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse + | null + | undefined, + protos.google.cloud.aiplatform.v1beta1.IPersistentResource + > + ): void; + listPersistentResources( + request: protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, + callback: PaginationCallback< + protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, + | protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse + | null + | undefined, + protos.google.cloud.aiplatform.v1beta1.IPersistentResource + > + ): void; + listPersistentResources( + request?: protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, + | protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse + | null + | undefined, + protos.google.cloud.aiplatform.v1beta1.IPersistentResource + >, + callback?: PaginationCallback< + protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, + | protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse + | null + | undefined, + protos.google.cloud.aiplatform.v1beta1.IPersistentResource + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IPersistentResource[], + protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest | null, + protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listPersistentResources( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the Location to list the PersistentResources + * from. Format: `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The standard list page size. + * @param {string} [request.pageToken] + * Optional. The standard list page token. + * Typically obtained via + * {@link |ListPersistentResourceResponse.next_page_token} of the previous + * {@link |PersistentResourceService.ListPersistentResource} call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.aiplatform.v1beta1.PersistentResource | PersistentResource} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listPersistentResourcesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPersistentResourcesStream( + request?: protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPersistentResources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPersistentResources.createStream( + this.innerApiCalls.listPersistentResources as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listPersistentResources`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the Location to list the PersistentResources + * from. Format: `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The standard list page size. + * @param {string} [request.pageToken] + * Optional. The standard list page token. + * Typically obtained via + * {@link |ListPersistentResourceResponse.next_page_token} of the previous + * {@link |PersistentResourceService.ListPersistentResource} call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.aiplatform.v1beta1.PersistentResource | PersistentResource}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/persistent_resource_service.list_persistent_resources.js + * region_tag:aiplatform_v1beta1_generated_PersistentResourceService_ListPersistentResources_async + */ + listPersistentResourcesAsync( + request?: protos.google.cloud.aiplatform.v1beta1.IListPersistentResourcesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPersistentResources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPersistentResources.asyncIterate( + this.innerApiCalls['listPersistentResources'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified annotation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} data_item + * @param {string} annotation + * @returns {string} Resource name string. + */ + annotationPath( + project: string, + location: string, + dataset: string, + dataItem: string, + annotation: string + ) { + return this.pathTemplates.annotationPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + data_item: dataItem, + annotation: annotation, + }); + } + + /** + * Parse the project from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .project; + } + + /** + * Parse the location from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .location; + } + + /** + * Parse the dataset from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .dataset; + } + + /** + * Parse the data_item from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the data_item. + */ + matchDataItemFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .data_item; + } + + /** + * Parse the annotation from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the annotation. + */ + matchAnnotationFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .annotation; + } + + /** + * Return a fully-qualified annotationSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} annotation_spec + * @returns {string} Resource name string. + */ + annotationSpecPath( + project: string, + location: string, + dataset: string, + annotationSpec: string + ) { + return this.pathTemplates.annotationSpecPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + annotation_spec: annotationSpec, + }); + } + + /** + * Parse the project from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).project; + } + + /** + * Parse the location from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).location; + } + + /** + * Parse the dataset from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).dataset; + } + + /** + * Parse the annotation_spec from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the annotation_spec. + */ + matchAnnotationSpecFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).annotation_spec; + } + + /** + * Return a fully-qualified artifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} artifact + * @returns {string} Resource name string. + */ + artifactPath( + project: string, + location: string, + metadataStore: string, + artifact: string + ) { + return this.pathTemplates.artifactPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + artifact: artifact, + }); + } + + /** + * Parse the project from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).project; + } + + /** + * Parse the location from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).location; + } + + /** + * Parse the metadata_store from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName) + .metadata_store; + } + + /** + * Parse the artifact from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).artifact; + } + + /** + * Return a fully-qualified batchPredictionJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} batch_prediction_job + * @returns {string} Resource name string. + */ + batchPredictionJobPath( + project: string, + location: string, + batchPredictionJob: string + ) { + return this.pathTemplates.batchPredictionJobPathTemplate.render({ + project: project, + location: location, + batch_prediction_job: batchPredictionJob, + }); + } + + /** + * Parse the project from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBatchPredictionJobName(batchPredictionJobName: string) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).project; + } + + /** + * Parse the location from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBatchPredictionJobName(batchPredictionJobName: string) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).location; + } + + /** + * Parse the batch_prediction_job from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the batch_prediction_job. + */ + matchBatchPredictionJobFromBatchPredictionJobName( + batchPredictionJobName: string + ) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).batch_prediction_job; + } + + /** + * Return a fully-qualified context resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} context + * @returns {string} Resource name string. + */ + contextPath( + project: string, + location: string, + metadataStore: string, + context: string + ) { + return this.pathTemplates.contextPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + context: context, + }); + } + + /** + * Parse the project from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).project; + } + + /** + * Parse the location from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).location; + } + + /** + * Parse the metadata_store from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName) + .metadata_store; + } + + /** + * Parse the context from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the context. + */ + matchContextFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).context; + } + + /** + * Return a fully-qualified customJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} custom_job + * @returns {string} Resource name string. + */ + customJobPath(project: string, location: string, customJob: string) { + return this.pathTemplates.customJobPathTemplate.render({ + project: project, + location: location, + custom_job: customJob, + }); + } + + /** + * Parse the project from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .project; + } + + /** + * Parse the location from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .location; + } + + /** + * Parse the custom_job from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the custom_job. + */ + matchCustomJobFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .custom_job; + } + + /** + * Return a fully-qualified dataItem resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} data_item + * @returns {string} Resource name string. + */ + dataItemPath( + project: string, + location: string, + dataset: string, + dataItem: string + ) { + return this.pathTemplates.dataItemPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + data_item: dataItem, + }); + } + + /** + * Parse the project from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).project; + } + + /** + * Parse the location from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).location; + } + + /** + * Parse the dataset from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).dataset; + } + + /** + * Parse the data_item from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the data_item. + */ + matchDataItemFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName) + .data_item; + } + + /** + * Return a fully-qualified dataLabelingJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_labeling_job + * @returns {string} Resource name string. + */ + dataLabelingJobPath( + project: string, + location: string, + dataLabelingJob: string + ) { + return this.pathTemplates.dataLabelingJobPathTemplate.render({ + project: project, + location: location, + data_labeling_job: dataLabelingJob, + }); + } + + /** + * Parse the project from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).project; + } + + /** + * Parse the location from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).location; + } + + /** + * Parse the data_labeling_job from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the data_labeling_job. + */ + matchDataLabelingJobFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).data_labeling_job; + } + + /** + * Return a fully-qualified dataset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @returns {string} Resource name string. + */ + datasetPath(project: string, location: string, dataset: string) { + return this.pathTemplates.datasetPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + }); + } + + /** + * Parse the project from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).project; + } + + /** + * Parse the location from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).location; + } + + /** + * Parse the dataset from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; + } + + /** + * Return a fully-qualified deploymentResourcePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} deployment_resource_pool + * @returns {string} Resource name string. + */ + deploymentResourcePoolPath( + project: string, + location: string, + deploymentResourcePool: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.render({ + project: project, + location: location, + deployment_resource_pool: deploymentResourcePool, + }); + } + + /** + * Parse the project from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).project; + } + + /** + * Parse the location from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).location; + } + + /** + * Parse the deployment_resource_pool from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the deployment_resource_pool. + */ + matchDeploymentResourcePoolFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).deployment_resource_pool; + } + + /** + * Return a fully-qualified entityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @param {string} entity_type + * @returns {string} Resource name string. + */ + entityTypePath( + project: string, + location: string, + featurestore: string, + entityType: string + ) { + return this.pathTemplates.entityTypePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + entity_type: entityType, + }); + } + + /** + * Parse the project from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .project; + } + + /** + * Parse the location from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .location; + } + + /** + * Parse the featurestore from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .featurestore; + } + + /** + * Parse the entity_type from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .entity_type; + } + + /** + * Return a fully-qualified execution resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} execution + * @returns {string} Resource name string. + */ + executionPath( + project: string, + location: string, + metadataStore: string, + execution: string + ) { + return this.pathTemplates.executionPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + execution: execution, + }); + } + + /** + * Parse the project from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .project; + } + + /** + * Parse the location from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .location; + } + + /** + * Parse the metadata_store from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .metadata_store; + } + + /** + * Parse the execution from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the execution. + */ + matchExecutionFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .execution; + } + + /** + * Return a fully-qualified feature resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @param {string} entity_type + * @param {string} feature + * @returns {string} Resource name string. + */ + featurePath( + project: string, + location: string, + featurestore: string, + entityType: string, + feature: string + ) { + return this.pathTemplates.featurePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + entity_type: entityType, + feature: feature, + }); + } + + /** + * Parse the project from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName).project; + } + + /** + * Parse the location from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName).location; + } + + /** + * Parse the featurestore from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName) + .featurestore; + } + + /** + * Parse the entity_type from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName) + .entity_type; + } + + /** + * Parse the feature from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the feature. + */ + matchFeatureFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName).feature; + } + + /** + * Return a fully-qualified featurestore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @returns {string} Resource name string. + */ + featurestorePath(project: string, location: string, featurestore: string) { + return this.pathTemplates.featurestorePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + }); + } + + /** + * Parse the project from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .project; + } + + /** + * Parse the location from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .location; + } + + /** + * Parse the featurestore from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .featurestore; + } + + /** + * Return a fully-qualified hyperparameterTuningJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} hyperparameter_tuning_job + * @returns {string} Resource name string. + */ + hyperparameterTuningJobPath( + project: string, + location: string, + hyperparameterTuningJob: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.render({ + project: project, + location: location, + hyperparameter_tuning_job: hyperparameterTuningJob, + }); + } + + /** + * Parse the project from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).project; + } + + /** + * Parse the location from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).location; + } + + /** + * Parse the hyperparameter_tuning_job from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the hyperparameter_tuning_job. + */ + matchHyperparameterTuningJobFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).hyperparameter_tuning_job; + } + + /** + * Return a fully-qualified index resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} index + * @returns {string} Resource name string. + */ + indexPath(project: string, location: string, index: string) { + return this.pathTemplates.indexPathTemplate.render({ + project: project, + location: location, + index: index, + }); + } + + /** + * Parse the project from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).project; + } + + /** + * Parse the location from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).location; + } + + /** + * Parse the index from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the index. + */ + matchIndexFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).index; + } + + /** + * Return a fully-qualified indexEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} index_endpoint + * @returns {string} Resource name string. + */ + indexEndpointPath(project: string, location: string, indexEndpoint: string) { + return this.pathTemplates.indexEndpointPathTemplate.render({ + project: project, + location: location, + index_endpoint: indexEndpoint, + }); + } + + /** + * Parse the project from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .project; + } + + /** + * Parse the location from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .location; + } + + /** + * Parse the index_endpoint from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the index_endpoint. + */ + matchIndexEndpointFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .index_endpoint; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified metadataSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} metadata_schema + * @returns {string} Resource name string. + */ + metadataSchemaPath( + project: string, + location: string, + metadataStore: string, + metadataSchema: string + ) { + return this.pathTemplates.metadataSchemaPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + metadata_schema: metadataSchema, + }); + } + + /** + * Parse the project from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).project; + } + + /** + * Parse the location from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).location; + } + + /** + * Parse the metadata_store from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).metadata_store; + } + + /** + * Parse the metadata_schema from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the metadata_schema. + */ + matchMetadataSchemaFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).metadata_schema; + } + + /** + * Return a fully-qualified metadataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @returns {string} Resource name string. + */ + metadataStorePath(project: string, location: string, metadataStore: string) { + return this.pathTemplates.metadataStorePathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + }); + } + + /** + * Parse the project from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .project; + } + + /** + * Parse the location from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .location; + } + + /** + * Parse the metadata_store from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .metadata_store; + } + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(project: string, location: string, model: string) { + return this.pathTemplates.modelPathTemplate.render({ + project: project, + location: location, + model: model, + }); + } + + /** + * Parse the project from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).project; + } + + /** + * Parse the location from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).location; + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * Return a fully-qualified modelDeploymentMonitoringJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model_deployment_monitoring_job + * @returns {string} Resource name string. + */ + modelDeploymentMonitoringJobPath( + project: string, + location: string, + modelDeploymentMonitoringJob: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.render({ + project: project, + location: location, + model_deployment_monitoring_job: modelDeploymentMonitoringJob, + }); + } + + /** + * Parse the project from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).project; + } + + /** + * Parse the location from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).location; + } + + /** + * Parse the model_deployment_monitoring_job from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the model_deployment_monitoring_job. + */ + matchModelDeploymentMonitoringJobFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).model_deployment_monitoring_job; + } + + /** + * Return a fully-qualified modelEvaluation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} evaluation + * @returns {string} Resource name string. + */ + modelEvaluationPath( + project: string, + location: string, + model: string, + evaluation: string + ) { + return this.pathTemplates.modelEvaluationPathTemplate.render({ + project: project, + location: location, + model: model, + evaluation: evaluation, + }); + } + + /** + * Parse the project from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).project; + } + + /** + * Parse the location from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).location; + } + + /** + * Parse the model from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model; + } + + /** + * Parse the evaluation from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the evaluation. + */ + matchEvaluationFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).evaluation; + } + + /** + * Return a fully-qualified modelEvaluationSlice resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} evaluation + * @param {string} slice + * @returns {string} Resource name string. + */ + modelEvaluationSlicePath( + project: string, + location: string, + model: string, + evaluation: string, + slice: string + ) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.render({ + project: project, + location: location, + model: model, + evaluation: evaluation, + slice: slice, + }); + } + + /** + * Parse the project from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).project; + } + + /** + * Parse the location from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).location; + } + + /** + * Parse the model from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).model; + } + + /** + * Parse the evaluation from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the evaluation. + */ + matchEvaluationFromModelEvaluationSliceName( + modelEvaluationSliceName: string + ) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).evaluation; + } + + /** + * Parse the slice from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the slice. + */ + matchSliceFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).slice; + } + + /** + * Return a fully-qualified nasJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} nas_job + * @returns {string} Resource name string. + */ + nasJobPath(project: string, location: string, nasJob: string) { + return this.pathTemplates.nasJobPathTemplate.render({ + project: project, + location: location, + nas_job: nasJob, + }); + } + + /** + * Parse the project from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).project; + } + + /** + * Parse the location from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).location; + } + + /** + * Parse the nas_job from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the nas_job. + */ + matchNasJobFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).nas_job; + } + + /** + * Return a fully-qualified nasTrialDetail resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} nas_job + * @param {string} nas_trial_detail + * @returns {string} Resource name string. + */ + nasTrialDetailPath( + project: string, + location: string, + nasJob: string, + nasTrialDetail: string + ) { + return this.pathTemplates.nasTrialDetailPathTemplate.render({ + project: project, + location: location, + nas_job: nasJob, + nas_trial_detail: nasTrialDetail, + }); + } + + /** + * Parse the project from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the project. + */ + matchProjectFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).project; + } + + /** + * Parse the location from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).location; + } + + /** + * Parse the nas_job from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the nas_job. + */ + matchNasJobFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).nas_job; + } + + /** + * Parse the nas_trial_detail from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the nas_trial_detail. + */ + matchNasTrialDetailFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).nas_trial_detail; + } + + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + + /** + * Return a fully-qualified pipelineJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} pipeline_job + * @returns {string} Resource name string. + */ + pipelineJobPath(project: string, location: string, pipelineJob: string) { + return this.pathTemplates.pipelineJobPathTemplate.render({ + project: project, + location: location, + pipeline_job: pipelineJob, + }); + } + + /** + * Parse the project from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .project; + } + + /** + * Parse the location from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .location; + } + + /** + * Parse the pipeline_job from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the pipeline_job. + */ + matchPipelineJobFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .pipeline_job; + } + + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + + /** + * Return a fully-qualified savedQuery resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} saved_query + * @returns {string} Resource name string. + */ + savedQueryPath( + project: string, + location: string, + dataset: string, + savedQuery: string + ) { + return this.pathTemplates.savedQueryPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + saved_query: savedQuery, + }); + } + + /** + * Parse the project from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .project; + } + + /** + * Parse the location from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .location; + } + + /** + * Parse the dataset from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .dataset; + } + + /** + * Parse the saved_query from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the saved_query. + */ + matchSavedQueryFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .saved_query; + } + + /** + * Return a fully-qualified schedule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schedule + * @returns {string} Resource name string. + */ + schedulePath(project: string, location: string, schedule: string) { + return this.pathTemplates.schedulePathTemplate.render({ + project: project, + location: location, + schedule: schedule, + }); + } + + /** + * Parse the project from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the project. + */ + matchProjectFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).project; + } + + /** + * Parse the location from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the location. + */ + matchLocationFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).location; + } + + /** + * Parse the schedule from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the schedule. + */ + matchScheduleFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).schedule; + } + + /** + * Return a fully-qualified specialistPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} specialist_pool + * @returns {string} Resource name string. + */ + specialistPoolPath( + project: string, + location: string, + specialistPool: string + ) { + return this.pathTemplates.specialistPoolPathTemplate.render({ + project: project, + location: location, + specialist_pool: specialistPool, + }); + } + + /** + * Parse the project from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).project; + } + + /** + * Parse the location from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).location; + } + + /** + * Parse the specialist_pool from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the specialist_pool. + */ + matchSpecialistPoolFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).specialist_pool; + } + + /** + * Return a fully-qualified study resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} study + * @returns {string} Resource name string. + */ + studyPath(project: string, location: string, study: string) { + return this.pathTemplates.studyPathTemplate.render({ + project: project, + location: location, + study: study, + }); + } + + /** + * Parse the project from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the project. + */ + matchProjectFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).project; + } + + /** + * Parse the location from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the location. + */ + matchLocationFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).location; + } + + /** + * Parse the study from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the study. + */ + matchStudyFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).study; + } + + /** + * Return a fully-qualified tensorboard resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @returns {string} Resource name string. + */ + tensorboardPath(project: string, location: string, tensorboard: string) { + return this.pathTemplates.tensorboardPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + }); + } + + /** + * Parse the project from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .project; + } + + /** + * Parse the location from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .location; + } + + /** + * Parse the tensorboard from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .tensorboard; + } + + /** + * Return a fully-qualified tensorboardExperiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @returns {string} Resource name string. + */ + tensorboardExperimentPath( + project: string, + location: string, + tensorboard: string, + experiment: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + }); + } + + /** + * Parse the project from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardExperimentName(tensorboardExperimentName: string) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).project; + } + + /** + * Parse the location from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).location; + } + + /** + * Parse the tensorboard from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).experiment; + } + + /** + * Return a fully-qualified tensorboardRun resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @param {string} run + * @returns {string} Resource name string. + */ + tensorboardRunPath( + project: string, + location: string, + tensorboard: string, + experiment: string, + run: string + ) { + return this.pathTemplates.tensorboardRunPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + run: run, + }); + } + + /** + * Parse the project from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).project; + } + + /** + * Parse the location from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).location; + } + + /** + * Parse the tensorboard from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).experiment; + } + + /** + * Parse the run from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the run. + */ + matchRunFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).run; + } + + /** + * Return a fully-qualified tensorboardTimeSeries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @param {string} run + * @param {string} time_series + * @returns {string} Resource name string. + */ + tensorboardTimeSeriesPath( + project: string, + location: string, + tensorboard: string, + experiment: string, + run: string, + timeSeries: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + run: run, + time_series: timeSeries, + }); + } + + /** + * Parse the project from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardTimeSeriesName(tensorboardTimeSeriesName: string) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).project; + } + + /** + * Parse the location from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).location; + } + + /** + * Parse the tensorboard from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).experiment; + } + + /** + * Parse the run from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the run. + */ + matchRunFromTensorboardTimeSeriesName(tensorboardTimeSeriesName: string) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).run; + } + + /** + * Parse the time_series from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the time_series. + */ + matchTimeSeriesFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).time_series; + } + + /** + * Return a fully-qualified trainingPipeline resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} training_pipeline + * @returns {string} Resource name string. + */ + trainingPipelinePath( + project: string, + location: string, + trainingPipeline: string + ) { + return this.pathTemplates.trainingPipelinePathTemplate.render({ + project: project, + location: location, + training_pipeline: trainingPipeline, + }); + } + + /** + * Parse the project from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).project; + } + + /** + * Parse the location from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).location; + } + + /** + * Parse the training_pipeline from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the training_pipeline. + */ + matchTrainingPipelineFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).training_pipeline; + } + + /** + * Return a fully-qualified trial resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} study + * @param {string} trial + * @returns {string} Resource name string. + */ + trialPath(project: string, location: string, study: string, trial: string) { + return this.pathTemplates.trialPathTemplate.render({ + project: project, + location: location, + study: study, + trial: trial, + }); + } + + /** + * Parse the project from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).project; + } + + /** + * Parse the location from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).location; + } + + /** + * Parse the study from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the study. + */ + matchStudyFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).study; + } + + /** + * Parse the trial from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the trial. + */ + matchTrialFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).trial; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.persistentResourceServiceStub && !this._terminated) { + return this.persistentResourceServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client_config.json new file mode 100644 index 000000000000..7c78985843d0 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client_config.json @@ -0,0 +1,42 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1beta1.PersistentResourceService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreatePersistentResource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPersistentResource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListPersistentResources": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeletePersistentResource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json new file mode 100644 index 000000000000..92a087a6bde4 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json @@ -0,0 +1,131 @@ +[ + "../../protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto", + "../../protos/google/cloud/aiplatform/v1beta1/annotation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/annotation_spec.proto", + "../../protos/google/cloud/aiplatform/v1beta1/artifact.proto", + "../../protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/completion_stats.proto", + "../../protos/google/cloud/aiplatform/v1beta1/context.proto", + "../../protos/google/cloud/aiplatform/v1beta1/custom_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/data_item.proto", + "../../protos/google/cloud/aiplatform/v1beta1/data_labeling_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployed_index_ref.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployed_model_ref.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/encryption_spec.proto", + "../../protos/google/cloud/aiplatform/v1beta1/endpoint.proto", + "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", + "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/event.proto", + "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", + "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/explanation_metadata.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_monitoring_stats.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_selector.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_online_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/hyperparameter_tuning_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/io.proto", + "../../protos/google/cloud/aiplatform/v1beta1/job_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/job_state.proto", + "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", + "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", + "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", + "../../protos/google/cloud/aiplatform/v1beta1/migratable_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/migration_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", + "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/annotation_payload.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/data_item_payload.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/dataset_metadata.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/geometry.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_time_series_forecasting.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto", + "../../protos/google/cloud/aiplatform/v1beta1/service_networking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/specialist_pool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/specialist_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/study.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_data.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_run.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_time_series.proto", + "../../protos/google/cloud/aiplatform/v1beta1/training_pipeline.proto", + "../../protos/google/cloud/aiplatform/v1beta1/types.proto", + "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", + "../../protos/google/cloud/aiplatform/v1beta1/value.proto", + "../../protos/google/cloud/aiplatform/v1beta1/vizier_service.proto" +] diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts index 821d5c246614..6b3f2031d285 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts @@ -271,6 +271,9 @@ export class PipelineServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -5312,6 +5315,67 @@ export class PipelineServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts index 523aac1bd94b..2fbbb6f703a2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts @@ -261,6 +261,9 @@ export class PredictionServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -2641,6 +2644,67 @@ export class PredictionServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts index 7472c2467c5f..7f8bb1c63a0d 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts @@ -270,6 +270,9 @@ export class ScheduleServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -4723,6 +4726,67 @@ export class ScheduleServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts index b884a55a6147..7b35cd3df7a1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts @@ -275,6 +275,9 @@ export class SpecialistPoolServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -4499,6 +4502,67 @@ export class SpecialistPoolServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts index 429c11a3f812..e8255c654c1d 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts @@ -269,6 +269,9 @@ export class TensorboardServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -1678,10 +1681,11 @@ export class TensorboardServiceClient { const tensorboardServiceStubMethods = [ 'createTensorboard', 'getTensorboard', - 'readTensorboardUsage', 'updateTensorboard', 'listTensorboards', 'deleteTensorboard', + 'readTensorboardUsage', + 'readTensorboardSize', 'createTensorboardExperiment', 'getTensorboardExperiment', 'updateTensorboardExperiment', @@ -1996,6 +2000,105 @@ export class TensorboardServiceClient { this.initialize(); return this.innerApiCalls.readTensorboardUsage(request, options, callback); } + /** + * Returns the storage size for a given TensorBoard instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.tensorboard + * Required. The name of the Tensorboard resource. + * Format: + * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse | ReadTensorboardSizeResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/tensorboard_service.read_tensorboard_size.js + * region_tag:aiplatform_v1beta1_generated_TensorboardService_ReadTensorboardSize_async + */ + readTensorboardSize( + request?: protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse, + ( + | protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest + | undefined + ), + {} | undefined + ] + >; + readTensorboardSize( + request: protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse, + | protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest + | null + | undefined, + {} | null | undefined + > + ): void; + readTensorboardSize( + request: protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse, + | protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest + | null + | undefined, + {} | null | undefined + > + ): void; + readTensorboardSize( + request?: protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse, + | protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse, + | protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse, + ( + | protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + tensorboard: request.tensorboard ?? '', + }); + this.initialize(); + return this.innerApiCalls.readTensorboardSize(request, options, callback); + } /** * Creates a TensorboardExperiment. * @@ -7792,6 +7895,67 @@ export class TensorboardServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client_config.json index 58394e25501e..05735a76d93c 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client_config.json @@ -28,10 +28,6 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "ReadTensorboardUsage": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, "UpdateTensorboard": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" @@ -44,6 +40,14 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "ReadTensorboardUsage": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadTensorboardSize": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "CreateTensorboardExperiment": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts index a2c316fec16e..671b2b26cf69 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts @@ -273,6 +273,9 @@ export class VizierServiceClient { nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), @@ -5515,6 +5518,67 @@ export class VizierServiceClient { ).nas_trial_detail; } + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + /** * Return a fully-qualified pipelineJob resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json index 403e0932291e..92a087a6bde4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json @@ -58,6 +58,8 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", diff --git a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1.ts index eda80a3e9b8f..8fa370ac42cf 100644 --- a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1.ts @@ -1427,6 +1427,200 @@ describe('v1.DatasetServiceClient', () => { }); }); + describe('deleteSavedQuery', () => { + it('invokes deleteSavedQuery without error', async () => { + const client = new datasetserviceModule.v1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.DeleteSavedQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.DeleteSavedQueryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSavedQuery = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteSavedQuery(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSavedQuery without error using callback', async () => { + const client = new datasetserviceModule.v1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.DeleteSavedQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.DeleteSavedQueryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSavedQuery = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSavedQuery( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSavedQuery with call error', async () => { + const client = new datasetserviceModule.v1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.DeleteSavedQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.DeleteSavedQueryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSavedQuery = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteSavedQuery(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSavedQuery with LRO error', async () => { + const client = new datasetserviceModule.v1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.DeleteSavedQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.DeleteSavedQueryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSavedQuery = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteSavedQuery(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteSavedQueryProgress without error', async () => { + const client = new datasetserviceModule.v1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteSavedQueryProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteSavedQueryProgress with error', async () => { + const client = new datasetserviceModule.v1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteSavedQueryProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('listDatasets', () => { it('invokes listDatasets without error', async () => { const client = new datasetserviceModule.v1.DatasetServiceClient({ diff --git a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts index cce0c4ffb5a1..208c97a76f14 100644 --- a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts @@ -1427,6 +1427,200 @@ describe('v1beta1.DatasetServiceClient', () => { }); }); + describe('deleteSavedQuery', () => { + it('invokes deleteSavedQuery without error', async () => { + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSavedQuery = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteSavedQuery(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSavedQuery without error using callback', async () => { + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSavedQuery = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSavedQuery( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSavedQuery with call error', async () => { + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSavedQuery = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteSavedQuery(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSavedQuery with LRO error', async () => { + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSavedQuery = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteSavedQuery(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSavedQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteSavedQueryProgress without error', async () => { + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteSavedQueryProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteSavedQueryProgress with error', async () => { + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteSavedQueryProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('listDatasets', () => { it('invokes listDatasets without error', async () => { const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ @@ -5814,6 +6008,83 @@ describe('v1beta1.DatasetServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts index 4cb4031b302c..379b6aae07b9 100644 --- a/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts @@ -4500,6 +4500,86 @@ describe('v1beta1.DeploymentResourcePoolServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts index e856c95d21b6..b25340e8ecc1 100644 --- a/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts @@ -4566,6 +4566,83 @@ describe('v1beta1.EndpointServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts index 45b3d5d28421..b55b8b11c298 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts @@ -3167,6 +3167,86 @@ describe('v1beta1.FeaturestoreOnlineServingServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new featurestoreonlineservingserviceModule.v1beta1.FeaturestoreOnlineServingServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts index 28e1b97b491a..cfe8a8c991bd 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts @@ -7494,6 +7494,84 @@ describe('v1beta1.FeaturestoreServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts index b2909586cce6..6d17c26126c5 100644 --- a/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts @@ -4679,6 +4679,84 @@ describe('v1beta1.IndexEndpointServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new indexendpointserviceModule.v1beta1.IndexEndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts index 54fd6ec9e721..fcad8475fd38 100644 --- a/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts @@ -4300,6 +4300,83 @@ describe('v1beta1.IndexServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new indexserviceModule.v1beta1.IndexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts index 8d1fe37ada8a..58d556f77d70 100644 --- a/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts @@ -9861,6 +9861,83 @@ describe('v1beta1.JobServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new jobserviceModule.v1beta1.JobServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts index 3bdce74e8022..79368c55dbd2 100644 --- a/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts @@ -2839,6 +2839,83 @@ describe('v1beta1.MatchServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts index 91638c5de254..c70292dd776e 100644 --- a/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts @@ -8727,6 +8727,83 @@ describe('v1beta1.MetadataServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new metadataserviceModule.v1beta1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts index de1598e16f97..e9f278eb307b 100644 --- a/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts @@ -3567,6 +3567,83 @@ describe('v1beta1.MigrationServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new migrationserviceModule.v1beta1.MigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1beta1.ts index c18ae0c08b31..ab2d8f14e3e4 100644 --- a/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1beta1.ts @@ -2759,6 +2759,84 @@ describe('v1beta1.ModelGardenServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts index 08a8ba85becf..a9fe5f34d8bd 100644 --- a/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts @@ -6582,6 +6582,83 @@ describe('v1beta1.ModelServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new modelserviceModule.v1beta1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_persistent_resource_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_persistent_resource_service_v1beta1.ts new file mode 100644 index 000000000000..d6c99b5c753f --- /dev/null +++ b/packages/google-cloud-aiplatform/test/gapic_persistent_resource_service_v1beta1.ts @@ -0,0 +1,5346 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as persistentresourceserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta1.PersistentResourceServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient + .servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient + .port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.persistentResourceServiceStub, undefined); + await client.initialize(); + assert(client.persistentResourceServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.persistentResourceServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.persistentResourceServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getPersistentResource', () => { + it('invokes getPersistentResource without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ); + client.innerApiCalls.getPersistentResource = + stubSimpleCall(expectedResponse); + const [response] = await client.getPersistentResource(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getPersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPersistentResource without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ); + client.innerApiCalls.getPersistentResource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPersistentResource( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1beta1.IPersistentResource | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getPersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPersistentResource with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPersistentResource = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getPersistentResource(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getPersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPersistentResource with closed client', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getPersistentResource(request), + expectedError + ); + }); + }); + + describe('createPersistentResource', () => { + it('invokes createPersistentResource without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createPersistentResource = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createPersistentResource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createPersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPersistentResource without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createPersistentResource = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createPersistentResource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.aiplatform.v1beta1.IPersistentResource, + protos.google.cloud.aiplatform.v1beta1.ICreatePersistentResourceOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createPersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPersistentResource with call error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPersistentResource = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createPersistentResource(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createPersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPersistentResource with LRO error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.CreatePersistentResourceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPersistentResource = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createPersistentResource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createPersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreatePersistentResourceProgress without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkCreatePersistentResourceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreatePersistentResourceProgress with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreatePersistentResourceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deletePersistentResource', () => { + it('invokes deletePersistentResource without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePersistentResource = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deletePersistentResource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deletePersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePersistentResource without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePersistentResource = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePersistentResource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deletePersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePersistentResource with call error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePersistentResource = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deletePersistentResource(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deletePersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePersistentResource with LRO error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeletePersistentResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePersistentResource = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deletePersistentResource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deletePersistentResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePersistentResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeletePersistentResourceProgress without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkDeletePersistentResourceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeletePersistentResourceProgress with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeletePersistentResourceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listPersistentResources', () => { + it('invokes listPersistentResources without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + ]; + client.innerApiCalls.listPersistentResources = + stubSimpleCall(expectedResponse); + const [response] = await client.listPersistentResources(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listPersistentResources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPersistentResources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPersistentResources without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + ]; + client.innerApiCalls.listPersistentResources = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPersistentResources( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.aiplatform.v1beta1.IPersistentResource[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listPersistentResources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPersistentResources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPersistentResources with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPersistentResources = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listPersistentResources(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listPersistentResources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPersistentResources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPersistentResourcesStream without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + ]; + client.descriptors.page.listPersistentResources.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listPersistentResourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.aiplatform.v1beta1.PersistentResource[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.aiplatform.v1beta1.PersistentResource + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listPersistentResources + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listPersistentResources, request) + ); + assert( + ( + client.descriptors.page.listPersistentResources + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPersistentResourcesStream with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listPersistentResources.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listPersistentResourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.aiplatform.v1beta1.PersistentResource[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.aiplatform.v1beta1.PersistentResource + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listPersistentResources + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listPersistentResources, request) + ); + assert( + ( + client.descriptors.page.listPersistentResources + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPersistentResources without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PersistentResource() + ), + ]; + client.descriptors.page.listPersistentResources.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.aiplatform.v1beta1.IPersistentResource[] = + []; + const iterable = client.listPersistentResourcesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listPersistentResources + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listPersistentResources + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPersistentResources with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listPersistentResources.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPersistentResourcesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.aiplatform.v1beta1.IPersistentResource[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listPersistentResources + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listPersistentResources + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('annotation', () => { + const fakePath = '/rendered/path/annotation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + data_item: 'dataItemValue', + annotation: 'annotationValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.annotationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.annotationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('annotationPath', () => { + const result = client.annotationPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'dataItemValue', + 'annotationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.annotationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAnnotationName', () => { + const result = client.matchProjectFromAnnotationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAnnotationName', () => { + const result = client.matchLocationFromAnnotationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromAnnotationName', () => { + const result = client.matchDatasetFromAnnotationName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataItemFromAnnotationName', () => { + const result = client.matchDataItemFromAnnotationName(fakePath); + assert.strictEqual(result, 'dataItemValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAnnotationFromAnnotationName', () => { + const result = client.matchAnnotationFromAnnotationName(fakePath); + assert.strictEqual(result, 'annotationValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('annotationSpec', () => { + const fakePath = '/rendered/path/annotationSpec'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + annotation_spec: 'annotationSpecValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.annotationSpecPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.annotationSpecPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('annotationSpecPath', () => { + const result = client.annotationSpecPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'annotationSpecValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.annotationSpecPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAnnotationSpecName', () => { + const result = client.matchProjectFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAnnotationSpecName', () => { + const result = client.matchLocationFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromAnnotationSpecName', () => { + const result = client.matchDatasetFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAnnotationSpecFromAnnotationSpecName', () => { + const result = + client.matchAnnotationSpecFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'annotationSpecValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('artifact', () => { + const fakePath = '/rendered/path/artifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + artifact: 'artifactValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.artifactPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.artifactPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('artifactPath', () => { + const result = client.artifactPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.artifactPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromArtifactName', () => { + const result = client.matchProjectFromArtifactName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromArtifactName', () => { + const result = client.matchLocationFromArtifactName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromArtifactName', () => { + const result = client.matchMetadataStoreFromArtifactName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromArtifactName', () => { + const result = client.matchArtifactFromArtifactName(fakePath); + assert.strictEqual(result, 'artifactValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('batchPredictionJob', () => { + const fakePath = '/rendered/path/batchPredictionJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + batch_prediction_job: 'batchPredictionJobValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.batchPredictionJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.batchPredictionJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('batchPredictionJobPath', () => { + const result = client.batchPredictionJobPath( + 'projectValue', + 'locationValue', + 'batchPredictionJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBatchPredictionJobName', () => { + const result = client.matchProjectFromBatchPredictionJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBatchPredictionJobName', () => { + const result = client.matchLocationFromBatchPredictionJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBatchPredictionJobFromBatchPredictionJobName', () => { + const result = + client.matchBatchPredictionJobFromBatchPredictionJobName(fakePath); + assert.strictEqual(result, 'batchPredictionJobValue'); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('context', () => { + const fakePath = '/rendered/path/context'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + context: 'contextValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.contextPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.contextPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('contextPath', () => { + const result = client.contextPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'contextValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.contextPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromContextName', () => { + const result = client.matchProjectFromContextName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromContextName', () => { + const result = client.matchLocationFromContextName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromContextName', () => { + const result = client.matchMetadataStoreFromContextName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchContextFromContextName', () => { + const result = client.matchContextFromContextName(fakePath); + assert.strictEqual(result, 'contextValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('customJob', () => { + const fakePath = '/rendered/path/customJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + custom_job: 'customJobValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.customJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.customJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('customJobPath', () => { + const result = client.customJobPath( + 'projectValue', + 'locationValue', + 'customJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.customJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCustomJobName', () => { + const result = client.matchProjectFromCustomJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.customJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCustomJobName', () => { + const result = client.matchLocationFromCustomJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.customJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCustomJobFromCustomJobName', () => { + const result = client.matchCustomJobFromCustomJobName(fakePath); + assert.strictEqual(result, 'customJobValue'); + assert( + (client.pathTemplates.customJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataItem', () => { + const fakePath = '/rendered/path/dataItem'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + data_item: 'dataItemValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.dataItemPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataItemPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataItemPath', () => { + const result = client.dataItemPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'dataItemValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataItemPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataItemName', () => { + const result = client.matchProjectFromDataItemName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataItemName', () => { + const result = client.matchLocationFromDataItemName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromDataItemName', () => { + const result = client.matchDatasetFromDataItemName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataItemFromDataItemName', () => { + const result = client.matchDataItemFromDataItemName(fakePath); + assert.strictEqual(result, 'dataItemValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataLabelingJob', () => { + const fakePath = '/rendered/path/dataLabelingJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_labeling_job: 'dataLabelingJobValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.dataLabelingJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataLabelingJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataLabelingJobPath', () => { + const result = client.dataLabelingJobPath( + 'projectValue', + 'locationValue', + 'dataLabelingJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataLabelingJobName', () => { + const result = client.matchProjectFromDataLabelingJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataLabelingJobName', () => { + const result = client.matchLocationFromDataLabelingJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataLabelingJobFromDataLabelingJobName', () => { + const result = + client.matchDataLabelingJobFromDataLabelingJobName(fakePath); + assert.strictEqual(result, 'dataLabelingJobValue'); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataset', () => { + const fakePath = '/rendered/path/dataset'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.datasetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.datasetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('datasetPath', () => { + const result = client.datasetPath( + 'projectValue', + 'locationValue', + 'datasetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.datasetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDatasetName', () => { + const result = client.matchProjectFromDatasetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.datasetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDatasetName', () => { + const result = client.matchLocationFromDatasetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.datasetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromDatasetName', () => { + const result = client.matchDatasetFromDatasetName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.datasetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('deploymentResourcePool', () => { + const fakePath = '/rendered/path/deploymentResourcePool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + deployment_resource_pool: 'deploymentResourcePoolValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.deploymentResourcePoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.deploymentResourcePoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('deploymentResourcePoolPath', () => { + const result = client.deploymentResourcePoolPath( + 'projectValue', + 'locationValue', + 'deploymentResourcePoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDeploymentResourcePoolName', () => { + const result = + client.matchProjectFromDeploymentResourcePoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDeploymentResourcePoolName', () => { + const result = + client.matchLocationFromDeploymentResourcePoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeploymentResourcePoolFromDeploymentResourcePoolName', () => { + const result = + client.matchDeploymentResourcePoolFromDeploymentResourcePoolName( + fakePath + ); + assert.strictEqual(result, 'deploymentResourcePoolValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entityType', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.entityTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityTypePath', () => { + const result = client.entityTypePath( + 'projectValue', + 'locationValue', + 'featurestoreValue', + 'entityTypeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityTypePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityTypeName', () => { + const result = client.matchProjectFromEntityTypeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityTypeName', () => { + const result = client.matchLocationFromEntityTypeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromEntityTypeName', () => { + const result = client.matchFeaturestoreFromEntityTypeName(fakePath); + assert.strictEqual(result, 'featurestoreValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromEntityTypeName', () => { + const result = client.matchEntityTypeFromEntityTypeName(fakePath); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('execution', () => { + const fakePath = '/rendered/path/execution'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + execution: 'executionValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.executionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.executionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('executionPath', () => { + const result = client.executionPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'executionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.executionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExecutionName', () => { + const result = client.matchProjectFromExecutionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExecutionName', () => { + const result = client.matchLocationFromExecutionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromExecutionName', () => { + const result = client.matchMetadataStoreFromExecutionName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExecutionFromExecutionName', () => { + const result = client.matchExecutionFromExecutionName(fakePath); + assert.strictEqual(result, 'executionValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('feature', () => { + const fakePath = '/rendered/path/feature'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + feature: 'featureValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.featurePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featurePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featurePath', () => { + const result = client.featurePath( + 'projectValue', + 'locationValue', + 'featurestoreValue', + 'entityTypeValue', + 'featureValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featurePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureName', () => { + const result = client.matchProjectFromFeatureName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureName', () => { + const result = client.matchLocationFromFeatureName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromFeatureName', () => { + const result = client.matchFeaturestoreFromFeatureName(fakePath); + assert.strictEqual(result, 'featurestoreValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromFeatureName', () => { + const result = client.matchEntityTypeFromFeatureName(fakePath); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureFromFeatureName', () => { + const result = client.matchFeatureFromFeatureName(fakePath); + assert.strictEqual(result, 'featureValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('featurestore', () => { + const fakePath = '/rendered/path/featurestore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.featurestorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featurestorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featurestorePath', () => { + const result = client.featurestorePath( + 'projectValue', + 'locationValue', + 'featurestoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featurestorePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeaturestoreName', () => { + const result = client.matchProjectFromFeaturestoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featurestorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeaturestoreName', () => { + const result = client.matchLocationFromFeaturestoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featurestorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromFeaturestoreName', () => { + const result = client.matchFeaturestoreFromFeaturestoreName(fakePath); + assert.strictEqual(result, 'featurestoreValue'); + assert( + (client.pathTemplates.featurestorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('hyperparameterTuningJob', () => { + const fakePath = '/rendered/path/hyperparameterTuningJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + hyperparameter_tuning_job: 'hyperparameterTuningJobValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.hyperparameterTuningJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.hyperparameterTuningJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('hyperparameterTuningJobPath', () => { + const result = client.hyperparameterTuningJobPath( + 'projectValue', + 'locationValue', + 'hyperparameterTuningJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromHyperparameterTuningJobName', () => { + const result = + client.matchProjectFromHyperparameterTuningJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromHyperparameterTuningJobName', () => { + const result = + client.matchLocationFromHyperparameterTuningJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchHyperparameterTuningJobFromHyperparameterTuningJobName', () => { + const result = + client.matchHyperparameterTuningJobFromHyperparameterTuningJobName( + fakePath + ); + assert.strictEqual(result, 'hyperparameterTuningJobValue'); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('index', () => { + const fakePath = '/rendered/path/index'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + index: 'indexValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.indexPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.indexPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('indexPath', () => { + const result = client.indexPath( + 'projectValue', + 'locationValue', + 'indexValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.indexPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIndexName', () => { + const result = client.matchProjectFromIndexName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.indexPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIndexName', () => { + const result = client.matchLocationFromIndexName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.indexPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIndexFromIndexName', () => { + const result = client.matchIndexFromIndexName(fakePath); + assert.strictEqual(result, 'indexValue'); + assert( + (client.pathTemplates.indexPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('indexEndpoint', () => { + const fakePath = '/rendered/path/indexEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + index_endpoint: 'indexEndpointValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.indexEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.indexEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('indexEndpointPath', () => { + const result = client.indexEndpointPath( + 'projectValue', + 'locationValue', + 'indexEndpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.indexEndpointPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIndexEndpointName', () => { + const result = client.matchProjectFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIndexEndpointName', () => { + const result = client.matchLocationFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIndexEndpointFromIndexEndpointName', () => { + const result = client.matchIndexEndpointFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'indexEndpointValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('metadataSchema', () => { + const fakePath = '/rendered/path/metadataSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + metadata_schema: 'metadataSchemaValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.metadataSchemaPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataSchemaPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataSchemaPath', () => { + const result = client.metadataSchemaPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'metadataSchemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataSchemaName', () => { + const result = client.matchProjectFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataSchemaName', () => { + const result = client.matchLocationFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromMetadataSchemaName', () => { + const result = + client.matchMetadataStoreFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataSchemaFromMetadataSchemaName', () => { + const result = + client.matchMetadataSchemaFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'metadataSchemaValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('metadataStore', () => { + const fakePath = '/rendered/path/metadataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.metadataStorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataStorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataStorePath', () => { + const result = client.metadataStorePath( + 'projectValue', + 'locationValue', + 'metadataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataStorePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataStoreName', () => { + const result = client.matchProjectFromMetadataStoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataStorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataStoreName', () => { + const result = client.matchLocationFromMetadataStoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataStorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromMetadataStoreName', () => { + const result = client.matchMetadataStoreFromMetadataStoreName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.metadataStorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('model', () => { + const fakePath = '/rendered/path/model'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model: 'modelValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.modelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelPath', () => { + const result = client.modelPath( + 'projectValue', + 'locationValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.modelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelName', () => { + const result = client.matchProjectFromModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelName', () => { + const result = client.matchLocationFromModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromModelName', () => { + const result = client.matchModelFromModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('modelDeploymentMonitoringJob', () => { + const fakePath = '/rendered/path/modelDeploymentMonitoringJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model_deployment_monitoring_job: 'modelDeploymentMonitoringJobValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('modelDeploymentMonitoringJobPath', () => { + const result = client.modelDeploymentMonitoringJobPath( + 'projectValue', + 'locationValue', + 'modelDeploymentMonitoringJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelDeploymentMonitoringJobName', () => { + const result = + client.matchProjectFromModelDeploymentMonitoringJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelDeploymentMonitoringJobName', () => { + const result = + client.matchLocationFromModelDeploymentMonitoringJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelDeploymentMonitoringJobFromModelDeploymentMonitoringJobName', () => { + const result = + client.matchModelDeploymentMonitoringJobFromModelDeploymentMonitoringJobName( + fakePath + ); + assert.strictEqual(result, 'modelDeploymentMonitoringJobValue'); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('modelEvaluation', () => { + const fakePath = '/rendered/path/modelEvaluation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model: 'modelValue', + evaluation: 'evaluationValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.modelEvaluationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelEvaluationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelEvaluationPath', () => { + const result = client.modelEvaluationPath( + 'projectValue', + 'locationValue', + 'modelValue', + 'evaluationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelEvaluationName', () => { + const result = client.matchProjectFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelEvaluationName', () => { + const result = client.matchLocationFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromModelEvaluationName', () => { + const result = client.matchModelFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEvaluationFromModelEvaluationName', () => { + const result = client.matchEvaluationFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'evaluationValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('modelEvaluationSlice', () => { + const fakePath = '/rendered/path/modelEvaluationSlice'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model: 'modelValue', + evaluation: 'evaluationValue', + slice: 'sliceValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.modelEvaluationSlicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelEvaluationSlicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelEvaluationSlicePath', () => { + const result = client.modelEvaluationSlicePath( + 'projectValue', + 'locationValue', + 'modelValue', + 'evaluationValue', + 'sliceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelEvaluationSliceName', () => { + const result = + client.matchProjectFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelEvaluationSliceName', () => { + const result = + client.matchLocationFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromModelEvaluationSliceName', () => { + const result = client.matchModelFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEvaluationFromModelEvaluationSliceName', () => { + const result = + client.matchEvaluationFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'evaluationValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSliceFromModelEvaluationSliceName', () => { + const result = client.matchSliceFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'sliceValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('nasJob', () => { + const fakePath = '/rendered/path/nasJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + nas_job: 'nasJobValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.nasJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.nasJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('nasJobPath', () => { + const result = client.nasJobPath( + 'projectValue', + 'locationValue', + 'nasJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.nasJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromNasJobName', () => { + const result = client.matchProjectFromNasJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.nasJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromNasJobName', () => { + const result = client.matchLocationFromNasJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.nasJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasJobFromNasJobName', () => { + const result = client.matchNasJobFromNasJobName(fakePath); + assert.strictEqual(result, 'nasJobValue'); + assert( + (client.pathTemplates.nasJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('nasTrialDetail', () => { + const fakePath = '/rendered/path/nasTrialDetail'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + nas_job: 'nasJobValue', + nas_trial_detail: 'nasTrialDetailValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.nasTrialDetailPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.nasTrialDetailPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('nasTrialDetailPath', () => { + const result = client.nasTrialDetailPath( + 'projectValue', + 'locationValue', + 'nasJobValue', + 'nasTrialDetailValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromNasTrialDetailName', () => { + const result = client.matchProjectFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromNasTrialDetailName', () => { + const result = client.matchLocationFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasJobFromNasTrialDetailName', () => { + const result = client.matchNasJobFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'nasJobValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasTrialDetailFromNasTrialDetailName', () => { + const result = + client.matchNasTrialDetailFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'nasTrialDetailValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('pipelineJob', () => { + const fakePath = '/rendered/path/pipelineJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + pipeline_job: 'pipelineJobValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.pipelineJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.pipelineJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('pipelineJobPath', () => { + const result = client.pipelineJobPath( + 'projectValue', + 'locationValue', + 'pipelineJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.pipelineJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPipelineJobName', () => { + const result = client.matchProjectFromPipelineJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.pipelineJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPipelineJobName', () => { + const result = client.matchLocationFromPipelineJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.pipelineJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPipelineJobFromPipelineJobName', () => { + const result = client.matchPipelineJobFromPipelineJobName(fakePath); + assert.strictEqual(result, 'pipelineJobValue'); + assert( + (client.pathTemplates.pipelineJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('savedQuery', () => { + const fakePath = '/rendered/path/savedQuery'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + saved_query: 'savedQueryValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.savedQueryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.savedQueryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('savedQueryPath', () => { + const result = client.savedQueryPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'savedQueryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.savedQueryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSavedQueryName', () => { + const result = client.matchProjectFromSavedQueryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSavedQueryName', () => { + const result = client.matchLocationFromSavedQueryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromSavedQueryName', () => { + const result = client.matchDatasetFromSavedQueryName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSavedQueryFromSavedQueryName', () => { + const result = client.matchSavedQueryFromSavedQueryName(fakePath); + assert.strictEqual(result, 'savedQueryValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('schedule', () => { + const fakePath = '/rendered/path/schedule'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + schedule: 'scheduleValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.schedulePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.schedulePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('schedulePath', () => { + const result = client.schedulePath( + 'projectValue', + 'locationValue', + 'scheduleValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.schedulePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromScheduleName', () => { + const result = client.matchProjectFromScheduleName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromScheduleName', () => { + const result = client.matchLocationFromScheduleName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchScheduleFromScheduleName', () => { + const result = client.matchScheduleFromScheduleName(fakePath); + assert.strictEqual(result, 'scheduleValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('specialistPool', () => { + const fakePath = '/rendered/path/specialistPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + specialist_pool: 'specialistPoolValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.specialistPoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.specialistPoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('specialistPoolPath', () => { + const result = client.specialistPoolPath( + 'projectValue', + 'locationValue', + 'specialistPoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.specialistPoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSpecialistPoolName', () => { + const result = client.matchProjectFromSpecialistPoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.specialistPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSpecialistPoolName', () => { + const result = client.matchLocationFromSpecialistPoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.specialistPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSpecialistPoolFromSpecialistPoolName', () => { + const result = + client.matchSpecialistPoolFromSpecialistPoolName(fakePath); + assert.strictEqual(result, 'specialistPoolValue'); + assert( + (client.pathTemplates.specialistPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('study', () => { + const fakePath = '/rendered/path/study'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + study: 'studyValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.studyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.studyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('studyPath', () => { + const result = client.studyPath( + 'projectValue', + 'locationValue', + 'studyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.studyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromStudyName', () => { + const result = client.matchProjectFromStudyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.studyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromStudyName', () => { + const result = client.matchLocationFromStudyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.studyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchStudyFromStudyName', () => { + const result = client.matchStudyFromStudyName(fakePath); + assert.strictEqual(result, 'studyValue'); + assert( + (client.pathTemplates.studyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboard', () => { + const fakePath = '/rendered/path/tensorboard'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.tensorboardPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardPath', () => { + const result = client.tensorboardPath( + 'projectValue', + 'locationValue', + 'tensorboardValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tensorboardPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardName', () => { + const result = client.matchProjectFromTensorboardName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.tensorboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardName', () => { + const result = client.matchLocationFromTensorboardName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.tensorboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardName', () => { + const result = client.matchTensorboardFromTensorboardName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + (client.pathTemplates.tensorboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboardExperiment', () => { + const fakePath = '/rendered/path/tensorboardExperiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + experiment: 'experimentValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.tensorboardExperimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardExperimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardExperimentPath', () => { + const result = client.tensorboardExperimentPath( + 'projectValue', + 'locationValue', + 'tensorboardValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardExperimentName', () => { + const result = + client.matchProjectFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardExperimentName', () => { + const result = + client.matchLocationFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardExperimentName', () => { + const result = + client.matchTensorboardFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromTensorboardExperimentName', () => { + const result = + client.matchExperimentFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboardRun', () => { + const fakePath = '/rendered/path/tensorboardRun'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + experiment: 'experimentValue', + run: 'runValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.tensorboardRunPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardRunPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardRunPath', () => { + const result = client.tensorboardRunPath( + 'projectValue', + 'locationValue', + 'tensorboardValue', + 'experimentValue', + 'runValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardRunName', () => { + const result = client.matchProjectFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardRunName', () => { + const result = client.matchLocationFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardRunName', () => { + const result = client.matchTensorboardFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromTensorboardRunName', () => { + const result = client.matchExperimentFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRunFromTensorboardRunName', () => { + const result = client.matchRunFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'runValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboardTimeSeries', () => { + const fakePath = '/rendered/path/tensorboardTimeSeries'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + experiment: 'experimentValue', + run: 'runValue', + time_series: 'timeSeriesValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.tensorboardTimeSeriesPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardTimeSeriesPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardTimeSeriesPath', () => { + const result = client.tensorboardTimeSeriesPath( + 'projectValue', + 'locationValue', + 'tensorboardValue', + 'experimentValue', + 'runValue', + 'timeSeriesValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardTimeSeriesName', () => { + const result = + client.matchProjectFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardTimeSeriesName', () => { + const result = + client.matchLocationFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardTimeSeriesName', () => { + const result = + client.matchTensorboardFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromTensorboardTimeSeriesName', () => { + const result = + client.matchExperimentFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRunFromTensorboardTimeSeriesName', () => { + const result = client.matchRunFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'runValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTimeSeriesFromTensorboardTimeSeriesName', () => { + const result = + client.matchTimeSeriesFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'timeSeriesValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('trainingPipeline', () => { + const fakePath = '/rendered/path/trainingPipeline'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + training_pipeline: 'trainingPipelineValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.trainingPipelinePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.trainingPipelinePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('trainingPipelinePath', () => { + const result = client.trainingPipelinePath( + 'projectValue', + 'locationValue', + 'trainingPipelineValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.trainingPipelinePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTrainingPipelineName', () => { + const result = client.matchProjectFromTrainingPipelineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.trainingPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTrainingPipelineName', () => { + const result = client.matchLocationFromTrainingPipelineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.trainingPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTrainingPipelineFromTrainingPipelineName', () => { + const result = + client.matchTrainingPipelineFromTrainingPipelineName(fakePath); + assert.strictEqual(result, 'trainingPipelineValue'); + assert( + (client.pathTemplates.trainingPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('trial', () => { + const fakePath = '/rendered/path/trial'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + study: 'studyValue', + trial: 'trialValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.trialPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.trialPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('trialPath', () => { + const result = client.trialPath( + 'projectValue', + 'locationValue', + 'studyValue', + 'trialValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.trialPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTrialName', () => { + const result = client.matchProjectFromTrialName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTrialName', () => { + const result = client.matchLocationFromTrialName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchStudyFromTrialName', () => { + const result = client.matchStudyFromTrialName(fakePath); + assert.strictEqual(result, 'studyValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTrialFromTrialName', () => { + const result = client.matchTrialFromTrialName(fakePath); + assert.strictEqual(result, 'trialValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts index 16c300a3a74d..1f277ccd1c59 100644 --- a/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts @@ -4886,6 +4886,83 @@ describe('v1beta1.PipelineServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new pipelineserviceModule.v1beta1.PipelineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts index b3629cc22d9c..36147d684d3d 100644 --- a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts @@ -3017,6 +3017,84 @@ describe('v1beta1.PredictionServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new predictionserviceModule.v1beta1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts index 53fac452c31b..c2a0d1251894 100644 --- a/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts @@ -4184,6 +4184,83 @@ describe('v1beta1.ScheduleServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts index 87199280e761..7a403e9577d4 100644 --- a/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts @@ -4148,6 +4148,84 @@ describe('v1beta1.SpecialistPoolServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new specialistpoolserviceModule.v1beta1.SpecialistPoolServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts index 1960e94eaa64..2ceccef3f60b 100644 --- a/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts @@ -563,6 +563,141 @@ describe('v1beta1.TensorboardServiceClient', () => { }); }); + describe('readTensorboardSize', () => { + it('invokes readTensorboardSize without error', async () => { + const client = + new tensorboardserviceModule.v1beta1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest', + ['tensorboard'] + ); + request.tensorboard = defaultValue1; + const expectedHeaderRequestParams = `tensorboard=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse() + ); + client.innerApiCalls.readTensorboardSize = + stubSimpleCall(expectedResponse); + const [response] = await client.readTensorboardSize(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readTensorboardSize as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readTensorboardSize as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readTensorboardSize without error using callback', async () => { + const client = + new tensorboardserviceModule.v1beta1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest', + ['tensorboard'] + ); + request.tensorboard = defaultValue1; + const expectedHeaderRequestParams = `tensorboard=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeResponse() + ); + client.innerApiCalls.readTensorboardSize = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.readTensorboardSize( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1beta1.IReadTensorboardSizeResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readTensorboardSize as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readTensorboardSize as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readTensorboardSize with error', async () => { + const client = + new tensorboardserviceModule.v1beta1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest', + ['tensorboard'] + ); + request.tensorboard = defaultValue1; + const expectedHeaderRequestParams = `tensorboard=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.readTensorboardSize = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.readTensorboardSize(request), expectedError); + const actualRequest = ( + client.innerApiCalls.readTensorboardSize as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readTensorboardSize as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readTensorboardSize with closed client', async () => { + const client = + new tensorboardserviceModule.v1beta1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ReadTensorboardSizeRequest', + ['tensorboard'] + ); + request.tensorboard = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.readTensorboardSize(request), expectedError); + }); + }); + describe('createTensorboardExperiment', () => { it('invokes createTensorboardExperiment without error', async () => { const client = @@ -8591,6 +8726,84 @@ describe('v1beta1.TensorboardServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new tensorboardserviceModule.v1beta1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts index bcbdcbf55d75..9c6b6b24d700 100644 --- a/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts @@ -5482,6 +5482,83 @@ describe('v1beta1.VizierServiceClient', () => { }); }); + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = new vizierserviceModule.v1beta1.VizierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('pipelineJob', () => { const fakePath = '/rendered/path/pipelineJob'; const expectedParameters = {