From 99736a9b9ac01b9673280eddc2f57a8722646ecd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 5 Jun 2023 22:46:04 -0700 Subject: [PATCH] feat: [ai-platform] add blocking_operation_ids to ImportFeatureValuesOperationMetadata (#4284) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add match service in aiplatform v1 PiperOrigin-RevId: 533008702 Source-Link: https://github.com/googleapis/googleapis/commit/2f00988bfd99bbb3e268d1d6f3fec37514538020 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3ccb5f69dee03f37c58d0f4c0f87b40936457e5c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjNjY2I1ZjY5ZGVlMDNmMzdjNThkMGY0YzBmODdiNDA5MzY0NTdlNWMifQ== * 🦉 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 * feat: support for Model Garden -- A single place to search, discover, and interact with a wide variety of foundation models from Google and Google partners, available on Vertex AI PiperOrigin-RevId: 536794833 Source-Link: https://github.com/googleapis/googleapis/commit/df070601d4695d29ba096b72b579d8145e8b2fbd Source-Link: https://github.com/googleapis/googleapis-gen/commit/d9492ce901fc8bc2987280f16a466da1b441bc75 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImQ5NDkyY2U5MDFmYzhiYzI5ODcyODBmMTZhNDY2ZGExYjQ0MWJjNzUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add NVIDIA_A100_80GB to AcceleratorType feat: add blocking_operation_ids to ImportFeatureValuesOperationMetadata PiperOrigin-RevId: 537124229 Source-Link: https://github.com/googleapis/googleapis/commit/064f6cd1d12bafb17faa6ed5d77540fd5bc14c2c Source-Link: https://github.com/googleapis/googleapis-gen/commit/b5a4a981256b863f6960aaa6f1a03a65521d002c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImI1YTRhOTgxMjU2Yjg2M2Y2OTYwYWFhNmYxYTAzYTY1NTIxZDAwMmMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add blocking_operation_ids to ImportFeatureValuesOperationMetadata feat: add launch_stage to PublisherModel PiperOrigin-RevId: 537154438 Source-Link: https://github.com/googleapis/googleapis/commit/d2d95e5107bda1d7f51f8878faaaa193553ee972 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2688bd01fc821ef022543955309e9c056cec8d56 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjI2ODhiZDAxZmM4MjFlZjAyMjU0Mzk1NTMwOWU5YzA1NmNlYzhkNTYifQ== * 🦉 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 * build: export new clients * 🦉 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: Denis DelGrosso <85250797+ddelgrosso1@users.noreply.github.com> Co-authored-by: danieljbruce Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Co-authored-by: Daniel Bankhead Co-authored-by: Sofia Leon --- packages/google-cloud-aiplatform/README.md | 3 + .../aiplatform/v1/accelerator_type.proto | 3 + .../aiplatform/v1/featurestore_service.proto | 8 +- .../cloud/aiplatform/v1/index_endpoint.proto | 15 +- .../cloud/aiplatform/v1/match_service.proto | 176 + .../aiplatform/v1/metadata_service.proto | 15 +- .../google/cloud/aiplatform/v1/model.proto | 13 + .../aiplatform/v1/model_evaluation.proto | 5 +- .../aiplatform/v1/model_garden_service.proto | 83 + .../aiplatform/v1/prediction_service.proto | 3 +- .../cloud/aiplatform/v1/publisher_model.proto | 239 + .../v1/tensorboard_experiment.proto | 3 +- .../cloud/aiplatform/v1/vizier_service.proto | 3 +- .../v1beta1/featurestore_service.proto | 8 +- .../aiplatform/v1beta1/index_endpoint.proto | 15 +- .../aiplatform/v1beta1/metadata_service.proto | 15 +- .../cloud/aiplatform/v1beta1/model.proto | 4 +- .../aiplatform/v1beta1/model_evaluation.proto | 5 +- .../v1beta1/prediction_service.proto | 3 +- .../aiplatform/v1beta1/publisher_model.proto | 27 +- .../v1beta1/tensorboard_experiment.proto | 3 +- .../aiplatform/v1beta1/vizier_service.proto | 3 +- .../protos/protos.d.ts | 1982 ++ .../google-cloud-aiplatform/protos/protos.js | 17055 ++++++++++------ .../protos/protos.json | 563 + .../google-cloud-aiplatform/samples/README.md | 54 + ...turestore_service.import_feature_values.js | 2 +- .../v1/match_service.find_neighbors.js | 83 + .../v1/match_service.read_index_datapoints.js | 71 + .../v1/metadata_service.list_artifacts.js | 3 + .../v1/metadata_service.list_contexts.js | 3 + .../v1/metadata_service.list_executions.js | 3 + ...service.query_artifact_lineage_subgraph.js | 3 + .../v1/metadata_service.update_artifact.js | 1 - .../v1/metadata_service.update_context.js | 1 - .../v1/metadata_service.update_execution.js | 1 - ...odel_garden_service.get_publisher_model.js | 72 + ...t_metadata.google.cloud.aiplatform.v1.json | 166 +- ...turestore_service.import_feature_values.js | 2 +- .../metadata_service.list_artifacts.js | 3 + .../v1beta1/metadata_service.list_contexts.js | 3 + .../metadata_service.list_executions.js | 3 + ...service.query_artifact_lineage_subgraph.js | 3 + .../metadata_service.update_artifact.js | 1 - .../metadata_service.update_context.js | 1 - .../metadata_service.update_execution.js | 1 - ...adata.google.cloud.aiplatform.v1beta1.json | 18 +- packages/google-cloud-aiplatform/src/index.ts | 8 + .../src/v1/dataset_service_client.ts | 43 + .../src/v1/dataset_service_proto_list.json | 3 + .../src/v1/endpoint_service_client.ts | 43 + .../src/v1/endpoint_service_proto_list.json | 3 + ...turestore_online_serving_service_client.ts | 43 + ...ore_online_serving_service_proto_list.json | 3 + .../src/v1/featurestore_service_client.ts | 45 +- .../v1/featurestore_service_proto_list.json | 3 + .../src/v1/gapic_metadata.json | 58 + .../google-cloud-aiplatform/src/v1/index.ts | 2 + .../src/v1/index_endpoint_service_client.ts | 43 + .../v1/index_endpoint_service_proto_list.json | 3 + .../src/v1/index_service_client.ts | 43 + .../src/v1/index_service_proto_list.json | 3 + .../src/v1/job_service_client.ts | 43 + .../src/v1/job_service_proto_list.json | 3 + .../src/v1/match_service_client.ts | 3324 +++ .../src/v1/match_service_client_config.json | 34 + .../src/v1/match_service_proto_list.json | 118 + .../src/v1/metadata_service_client.ts | 76 +- .../src/v1/metadata_service_proto_list.json | 3 + .../src/v1/migration_service_client.ts | 43 + .../src/v1/migration_service_proto_list.json | 3 + .../src/v1/model_garden_service_client.ts | 3216 +++ .../model_garden_service_client_config.json | 30 + .../v1/model_garden_service_proto_list.json | 118 + .../src/v1/model_service_client.ts | 43 + .../src/v1/model_service_proto_list.json | 3 + .../src/v1/pipeline_service_client.ts | 43 + .../src/v1/pipeline_service_proto_list.json | 3 + .../src/v1/prediction_service_client.ts | 46 +- .../src/v1/prediction_service_proto_list.json | 3 + .../src/v1/specialist_pool_service_client.ts | 43 + .../specialist_pool_service_proto_list.json | 3 + .../src/v1/tensorboard_service_client.ts | 43 + .../v1/tensorboard_service_proto_list.json | 3 + .../src/v1/vizier_service_client.ts | 46 +- .../src/v1/vizier_service_proto_list.json | 3 + .../src/v1beta1/dataset_service_client.ts | 10 + ...deployment_resource_pool_service_client.ts | 10 + .../src/v1beta1/endpoint_service_client.ts | 10 + .../v1beta1/featurestore_service_client.ts | 12 +- .../v1beta1/index_endpoint_service_client.ts | 10 + .../src/v1beta1/index_service_client.ts | 10 + .../src/v1beta1/job_service_client.ts | 10 + .../src/v1beta1/metadata_service_client.ts | 43 +- .../src/v1beta1/migration_service_client.ts | 10 + .../src/v1beta1/model_service_client.ts | 10 + .../src/v1beta1/pipeline_service_client.ts | 10 + .../src/v1beta1/prediction_service_client.ts | 3 +- .../src/v1beta1/schedule_service_client.ts | 10 + .../v1beta1/specialist_pool_service_client.ts | 10 + .../src/v1beta1/tensorboard_service_client.ts | 10 + .../src/v1beta1/vizier_service_client.ts | 13 +- .../system-test/fixtures/sample/src/index.js | 2 + .../system-test/fixtures/sample/src/index.ts | 14 + .../test/gapic_dataset_service_v1.ts | 52 + .../test/gapic_endpoint_service_v1.ts | 52 + ..._featurestore_online_serving_service_v1.ts | 55 + .../test/gapic_featurestore_service_v1.ts | 54 + .../test/gapic_index_endpoint_service_v1.ts | 53 + .../test/gapic_index_service_v1.ts | 52 + .../test/gapic_job_service_v1.ts | 52 + .../test/gapic_match_service_v1.ts | 3769 ++++ .../test/gapic_metadata_service_v1.ts | 52 + .../test/gapic_migration_service_v1.ts | 52 + .../test/gapic_model_garden_service_v1.ts | 3640 ++++ .../test/gapic_model_service_v1.ts | 52 + .../test/gapic_pipeline_service_v1.ts | 52 + .../test/gapic_prediction_service_v1.ts | 52 + .../test/gapic_specialist_pool_service_v1.ts | 53 + .../test/gapic_tensorboard_service_v1.ts | 52 + .../test/gapic_vizier_service_v1.ts | 52 + 121 files changed, 30715 insertions(+), 6077 deletions(-) create mode 100644 packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/match_service.proto create mode 100644 packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_garden_service.proto create mode 100644 packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/publisher_model.proto create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1/match_service.find_neighbors.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1/match_service.read_index_datapoints.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1/model_garden_service.get_publisher_model.js create mode 100644 packages/google-cloud-aiplatform/src/v1/match_service_client.ts create mode 100644 packages/google-cloud-aiplatform/src/v1/match_service_client_config.json create mode 100644 packages/google-cloud-aiplatform/src/v1/match_service_proto_list.json create mode 100644 packages/google-cloud-aiplatform/src/v1/model_garden_service_client.ts create mode 100644 packages/google-cloud-aiplatform/src/v1/model_garden_service_client_config.json create mode 100644 packages/google-cloud-aiplatform/src/v1/model_garden_service_proto_list.json create mode 100644 packages/google-cloud-aiplatform/test/gapic_match_service_v1.ts create mode 100644 packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1.ts diff --git a/packages/google-cloud-aiplatform/README.md b/packages/google-cloud-aiplatform/README.md index dcea0873e74..c7d91d374e9 100644 --- a/packages/google-cloud-aiplatform/README.md +++ b/packages/google-cloud-aiplatform/README.md @@ -196,6 +196,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Job_service.resume_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.resume_model_deployment_monitoring_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/v1/job_service.resume_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | | Job_service.search_model_deployment_monitoring_stats_anomalies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.search_model_deployment_monitoring_stats_anomalies.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/job_service.search_model_deployment_monitoring_stats_anomalies.js,packages/google-cloud-aiplatform/samples/README.md) | | Job_service.update_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.update_model_deployment_monitoring_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/v1/job_service.update_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Match_service.find_neighbors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/match_service.find_neighbors.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/match_service.find_neighbors.js,packages/google-cloud-aiplatform/samples/README.md) | +| Match_service.read_index_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/match_service.read_index_datapoints.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/match_service.read_index_datapoints.js,packages/google-cloud-aiplatform/samples/README.md) | | Metadata_service.add_context_artifacts_and_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_artifacts_and_executions.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/metadata_service.add_context_artifacts_and_executions.js,packages/google-cloud-aiplatform/samples/README.md) | | Metadata_service.add_context_children | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_children.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/metadata_service.add_context_children.js,packages/google-cloud-aiplatform/samples/README.md) | | Metadata_service.add_execution_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_execution_events.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/metadata_service.add_execution_events.js,packages/google-cloud-aiplatform/samples/README.md) | @@ -230,6 +232,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Metadata_service.update_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.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/metadata_service.update_execution.js,packages/google-cloud-aiplatform/samples/README.md) | | Migration_service.batch_migrate_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/migration_service.batch_migrate_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/v1/migration_service.batch_migrate_resources.js,packages/google-cloud-aiplatform/samples/README.md) | | Migration_service.search_migratable_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/migration_service.search_migratable_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/v1/migration_service.search_migratable_resources.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_garden_service.get_publisher_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_garden_service.get_publisher_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/v1/model_garden_service.get_publisher_model.js,packages/google-cloud-aiplatform/samples/README.md) | | Model_service.batch_import_evaluated_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.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/model_service.batch_import_evaluated_annotations.js,packages/google-cloud-aiplatform/samples/README.md) | | Model_service.batch_import_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_model_evaluation_slices.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/model_service.batch_import_model_evaluation_slices.js,packages/google-cloud-aiplatform/samples/README.md) | | Model_service.copy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.copy_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/v1/model_service.copy_model.js,packages/google-cloud-aiplatform/samples/README.md) | diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto index f06cfb9df9e..de62b281e3a 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto @@ -47,6 +47,9 @@ enum AcceleratorType { // Nvidia Tesla A100 GPU. NVIDIA_TESLA_A100 = 8; + // Nvidia A100 80GB GPU. + NVIDIA_A100_80GB = 9; + // Nvidia L4 GPU. NVIDIA_L4 = 11; 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 9249e3874ac..6c413631e43 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 @@ -534,7 +534,7 @@ message ImportFeatureValuesRequest { ]; // Source column that holds entity IDs. If not provided, entity IDs are - // extracted from the column named `entity_id`. + // extracted from the column named entity_id. string entity_id_field = 5; // Required. Specifications defining which Feature values to import from the @@ -1288,6 +1288,10 @@ message ImportFeatureValuesOperationMetadata { // The number rows that weren't ingested due to having timestamps outside the // retention boundary. int64 timestamp_outside_retention_rows_count = 7; + + // List of ImportFeatureValues operations running under a single EntityType + // that are blocking this operation. + repeated int64 blocking_operation_ids = 8; } // Details of operations that exports Features values. @@ -1439,6 +1443,6 @@ message EntityIdSelector { } // Source column that holds entity IDs. If not provided, entity IDs are - // extracted from the column named `entity_id`. + // extracted from the column named entity_id. string entity_id_field = 5; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint.proto index 9b4dd453297..49a30b966aa 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint.proto @@ -159,17 +159,16 @@ message DeployedIndex { // Output only. The DeployedIndex may depend on various data on its original // Index. Additionally when certain changes to the original Index are being // done (e.g. when what the Index contains is being changed) the DeployedIndex - // may be asynchronously updated in the background to reflect this changes. If - // this timestamp's value is at least the + // may be asynchronously updated in the background to reflect these changes. + // If this timestamp's value is at least the // [Index.update_time][google.cloud.aiplatform.v1.Index.update_time] of the // original Index, it means that this DeployedIndex and the original Index are // in sync. If this timestamp is older, then to see which updates this - // DeployedIndex already contains (and which not), one must - // [list][Operations.ListOperations] [Operations][Operation] - // [working][Operation.name] on the original Index. Only - // the successfully completed Operations with - // [Operations.metadata.generic_metadata.update_time] - // [google.cloud.aiplatform.v1.GenericOperationMetadata.update_time] + // DeployedIndex already contains (and which it does not), one must + // [list][google.longrunning.Operations.ListOperations] the operations that + // are running on the original Index. Only the successfully completed + // Operations with + // [update_time][google.cloud.aiplatform.v1.GenericOperationMetadata.update_time] // equal or before this sync time are contained in this DeployedIndex. google.protobuf.Timestamp index_sync_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/match_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/match_service.proto new file mode 100644 index 00000000000..5b56a08b5a9 --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/match_service.proto @@ -0,0 +1,176 @@ +// 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.v1; + +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/v1/index.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "MatchServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// MatchService is a Google managed service for efficient vector similarity +// search at scale. +service MatchService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Finds the nearest neighbors of each vector within the request. + rpc FindNeighbors(FindNeighborsRequest) returns (FindNeighborsResponse) { + option (google.api.http) = { + post: "/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:findNeighbors" + body: "*" + }; + } + + // Reads the datapoints/vectors of the given IDs. + // A maximum of 1000 datapoints can be retrieved in a batch. + rpc ReadIndexDatapoints(ReadIndexDatapointsRequest) + returns (ReadIndexDatapointsResponse) { + option (google.api.http) = { + post: "/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:readIndexDatapoints" + body: "*" + }; + } +} + +// The request message for +// [MatchService.FindNeighbors][google.cloud.aiplatform.v1.MatchService.FindNeighbors]. +message FindNeighborsRequest { + // A query to find a number of the nearest neighbors (most similar vectors) + // of a vector. + message Query { + // Required. The datapoint/vector whose nearest neighbors should be searched + // for. + IndexDatapoint datapoint = 1 [(google.api.field_behavior) = REQUIRED]; + + // The number of nearest neighbors to be retrieved from database for each + // query. If not set, will use the default from the service configuration + // (https://cloud.google.com/vertex-ai/docs/matching-engine/configuring-indexes#nearest-neighbor-search-config). + int32 neighbor_count = 2; + + // Crowding is a constraint on a neighbor list produced by nearest neighbor + // search requiring that no more than some value k' of the k neighbors + // returned have the same value of crowding_attribute. + // It's used for improving result diversity. + // This field is the maximum number of matches with the same crowding tag. + int32 per_crowding_attribute_neighbor_count = 3; + + // The number of neighbors to find via approximate search before + // exact reordering is performed. If not set, the default value from scam + // config is used; if set, this value must be > 0. + int32 approximate_neighbor_count = 4; + + // The fraction of the number of leaves to search, set at query time allows + // user to tune search performance. This value increase result in both + // search accuracy and latency increase. The value should be between 0.0 + // and 1.0. If not set or set to 0.0, query uses the default value specified + // in + // NearestNeighborSearchConfig.TreeAHConfig.fraction_leaf_nodes_to_search. + double fraction_leaf_nodes_to_search_override = 5; + } + + // Required. The name of the index endpoint. + // Format: + // `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + string index_endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/IndexEndpoint" + } + ]; + + // The ID of the DeployedIndex that will serve the request. This request is + // sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That + // IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index + // has a DeployedIndex.id field. + // The value of the field below must equal one of the DeployedIndex.id + // fields of the IndexEndpoint that is being called for this request. + string deployed_index_id = 2; + + // The list of queries. + repeated Query queries = 3; + + // If set to true, the full datapoints (including all vector values and + // restricts) of the nearest neighbors are returned. + // Note that returning full datapoint will significantly increase the + // latency and cost of the query. + bool return_full_datapoint = 4; +} + +// The response message for +// [MatchService.FindNeighbors][google.cloud.aiplatform.v1.MatchService.FindNeighbors]. +message FindNeighborsResponse { + // A neighbor of the query vector. + message Neighbor { + // The datapoint of the neighbor. + // Note that full datapoints are returned only when "return_full_datapoint" + // is set to true. Otherwise, only the "datapoint_id" and "crowding_tag" + // fields are populated. + IndexDatapoint datapoint = 1; + + // The distance between the neighbor and the query vector. + double distance = 2; + } + + // Nearest neighbors for one query. + message NearestNeighbors { + // The ID of the query datapoint. + string id = 1; + + // All its neighbors. + repeated Neighbor neighbors = 2; + } + + // The nearest neighbors of the query datapoints. + repeated NearestNeighbors nearest_neighbors = 1; +} + +// The request message for +// [MatchService.ReadIndexDatapoints][google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints]. +message ReadIndexDatapointsRequest { + // Required. The name of the index endpoint. + // Format: + // `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + string index_endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/IndexEndpoint" + } + ]; + + // The ID of the DeployedIndex that will serve the request. + string deployed_index_id = 2; + + // IDs of the datapoints to be searched for. + repeated string ids = 3; +} + +// The response message for +// [MatchService.ReadIndexDatapoints][google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints]. +message ReadIndexDatapointsResponse { + // The result list of datapoints. + repeated IndexDatapoint datapoints = 1; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/metadata_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/metadata_service.proto index 9c1bcb09a6b..017b0df2eda 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/metadata_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/metadata_service.proto @@ -582,6 +582,9 @@ message ListArtifactsRequest { // To filter on metadata fields use traversal operation as follows: // `metadata..`. // For example: `metadata.field_1.number_value = 10.0` + // In case the field name contains special characters (such as colon), one + // can embed it inside double quote. + // For example: `metadata."field:1".number_value = 10.0` // * **Context based filtering**: // To filter Artifacts based on the contexts to which they belong, use the // function operator with the full resource name @@ -628,7 +631,6 @@ message UpdateArtifactRequest { Artifact artifact = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A FieldMask indicating which fields should be updated. - // Functionality of this field is not yet supported. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -784,6 +786,9 @@ message ListContextsRequest { // To filter on metadata fields use traversal operation as follows: // `metadata..`. // For example: `metadata.field_1.number_value = 10.0`. + // In case the field name contains special characters (such as colon), one + // can embed it inside double quote. + // For example: `metadata."field:1".number_value = 10.0` // * **Parent Child filtering**: // To filter Contexts based on parent-child relationship use the HAS // operator as follows: @@ -834,7 +839,6 @@ message UpdateContextRequest { Context context = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A FieldMask indicating which fields should be updated. - // Functionality of this field is not yet supported. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -1097,6 +1101,9 @@ message ListExecutionsRequest { // To filter on metadata fields use traversal operation as follows: // `metadata..` // For example: `metadata.field_1.number_value = 10.0` + // In case the field name contains special characters (such as colon), one + // can embed it inside double quote. + // For example: `metadata."field:1".number_value = 10.0` // * **Context based filtering**: // To filter Executions based on the contexts to which they belong use // the function operator with the full resource name: @@ -1143,7 +1150,6 @@ message UpdateExecutionRequest { Execution execution = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A FieldMask indicating which fields should be updated. - // Functionality of this field is not yet supported. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -1379,6 +1385,9 @@ message QueryArtifactLineageSubgraphRequest { // To filter on metadata fields use traversal operation as follows: // `metadata..`. // For example: `metadata.field_1.number_value = 10.0` + // In case the field name contains special characters (such as colon), one + // can embed it inside double quote. + // For example: `metadata."field:1".number_value = 10.0` // // Each of the above supported filter types can be combined together using // logical operators (`AND` & `OR`). Maximum nested expression depth allowed 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 4872249c54a..3a6d6fb1c9a 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,6 +204,11 @@ 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" + }]; + // Input only. The specification of the container that is to be used when // deploying this Model. The specification is ingested upon // [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], @@ -406,6 +411,14 @@ message Model { string metadata_artifact = 44 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Contains information about the Large Model. +message LargeModelReference { + // Required. The unique name of the large Foundation or pre-built model. Like + // "chat-bison", "text-bison". Or model name with version ID, like + // "chat-bison@001", "text-bison@005", etc. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + // Contains the schemata used in Model's predictions and explanations via // [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict], // [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain] diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation.proto index 6114518bf04..8fcd5184912 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation.proto @@ -71,8 +71,9 @@ message ModelEvaluation { google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // All possible [dimensions][ModelEvaluationSlice.slice.dimension] of - // ModelEvaluationSlices. The dimensions can be used as the filter of the + // All possible + // [dimensions][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.dimension] + // of ModelEvaluationSlices. The dimensions can be used as the filter of the // [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] // request, in the form of `slice.dimension = `. repeated string slice_dimensions = 5; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_garden_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_garden_service.proto new file mode 100644 index 00000000000..3a5802378fb --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_garden_service.proto @@ -0,0 +1,83 @@ +// 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.v1; + +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/v1/publisher_model.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "ModelGardenServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// The interface of Model Garden Service. +service ModelGardenService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Gets a Model Garden publisher model. + rpc GetPublisherModel(GetPublisherModelRequest) returns (PublisherModel) { + option (google.api.http) = { + get: "/v1/{name=publishers/*/models/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// View enumeration of PublisherModel. +enum PublisherModelView { + // The default / unset value. The API will default to the BASIC view. + PUBLISHER_MODEL_VIEW_UNSPECIFIED = 0; + + // Include basic metadata about the publisher model, but not the full + // contents. + PUBLISHER_MODEL_VIEW_BASIC = 1; + + // Include everything. + PUBLISHER_MODEL_VIEW_FULL = 2; + + // Include: VersionId, ModelVersionExternalName, and SupportedActions. + PUBLISHER_MODEL_VERSION_VIEW_BASIC = 3; +} + +// Request message for +// [ModelGardenService.GetPublisherModel][google.cloud.aiplatform.v1.ModelGardenService.GetPublisherModel] +message GetPublisherModelRequest { + // Required. The name of the PublisherModel resource. + // Format: + // `publishers/{publisher}/models/{publisher_model}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PublisherModel" + } + ]; + + // Optional. The IETF BCP-47 language code representing the language in which + // the publisher model's text information should be written in (see go/bcp47). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. PublisherModel view specifying which fields to read. + PublisherModelView view = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto index 16463dd48c5..16dadb28af8 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto @@ -84,8 +84,7 @@ service PredictionService { // [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] // is not specified, all DeployedModels must have // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] - // populated. Only deployed AutoML tabular Models have - // explanation_spec. + // populated. rpc Explain(ExplainRequest) returns (ExplainResponse) { option (google.api.http) = { post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:explain" diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/publisher_model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/publisher_model.proto new file mode 100644 index 00000000000..a854fce73e7 --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/publisher_model.proto @@ -0,0 +1,239 @@ +// 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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/machine_resources.proto"; +import "google/cloud/aiplatform/v1/model.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "PublisherModelProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// A Model Garden Publisher Model. +message PublisherModel { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/PublisherModel" + pattern: "publishers/{publisher}/models/{model}" + }; + + // Reference to a resource. + message ResourceReference { + oneof reference { + // The URI of the resource. + string uri = 1; + + // The resource name of the Google Cloud resource. + string resource_name = 2; + } + } + + // A named piece of documentation. + message Documentation { + // Required. E.g., OVERVIEW, USE CASES, DOCUMENTATION, SDK & SAMPLES, JAVA, + // NODE.JS, etc.. + string title = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Content of this piece of document (in Markdown format). + string content = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Actions could take on this Publisher Model. + message CallToAction { + // The regional resource name or the URI. Key is region, e.g., + // us-central1, europe-west2, global, etc.. + message RegionalResourceReferences { + // Required. + map references = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The title of the regional resource reference. + string title = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Rest API docs. + message ViewRestApi { + // Required. + repeated Documentation documentations = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The title of the view rest API. + string title = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Model metadata that is needed for UploadModel or + // DeployModel/CreateEndpoint requests. + message Deploy { + // The prediction (for example, the machine) resources that the + // DeployedModel uses. + oneof prediction_resources { + // A description of resources that are dedicated to the DeployedModel, + // and that need a higher degree of manual configuration. + DedicatedResources dedicated_resources = 5; + + // A description of resources that to large degree are decided by Vertex + // AI, and require only a modest additional configuration. + AutomaticResources automatic_resources = 6; + + // The resource name of the shared DeploymentResourcePool to deploy on. + // Format: + // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + string shared_resources = 7; + } + + // Optional. Default model display name. + string model_display_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Large model reference. When this is set, model_artifact_spec + // is not needed. + LargeModelReference large_model_reference = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The specification of the container that is to be used when + // deploying this Model in Vertex AI. Not present for Large Models. + ModelContainerSpec container_spec = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The path to the directory containing the Model artifact and + // any of its supporting files. + string artifact_uri = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The title of the regional resource reference. + string title = 8 [(google.api.field_behavior) = REQUIRED]; + } + + // Optional. To view Rest API docs. + ViewRestApi view_rest_api = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Open notebook of the PublisherModel. + RegionalResourceReferences open_notebook = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Create application using the PublisherModel. + RegionalResourceReferences create_application = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Open fine-tuning pipeline of the PublisherModel. + RegionalResourceReferences open_fine_tuning_pipeline = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Open prompt-tuning pipeline of the PublisherModel. + RegionalResourceReferences open_prompt_tuning_pipeline = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Open Genie / Playground. + RegionalResourceReferences open_genie = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Deploy the PublisherModel to Vertex Endpoint. + Deploy deploy = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Open in Generation AI Studio. + RegionalResourceReferences open_generation_ai_studio = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Request for access. + RegionalResourceReferences request_access = 9 + [(google.api.field_behavior) = OPTIONAL]; + } + + // An enum representing the open source category of a PublisherModel. + enum OpenSourceCategory { + // The open source category is unspecified, which should not be used. + OPEN_SOURCE_CATEGORY_UNSPECIFIED = 0; + + // Used to indicate the PublisherModel is not open sourced. + PROPRIETARY = 1; + + // Used to indicate the PublisherModel is a Google-owned open source model + // w/ Google checkpoint. + GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 2; + + // Used to indicate the PublisherModel is a 3p-owned open source model w/ + // Google checkpoint. + THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 3; + + // Used to indicate the PublisherModel is a Google-owned pure open source + // model. + GOOGLE_OWNED_OSS = 4; + + // Used to indicate the PublisherModel is a 3p-owned pure open source model. + THIRD_PARTY_OWNED_OSS = 5; + } + + // An enum representing the launch stage of a PublisherModel. + enum LaunchStage { + // The model launch stage is unspecified. + LAUNCH_STAGE_UNSPECIFIED = 0; + + // Used to indicate the PublisherModel is at Experimental launch stage. + EXPERIMENTAL = 1; + + // Used to indicate the PublisherModel is at Private Preview launch stage. + PRIVATE_PREVIEW = 2; + + // Used to indicate the PublisherModel is at Public Preview launch stage. + PUBLIC_PREVIEW = 3; + + // Used to indicate the PublisherModel is at GA launch stage. + GA = 4; + } + + // Output only. The resource name of the PublisherModel. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Immutable. The version ID of the PublisherModel. + // A new version is committed when a new model version is uploaded under an + // existing model id. It is an auto-incrementing decimal number in string + // representation. + string version_id = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. Indicates the open source category of the publisher model. + OpenSourceCategory open_source_category = 7 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Supported call-to-action options. + CallToAction supported_actions = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information about the model's Frameworks. + repeated string frameworks = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates the launch stage of the model. + LaunchStage launch_stage = 29 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output only. Immutable. Used to indicate this model has a + // publisher model and provide the template of the publisher model resource + // name. + string publisher_model_template = 30 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The schemata that describes formats of the PublisherModel's + // predictions and explanations as given and returned via + // [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. + PredictSchemata predict_schemata = 31 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_experiment.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_experiment.proto index 6ae26d3efad..e6bfa6f8e47 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_experiment.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_experiment.proto @@ -55,7 +55,8 @@ message TensorboardExperiment { google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The labels with user-defined metadata to organize your Datasets. + // The labels with user-defined metadata to organize your + // TensorboardExperiment. // // Label keys and values cannot be longer than 64 characters // (Unicode codepoints), can only contain lowercase letters, numeric diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/vizier_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/vizier_service.proto index 1158f58dc91..e45b733f0ae 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/vizier_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/vizier_service.proto @@ -92,7 +92,8 @@ service VizierService { // suggested by Vertex AI Vizier. Returns a long-running // operation associated with the generation of Trial suggestions. // When this long-running operation succeeds, it will contain - // a [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse]. + // a + // [SuggestTrialsResponse][google.cloud.aiplatform.v1.SuggestTrialsResponse]. rpc SuggestTrials(SuggestTrialsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { 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 f4ec90768c2..50fa54e16bf 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 @@ -534,7 +534,7 @@ message ImportFeatureValuesRequest { ]; // Source column that holds entity IDs. If not provided, entity IDs are - // extracted from the column named `entity_id`. + // extracted from the column named entity_id. string entity_id_field = 5; // Required. Specifications defining which Feature values to import from the @@ -1288,6 +1288,10 @@ message ImportFeatureValuesOperationMetadata { // The number rows that weren't ingested due to having timestamps outside the // retention boundary. int64 timestamp_outside_retention_rows_count = 7; + + // List of ImportFeatureValues operations running under a single EntityType + // that are blocking this operation. + repeated int64 blocking_operation_ids = 8; } // Details of operations that exports Features values. @@ -1439,6 +1443,6 @@ message EntityIdSelector { } // Source column that holds entity IDs. If not provided, entity IDs are - // extracted from the column named `entity_id`. + // extracted from the column named entity_id. string entity_id_field = 5; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto index ef2efb41c65..14af3b80940 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto @@ -160,17 +160,16 @@ message DeployedIndex { // Output only. The DeployedIndex may depend on various data on its original // Index. Additionally when certain changes to the original Index are being // done (e.g. when what the Index contains is being changed) the DeployedIndex - // may be asynchronously updated in the background to reflect this changes. If - // this timestamp's value is at least the + // may be asynchronously updated in the background to reflect these changes. + // If this timestamp's value is at least the // [Index.update_time][google.cloud.aiplatform.v1beta1.Index.update_time] of // the original Index, it means that this DeployedIndex and the original Index // are in sync. If this timestamp is older, then to see which updates this - // DeployedIndex already contains (and which not), one must - // [list][Operations.ListOperations] [Operations][Operation] - // [working][Operation.name] on the original Index. Only - // the successfully completed Operations with - // [Operations.metadata.generic_metadata.update_time] - // [google.cloud.aiplatform.v1beta1.GenericOperationMetadata.update_time] + // DeployedIndex already contains (and which it does not), one must + // [list][google.longrunning.Operations.ListOperations] the operations that + // are running on the original Index. Only the successfully completed + // Operations with + // [update_time][google.cloud.aiplatform.v1beta1.GenericOperationMetadata.update_time] // equal or before this sync time are contained in this DeployedIndex. google.protobuf.Timestamp index_sync_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/metadata_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/metadata_service.proto index 74ecdb97318..dc000c72761 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/metadata_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/metadata_service.proto @@ -582,6 +582,9 @@ message ListArtifactsRequest { // To filter on metadata fields use traversal operation as follows: // `metadata..`. // For example: `metadata.field_1.number_value = 10.0` + // In case the field name contains special characters (such as colon), one + // can embed it inside double quote. + // For example: `metadata."field:1".number_value = 10.0` // * **Context based filtering**: // To filter Artifacts based on the contexts to which they belong, use the // function operator with the full resource name @@ -629,7 +632,6 @@ message UpdateArtifactRequest { Artifact artifact = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A FieldMask indicating which fields should be updated. - // Functionality of this field is not yet supported. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -785,6 +787,9 @@ message ListContextsRequest { // To filter on metadata fields use traversal operation as follows: // `metadata..`. // For example: `metadata.field_1.number_value = 10.0`. + // In case the field name contains special characters (such as colon), one + // can embed it inside double quote. + // For example: `metadata."field:1".number_value = 10.0` // * **Parent Child filtering**: // To filter Contexts based on parent-child relationship use the HAS // operator as follows: @@ -835,7 +840,6 @@ message UpdateContextRequest { Context context = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A FieldMask indicating which fields should be updated. - // Functionality of this field is not yet supported. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -1099,6 +1103,9 @@ message ListExecutionsRequest { // To filter on metadata fields use traversal operation as follows: // `metadata..` // For example: `metadata.field_1.number_value = 10.0` + // In case the field name contains special characters (such as colon), one + // can embed it inside double quote. + // For example: `metadata."field:1".number_value = 10.0` // * **Context based filtering**: // To filter Executions based on the contexts to which they belong use // the function operator with the full resource name: @@ -1146,7 +1153,6 @@ message UpdateExecutionRequest { Execution execution = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A FieldMask indicating which fields should be updated. - // Functionality of this field is not yet supported. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -1382,6 +1388,9 @@ message QueryArtifactLineageSubgraphRequest { // To filter on metadata fields use traversal operation as follows: // `metadata..`. // For example: `metadata.field_1.number_value = 10.0` + // In case the field name contains special characters (such as colon), one + // can embed it inside double quote. + // For example: `metadata."field:1".number_value = 10.0` // // Each of the above supported filter types can be combined together using // logical operators (`AND` & `OR`). Maximum nested expression depth allowed diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto index 4751153abcf..0edbee572d5 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto @@ -414,8 +414,8 @@ message Model { // Contains information about the Large Model. message LargeModelReference { // Required. The unique name of the large Foundation or pre-built model. Like - // "chat-panda", "text-panda". Or model name with version ID, like - // "chat-panda-001", "text-panda-005", etc. + // "chat-bison", "text-bison". Or model name with version ID, like + // "chat-bison@001", "text-bison@005", etc. string name = 1 [(google.api.field_behavior) = REQUIRED]; } 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 862679989fc..f636c27ef83 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 @@ -71,8 +71,9 @@ message ModelEvaluation { google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // All possible [dimensions][ModelEvaluationSlice.slice.dimension] of - // ModelEvaluationSlices. The dimensions can be used as the filter of the + // All possible + // [dimensions][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.dimension] + // of ModelEvaluationSlices. The dimensions can be used as the filter of the // [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluationSlices] // request, in the form of `slice.dimension = `. repeated string slice_dimensions = 5; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto index b6d2c16ffb8..c96f0f24112 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto @@ -84,8 +84,7 @@ service PredictionService { // [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] // is not specified, all DeployedModels must have // [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] - // populated. Only deployed AutoML tabular Models have - // explanation_spec. + // populated. rpc Explain(ExplainRequest) returns (ExplainResponse) { option (google.api.http) = { post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:explain" diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto index 55e11ea1b51..dd45a764a87 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto @@ -42,7 +42,7 @@ message PublisherModel { // The URI of the resource. string uri = 1; - // The resource name of the GCP resource. + // The resource name of the Google Cloud resource. string resource_name = 2; } } @@ -150,6 +150,10 @@ message PublisherModel { // Optional. Open in Generation AI Studio. RegionalResourceReferences open_generation_ai_studio = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Request for access. + RegionalResourceReferences request_access = 9 + [(google.api.field_behavior) = OPTIONAL]; } // An enum representing the open source category of a PublisherModel. @@ -176,6 +180,24 @@ message PublisherModel { THIRD_PARTY_OWNED_OSS = 5; } + // An enum representing the launch stage of a PublisherModel. + enum LaunchStage { + // The model launch stage is unspecified. + LAUNCH_STAGE_UNSPECIFIED = 0; + + // Used to indicate the PublisherModel is at Experimental launch stage. + EXPERIMENTAL = 1; + + // Used to indicate the PublisherModel is at Private Preview launch stage. + PRIVATE_PREVIEW = 2; + + // Used to indicate the PublisherModel is at Public Preview launch stage. + PUBLIC_PREVIEW = 3; + + // Used to indicate the PublisherModel is at GA launch stage. + GA = 4; + } + // Output only. The resource name of the PublisherModel. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -198,6 +220,9 @@ message PublisherModel { // Optional. Additional information about the model's Frameworks. repeated string frameworks = 23 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Indicates the launch stage of the model. + LaunchStage launch_stage = 29 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Output only. Immutable. Used to indicate this model has a // publisher model and provide the template of the publisher model resource // name. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto index c29f2f17b6a..30813202f70 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto @@ -55,7 +55,8 @@ message TensorboardExperiment { google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The labels with user-defined metadata to organize your Datasets. + // The labels with user-defined metadata to organize your + // TensorboardExperiment. // // Label keys and values cannot be longer than 64 characters // (Unicode codepoints), can only contain lowercase letters, numeric diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/vizier_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/vizier_service.proto index 60ca817b596..7936b1af9e2 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/vizier_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/vizier_service.proto @@ -92,7 +92,8 @@ service VizierService { // suggested by Vertex AI Vizier. Returns a long-running // operation associated with the generation of Trial suggestions. // When this long-running operation succeeds, it will contain - // a [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse]. + // a + // [SuggestTrialsResponse][google.cloud.aiplatform.v1beta1.SuggestTrialsResponse]. rpc SuggestTrials(SuggestTrialsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index 9bb7bc4736d..d1297741386 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -35,6 +35,7 @@ export namespace google { NVIDIA_TESLA_P4 = 4, NVIDIA_TESLA_T4 = 5, NVIDIA_TESLA_A100 = 8, + NVIDIA_A100_80GB = 9, NVIDIA_L4 = 11, TPU_V2 = 6, TPU_V3 = 7, @@ -6477,6 +6478,9 @@ export namespace google { /** Model trainingPipeline */ trainingPipeline?: (string|null); + /** Model pipelineJob */ + pipelineJob?: (string|null); + /** Model containerSpec */ containerSpec?: (google.cloud.aiplatform.v1.IModelContainerSpec|null); @@ -6571,6 +6575,9 @@ export namespace google { /** Model trainingPipeline. */ public trainingPipeline: string; + /** Model pipelineJob. */ + public pipelineJob: string; + /** Model containerSpec. */ public containerSpec?: (google.cloud.aiplatform.v1.IModelContainerSpec|null); @@ -6915,6 +6922,103 @@ export namespace google { } } + /** Properties of a LargeModelReference. */ + interface ILargeModelReference { + + /** LargeModelReference name */ + name?: (string|null); + } + + /** Represents a LargeModelReference. */ + class LargeModelReference implements ILargeModelReference { + + /** + * Constructs a new LargeModelReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ILargeModelReference); + + /** LargeModelReference name. */ + public name: string; + + /** + * Creates a new LargeModelReference instance using the specified properties. + * @param [properties] Properties to set + * @returns LargeModelReference instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ILargeModelReference): google.cloud.aiplatform.v1.LargeModelReference; + + /** + * Encodes the specified LargeModelReference message. Does not implicitly {@link google.cloud.aiplatform.v1.LargeModelReference.verify|verify} messages. + * @param message LargeModelReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ILargeModelReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LargeModelReference message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.LargeModelReference.verify|verify} messages. + * @param message LargeModelReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ILargeModelReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LargeModelReference + * @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.LargeModelReference; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LargeModelReference + * @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.LargeModelReference; + + /** + * Verifies a LargeModelReference 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 LargeModelReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LargeModelReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.LargeModelReference; + + /** + * Creates a plain object from a LargeModelReference message. Also converts values to other types if specified. + * @param message LargeModelReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.LargeModelReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LargeModelReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LargeModelReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a PredictSchemata. */ interface IPredictSchemata { @@ -24116,6 +24220,9 @@ export namespace google { /** ImportFeatureValuesOperationMetadata timestampOutsideRetentionRowsCount */ timestampOutsideRetentionRowsCount?: (number|Long|string|null); + + /** ImportFeatureValuesOperationMetadata blockingOperationIds */ + blockingOperationIds?: ((number|Long|string)[]|null); } /** Represents an ImportFeatureValuesOperationMetadata. */ @@ -24145,6 +24252,9 @@ export namespace google { /** ImportFeatureValuesOperationMetadata timestampOutsideRetentionRowsCount. */ public timestampOutsideRetentionRowsCount: (number|Long|string); + /** ImportFeatureValuesOperationMetadata blockingOperationIds. */ + public blockingOperationIds: (number|Long|string)[]; + /** * Creates a new ImportFeatureValuesOperationMetadata instance using the specified properties. * @param [properties] Properties to set @@ -41833,6 +41943,823 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Represents a MatchService */ + class MatchService extends $protobuf.rpc.Service { + + /** + * Constructs a new MatchService 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 MatchService 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): MatchService; + + /** + * Calls FindNeighbors. + * @param request FindNeighborsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FindNeighborsResponse + */ + public findNeighbors(request: google.cloud.aiplatform.v1.IFindNeighborsRequest, callback: google.cloud.aiplatform.v1.MatchService.FindNeighborsCallback): void; + + /** + * Calls FindNeighbors. + * @param request FindNeighborsRequest message or plain object + * @returns Promise + */ + public findNeighbors(request: google.cloud.aiplatform.v1.IFindNeighborsRequest): Promise; + + /** + * Calls ReadIndexDatapoints. + * @param request ReadIndexDatapointsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadIndexDatapointsResponse + */ + public readIndexDatapoints(request: google.cloud.aiplatform.v1.IReadIndexDatapointsRequest, callback: google.cloud.aiplatform.v1.MatchService.ReadIndexDatapointsCallback): void; + + /** + * Calls ReadIndexDatapoints. + * @param request ReadIndexDatapointsRequest message or plain object + * @returns Promise + */ + public readIndexDatapoints(request: google.cloud.aiplatform.v1.IReadIndexDatapointsRequest): Promise; + } + + namespace MatchService { + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MatchService|findNeighbors}. + * @param error Error, if any + * @param [response] FindNeighborsResponse + */ + type FindNeighborsCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.FindNeighborsResponse) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MatchService|readIndexDatapoints}. + * @param error Error, if any + * @param [response] ReadIndexDatapointsResponse + */ + type ReadIndexDatapointsCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.ReadIndexDatapointsResponse) => void; + } + + /** Properties of a FindNeighborsRequest. */ + interface IFindNeighborsRequest { + + /** FindNeighborsRequest indexEndpoint */ + indexEndpoint?: (string|null); + + /** FindNeighborsRequest deployedIndexId */ + deployedIndexId?: (string|null); + + /** FindNeighborsRequest queries */ + queries?: (google.cloud.aiplatform.v1.FindNeighborsRequest.IQuery[]|null); + + /** FindNeighborsRequest returnFullDatapoint */ + returnFullDatapoint?: (boolean|null); + } + + /** Represents a FindNeighborsRequest. */ + class FindNeighborsRequest implements IFindNeighborsRequest { + + /** + * Constructs a new FindNeighborsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IFindNeighborsRequest); + + /** FindNeighborsRequest indexEndpoint. */ + public indexEndpoint: string; + + /** FindNeighborsRequest deployedIndexId. */ + public deployedIndexId: string; + + /** FindNeighborsRequest queries. */ + public queries: google.cloud.aiplatform.v1.FindNeighborsRequest.IQuery[]; + + /** FindNeighborsRequest returnFullDatapoint. */ + public returnFullDatapoint: boolean; + + /** + * Creates a new FindNeighborsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FindNeighborsRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IFindNeighborsRequest): google.cloud.aiplatform.v1.FindNeighborsRequest; + + /** + * Encodes the specified FindNeighborsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsRequest.verify|verify} messages. + * @param message FindNeighborsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IFindNeighborsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FindNeighborsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsRequest.verify|verify} messages. + * @param message FindNeighborsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IFindNeighborsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FindNeighborsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FindNeighborsRequest + * @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.FindNeighborsRequest; + + /** + * Decodes a FindNeighborsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FindNeighborsRequest + * @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.FindNeighborsRequest; + + /** + * Verifies a FindNeighborsRequest 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 FindNeighborsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FindNeighborsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FindNeighborsRequest; + + /** + * Creates a plain object from a FindNeighborsRequest message. Also converts values to other types if specified. + * @param message FindNeighborsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FindNeighborsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FindNeighborsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FindNeighborsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FindNeighborsRequest { + + /** Properties of a Query. */ + interface IQuery { + + /** Query datapoint */ + datapoint?: (google.cloud.aiplatform.v1.IIndexDatapoint|null); + + /** Query neighborCount */ + neighborCount?: (number|null); + + /** Query perCrowdingAttributeNeighborCount */ + perCrowdingAttributeNeighborCount?: (number|null); + + /** Query approximateNeighborCount */ + approximateNeighborCount?: (number|null); + + /** Query fractionLeafNodesToSearchOverride */ + fractionLeafNodesToSearchOverride?: (number|null); + } + + /** Represents a Query. */ + class Query implements IQuery { + + /** + * Constructs a new Query. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.FindNeighborsRequest.IQuery); + + /** Query datapoint. */ + public datapoint?: (google.cloud.aiplatform.v1.IIndexDatapoint|null); + + /** Query neighborCount. */ + public neighborCount: number; + + /** Query perCrowdingAttributeNeighborCount. */ + public perCrowdingAttributeNeighborCount: number; + + /** Query approximateNeighborCount. */ + public approximateNeighborCount: number; + + /** Query fractionLeafNodesToSearchOverride. */ + public fractionLeafNodesToSearchOverride: number; + + /** + * Creates a new Query instance using the specified properties. + * @param [properties] Properties to set + * @returns Query instance + */ + public static create(properties?: google.cloud.aiplatform.v1.FindNeighborsRequest.IQuery): google.cloud.aiplatform.v1.FindNeighborsRequest.Query; + + /** + * Encodes the specified Query message. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsRequest.Query.verify|verify} messages. + * @param message Query message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.FindNeighborsRequest.IQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Query message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsRequest.Query.verify|verify} messages. + * @param message Query message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.FindNeighborsRequest.IQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Query message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Query + * @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.FindNeighborsRequest.Query; + + /** + * Decodes a Query message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Query + * @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.FindNeighborsRequest.Query; + + /** + * Verifies a Query 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 Query message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Query + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FindNeighborsRequest.Query; + + /** + * Creates a plain object from a Query message. Also converts values to other types if specified. + * @param message Query + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FindNeighborsRequest.Query, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Query to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Query + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FindNeighborsResponse. */ + interface IFindNeighborsResponse { + + /** FindNeighborsResponse nearestNeighbors */ + nearestNeighbors?: (google.cloud.aiplatform.v1.FindNeighborsResponse.INearestNeighbors[]|null); + } + + /** Represents a FindNeighborsResponse. */ + class FindNeighborsResponse implements IFindNeighborsResponse { + + /** + * Constructs a new FindNeighborsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IFindNeighborsResponse); + + /** FindNeighborsResponse nearestNeighbors. */ + public nearestNeighbors: google.cloud.aiplatform.v1.FindNeighborsResponse.INearestNeighbors[]; + + /** + * Creates a new FindNeighborsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FindNeighborsResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IFindNeighborsResponse): google.cloud.aiplatform.v1.FindNeighborsResponse; + + /** + * Encodes the specified FindNeighborsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.verify|verify} messages. + * @param message FindNeighborsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IFindNeighborsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FindNeighborsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.verify|verify} messages. + * @param message FindNeighborsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IFindNeighborsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FindNeighborsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FindNeighborsResponse + * @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.FindNeighborsResponse; + + /** + * Decodes a FindNeighborsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FindNeighborsResponse + * @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.FindNeighborsResponse; + + /** + * Verifies a FindNeighborsResponse 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 FindNeighborsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FindNeighborsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FindNeighborsResponse; + + /** + * Creates a plain object from a FindNeighborsResponse message. Also converts values to other types if specified. + * @param message FindNeighborsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FindNeighborsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FindNeighborsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FindNeighborsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FindNeighborsResponse { + + /** Properties of a Neighbor. */ + interface INeighbor { + + /** Neighbor datapoint */ + datapoint?: (google.cloud.aiplatform.v1.IIndexDatapoint|null); + + /** Neighbor distance */ + distance?: (number|null); + } + + /** Represents a Neighbor. */ + class Neighbor implements INeighbor { + + /** + * Constructs a new Neighbor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.FindNeighborsResponse.INeighbor); + + /** Neighbor datapoint. */ + public datapoint?: (google.cloud.aiplatform.v1.IIndexDatapoint|null); + + /** Neighbor distance. */ + public distance: number; + + /** + * Creates a new Neighbor instance using the specified properties. + * @param [properties] Properties to set + * @returns Neighbor instance + */ + public static create(properties?: google.cloud.aiplatform.v1.FindNeighborsResponse.INeighbor): google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor; + + /** + * Encodes the specified Neighbor message. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.verify|verify} messages. + * @param message Neighbor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.FindNeighborsResponse.INeighbor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Neighbor message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.verify|verify} messages. + * @param message Neighbor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.FindNeighborsResponse.INeighbor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Neighbor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Neighbor + * @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.FindNeighborsResponse.Neighbor; + + /** + * Decodes a Neighbor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Neighbor + * @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.FindNeighborsResponse.Neighbor; + + /** + * Verifies a Neighbor 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 Neighbor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Neighbor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor; + + /** + * Creates a plain object from a Neighbor message. Also converts values to other types if specified. + * @param message Neighbor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Neighbor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Neighbor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NearestNeighbors. */ + interface INearestNeighbors { + + /** NearestNeighbors id */ + id?: (string|null); + + /** NearestNeighbors neighbors */ + neighbors?: (google.cloud.aiplatform.v1.FindNeighborsResponse.INeighbor[]|null); + } + + /** Represents a NearestNeighbors. */ + class NearestNeighbors implements INearestNeighbors { + + /** + * Constructs a new NearestNeighbors. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.FindNeighborsResponse.INearestNeighbors); + + /** NearestNeighbors id. */ + public id: string; + + /** NearestNeighbors neighbors. */ + public neighbors: google.cloud.aiplatform.v1.FindNeighborsResponse.INeighbor[]; + + /** + * Creates a new NearestNeighbors instance using the specified properties. + * @param [properties] Properties to set + * @returns NearestNeighbors instance + */ + public static create(properties?: google.cloud.aiplatform.v1.FindNeighborsResponse.INearestNeighbors): google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors; + + /** + * Encodes the specified NearestNeighbors message. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.verify|verify} messages. + * @param message NearestNeighbors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.FindNeighborsResponse.INearestNeighbors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NearestNeighbors message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.verify|verify} messages. + * @param message NearestNeighbors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.FindNeighborsResponse.INearestNeighbors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NearestNeighbors message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NearestNeighbors + * @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.FindNeighborsResponse.NearestNeighbors; + + /** + * Decodes a NearestNeighbors message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NearestNeighbors + * @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.FindNeighborsResponse.NearestNeighbors; + + /** + * Verifies a NearestNeighbors 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 NearestNeighbors message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NearestNeighbors + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors; + + /** + * Creates a plain object from a NearestNeighbors message. Also converts values to other types if specified. + * @param message NearestNeighbors + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NearestNeighbors to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NearestNeighbors + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ReadIndexDatapointsRequest. */ + interface IReadIndexDatapointsRequest { + + /** ReadIndexDatapointsRequest indexEndpoint */ + indexEndpoint?: (string|null); + + /** ReadIndexDatapointsRequest deployedIndexId */ + deployedIndexId?: (string|null); + + /** ReadIndexDatapointsRequest ids */ + ids?: (string[]|null); + } + + /** Represents a ReadIndexDatapointsRequest. */ + class ReadIndexDatapointsRequest implements IReadIndexDatapointsRequest { + + /** + * Constructs a new ReadIndexDatapointsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IReadIndexDatapointsRequest); + + /** ReadIndexDatapointsRequest indexEndpoint. */ + public indexEndpoint: string; + + /** ReadIndexDatapointsRequest deployedIndexId. */ + public deployedIndexId: string; + + /** ReadIndexDatapointsRequest ids. */ + public ids: string[]; + + /** + * Creates a new ReadIndexDatapointsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadIndexDatapointsRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IReadIndexDatapointsRequest): google.cloud.aiplatform.v1.ReadIndexDatapointsRequest; + + /** + * Encodes the specified ReadIndexDatapointsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadIndexDatapointsRequest.verify|verify} messages. + * @param message ReadIndexDatapointsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IReadIndexDatapointsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadIndexDatapointsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadIndexDatapointsRequest.verify|verify} messages. + * @param message ReadIndexDatapointsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IReadIndexDatapointsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadIndexDatapointsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadIndexDatapointsRequest + * @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.ReadIndexDatapointsRequest; + + /** + * Decodes a ReadIndexDatapointsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadIndexDatapointsRequest + * @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.ReadIndexDatapointsRequest; + + /** + * Verifies a ReadIndexDatapointsRequest 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 ReadIndexDatapointsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadIndexDatapointsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReadIndexDatapointsRequest; + + /** + * Creates a plain object from a ReadIndexDatapointsRequest message. Also converts values to other types if specified. + * @param message ReadIndexDatapointsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReadIndexDatapointsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadIndexDatapointsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadIndexDatapointsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadIndexDatapointsResponse. */ + interface IReadIndexDatapointsResponse { + + /** ReadIndexDatapointsResponse datapoints */ + datapoints?: (google.cloud.aiplatform.v1.IIndexDatapoint[]|null); + } + + /** Represents a ReadIndexDatapointsResponse. */ + class ReadIndexDatapointsResponse implements IReadIndexDatapointsResponse { + + /** + * Constructs a new ReadIndexDatapointsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IReadIndexDatapointsResponse); + + /** ReadIndexDatapointsResponse datapoints. */ + public datapoints: google.cloud.aiplatform.v1.IIndexDatapoint[]; + + /** + * Creates a new ReadIndexDatapointsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadIndexDatapointsResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IReadIndexDatapointsResponse): google.cloud.aiplatform.v1.ReadIndexDatapointsResponse; + + /** + * Encodes the specified ReadIndexDatapointsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadIndexDatapointsResponse.verify|verify} messages. + * @param message ReadIndexDatapointsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IReadIndexDatapointsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadIndexDatapointsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadIndexDatapointsResponse.verify|verify} messages. + * @param message ReadIndexDatapointsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IReadIndexDatapointsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadIndexDatapointsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadIndexDatapointsResponse + * @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.ReadIndexDatapointsResponse; + + /** + * Decodes a ReadIndexDatapointsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadIndexDatapointsResponse + * @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.ReadIndexDatapointsResponse; + + /** + * Verifies a ReadIndexDatapointsResponse 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 ReadIndexDatapointsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadIndexDatapointsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReadIndexDatapointsResponse; + + /** + * Creates a plain object from a ReadIndexDatapointsResponse message. Also converts values to other types if specified. + * @param message ReadIndexDatapointsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReadIndexDatapointsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadIndexDatapointsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadIndexDatapointsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a MetadataSchema. */ interface IMetadataSchema { @@ -51025,6 +51952,1034 @@ export namespace google { } } + /** Represents a ModelGardenService */ + class ModelGardenService extends $protobuf.rpc.Service { + + /** + * Constructs a new ModelGardenService 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 ModelGardenService 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): ModelGardenService; + + /** + * Calls GetPublisherModel. + * @param request GetPublisherModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PublisherModel + */ + public getPublisherModel(request: google.cloud.aiplatform.v1.IGetPublisherModelRequest, callback: google.cloud.aiplatform.v1.ModelGardenService.GetPublisherModelCallback): void; + + /** + * Calls GetPublisherModel. + * @param request GetPublisherModelRequest message or plain object + * @returns Promise + */ + public getPublisherModel(request: google.cloud.aiplatform.v1.IGetPublisherModelRequest): Promise; + } + + namespace ModelGardenService { + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.ModelGardenService|getPublisherModel}. + * @param error Error, if any + * @param [response] PublisherModel + */ + type GetPublisherModelCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.PublisherModel) => void; + } + + /** PublisherModelView enum. */ + enum PublisherModelView { + PUBLISHER_MODEL_VIEW_UNSPECIFIED = 0, + PUBLISHER_MODEL_VIEW_BASIC = 1, + PUBLISHER_MODEL_VIEW_FULL = 2, + PUBLISHER_MODEL_VERSION_VIEW_BASIC = 3 + } + + /** Properties of a GetPublisherModelRequest. */ + interface IGetPublisherModelRequest { + + /** GetPublisherModelRequest name */ + name?: (string|null); + + /** GetPublisherModelRequest languageCode */ + languageCode?: (string|null); + + /** GetPublisherModelRequest view */ + view?: (google.cloud.aiplatform.v1.PublisherModelView|keyof typeof google.cloud.aiplatform.v1.PublisherModelView|null); + } + + /** Represents a GetPublisherModelRequest. */ + class GetPublisherModelRequest implements IGetPublisherModelRequest { + + /** + * Constructs a new GetPublisherModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IGetPublisherModelRequest); + + /** GetPublisherModelRequest name. */ + public name: string; + + /** GetPublisherModelRequest languageCode. */ + public languageCode: string; + + /** GetPublisherModelRequest view. */ + public view: (google.cloud.aiplatform.v1.PublisherModelView|keyof typeof google.cloud.aiplatform.v1.PublisherModelView); + + /** + * Creates a new GetPublisherModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPublisherModelRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IGetPublisherModelRequest): google.cloud.aiplatform.v1.GetPublisherModelRequest; + + /** + * Encodes the specified GetPublisherModelRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.GetPublisherModelRequest.verify|verify} messages. + * @param message GetPublisherModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IGetPublisherModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPublisherModelRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.GetPublisherModelRequest.verify|verify} messages. + * @param message GetPublisherModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IGetPublisherModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPublisherModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPublisherModelRequest + * @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.GetPublisherModelRequest; + + /** + * Decodes a GetPublisherModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPublisherModelRequest + * @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.GetPublisherModelRequest; + + /** + * Verifies a GetPublisherModelRequest 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 GetPublisherModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPublisherModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.GetPublisherModelRequest; + + /** + * Creates a plain object from a GetPublisherModelRequest message. Also converts values to other types if specified. + * @param message GetPublisherModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.GetPublisherModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPublisherModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPublisherModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublisherModel. */ + interface IPublisherModel { + + /** PublisherModel name */ + name?: (string|null); + + /** PublisherModel versionId */ + versionId?: (string|null); + + /** PublisherModel openSourceCategory */ + openSourceCategory?: (google.cloud.aiplatform.v1.PublisherModel.OpenSourceCategory|keyof typeof google.cloud.aiplatform.v1.PublisherModel.OpenSourceCategory|null); + + /** PublisherModel supportedActions */ + supportedActions?: (google.cloud.aiplatform.v1.PublisherModel.ICallToAction|null); + + /** PublisherModel frameworks */ + frameworks?: (string[]|null); + + /** PublisherModel launchStage */ + launchStage?: (google.cloud.aiplatform.v1.PublisherModel.LaunchStage|keyof typeof google.cloud.aiplatform.v1.PublisherModel.LaunchStage|null); + + /** PublisherModel publisherModelTemplate */ + publisherModelTemplate?: (string|null); + + /** PublisherModel predictSchemata */ + predictSchemata?: (google.cloud.aiplatform.v1.IPredictSchemata|null); + } + + /** Represents a PublisherModel. */ + class PublisherModel implements IPublisherModel { + + /** + * Constructs a new PublisherModel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IPublisherModel); + + /** PublisherModel name. */ + public name: string; + + /** PublisherModel versionId. */ + public versionId: string; + + /** PublisherModel openSourceCategory. */ + public openSourceCategory: (google.cloud.aiplatform.v1.PublisherModel.OpenSourceCategory|keyof typeof google.cloud.aiplatform.v1.PublisherModel.OpenSourceCategory); + + /** PublisherModel supportedActions. */ + public supportedActions?: (google.cloud.aiplatform.v1.PublisherModel.ICallToAction|null); + + /** PublisherModel frameworks. */ + public frameworks: string[]; + + /** PublisherModel launchStage. */ + public launchStage: (google.cloud.aiplatform.v1.PublisherModel.LaunchStage|keyof typeof google.cloud.aiplatform.v1.PublisherModel.LaunchStage); + + /** PublisherModel publisherModelTemplate. */ + public publisherModelTemplate: string; + + /** PublisherModel predictSchemata. */ + public predictSchemata?: (google.cloud.aiplatform.v1.IPredictSchemata|null); + + /** + * Creates a new PublisherModel instance using the specified properties. + * @param [properties] Properties to set + * @returns PublisherModel instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IPublisherModel): google.cloud.aiplatform.v1.PublisherModel; + + /** + * Encodes the specified PublisherModel message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.verify|verify} messages. + * @param message PublisherModel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IPublisherModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublisherModel message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.verify|verify} messages. + * @param message PublisherModel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IPublisherModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublisherModel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublisherModel + * @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.PublisherModel; + + /** + * Decodes a PublisherModel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublisherModel + * @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.PublisherModel; + + /** + * Verifies a PublisherModel 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 PublisherModel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublisherModel + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.PublisherModel; + + /** + * Creates a plain object from a PublisherModel message. Also converts values to other types if specified. + * @param message PublisherModel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.PublisherModel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublisherModel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublisherModel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PublisherModel { + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference uri */ + uri?: (string|null); + + /** ResourceReference resourceName */ + resourceName?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.PublisherModel.IResourceReference); + + /** ResourceReference uri. */ + public uri?: (string|null); + + /** ResourceReference resourceName. */ + public resourceName?: (string|null); + + /** ResourceReference reference. */ + public reference?: ("uri"|"resourceName"); + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.cloud.aiplatform.v1.PublisherModel.IResourceReference): google.cloud.aiplatform.v1.PublisherModel.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.PublisherModel.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.PublisherModel.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.PublisherModel.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.PublisherModel.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.PublisherModel.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.PublisherModel.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Documentation. */ + interface IDocumentation { + + /** Documentation title */ + title?: (string|null); + + /** Documentation content */ + content?: (string|null); + } + + /** Represents a Documentation. */ + class Documentation implements IDocumentation { + + /** + * Constructs a new Documentation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.PublisherModel.IDocumentation); + + /** Documentation title. */ + public title: string; + + /** Documentation content. */ + public content: string; + + /** + * Creates a new Documentation instance using the specified properties. + * @param [properties] Properties to set + * @returns Documentation instance + */ + public static create(properties?: google.cloud.aiplatform.v1.PublisherModel.IDocumentation): google.cloud.aiplatform.v1.PublisherModel.Documentation; + + /** + * Encodes the specified Documentation message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.PublisherModel.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.PublisherModel.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Documentation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Documentation + * @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.PublisherModel.Documentation; + + /** + * Decodes a Documentation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Documentation + * @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.PublisherModel.Documentation; + + /** + * Verifies a Documentation 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 Documentation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Documentation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.PublisherModel.Documentation; + + /** + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @param message Documentation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.PublisherModel.Documentation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Documentation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Documentation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CallToAction. */ + interface ICallToAction { + + /** CallToAction viewRestApi */ + viewRestApi?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi|null); + + /** CallToAction openNotebook */ + openNotebook?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction createApplication */ + createApplication?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openFineTuningPipeline */ + openFineTuningPipeline?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openPromptTuningPipeline */ + openPromptTuningPipeline?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openGenie */ + openGenie?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction deploy */ + deploy?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy|null); + + /** CallToAction openGenerationAiStudio */ + openGenerationAiStudio?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction requestAccess */ + requestAccess?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + } + + /** Represents a CallToAction. */ + class CallToAction implements ICallToAction { + + /** + * Constructs a new CallToAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.PublisherModel.ICallToAction); + + /** CallToAction viewRestApi. */ + public viewRestApi?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi|null); + + /** CallToAction openNotebook. */ + public openNotebook?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction createApplication. */ + public createApplication?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openFineTuningPipeline. */ + public openFineTuningPipeline?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openPromptTuningPipeline. */ + public openPromptTuningPipeline?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openGenie. */ + public openGenie?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction deploy. */ + public deploy?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy|null); + + /** CallToAction openGenerationAiStudio. */ + public openGenerationAiStudio?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction requestAccess. */ + public requestAccess?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** + * Creates a new CallToAction instance using the specified properties. + * @param [properties] Properties to set + * @returns CallToAction instance + */ + public static create(properties?: google.cloud.aiplatform.v1.PublisherModel.ICallToAction): google.cloud.aiplatform.v1.PublisherModel.CallToAction; + + /** + * Encodes the specified CallToAction message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.verify|verify} messages. + * @param message CallToAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.PublisherModel.ICallToAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallToAction message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.verify|verify} messages. + * @param message CallToAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.PublisherModel.ICallToAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallToAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallToAction + * @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.PublisherModel.CallToAction; + + /** + * Decodes a CallToAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallToAction + * @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.PublisherModel.CallToAction; + + /** + * Verifies a CallToAction 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 CallToAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallToAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.PublisherModel.CallToAction; + + /** + * Creates a plain object from a CallToAction message. Also converts values to other types if specified. + * @param message CallToAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallToAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallToAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CallToAction { + + /** Properties of a RegionalResourceReferences. */ + interface IRegionalResourceReferences { + + /** RegionalResourceReferences references */ + references?: ({ [k: string]: google.cloud.aiplatform.v1.PublisherModel.IResourceReference }|null); + + /** RegionalResourceReferences title */ + title?: (string|null); + } + + /** Represents a RegionalResourceReferences. */ + class RegionalResourceReferences implements IRegionalResourceReferences { + + /** + * Constructs a new RegionalResourceReferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences); + + /** RegionalResourceReferences references. */ + public references: { [k: string]: google.cloud.aiplatform.v1.PublisherModel.IResourceReference }; + + /** RegionalResourceReferences title. */ + public title: string; + + /** + * Creates a new RegionalResourceReferences instance using the specified properties. + * @param [properties] Properties to set + * @returns RegionalResourceReferences instance + */ + public static create(properties?: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences): google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences; + + /** + * Encodes the specified RegionalResourceReferences message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify|verify} messages. + * @param message RegionalResourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegionalResourceReferences message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify|verify} messages. + * @param message RegionalResourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegionalResourceReferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegionalResourceReferences + * @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.PublisherModel.CallToAction.RegionalResourceReferences; + + /** + * Decodes a RegionalResourceReferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegionalResourceReferences + * @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.PublisherModel.CallToAction.RegionalResourceReferences; + + /** + * Verifies a RegionalResourceReferences 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 RegionalResourceReferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegionalResourceReferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences; + + /** + * Creates a plain object from a RegionalResourceReferences message. Also converts values to other types if specified. + * @param message RegionalResourceReferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegionalResourceReferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegionalResourceReferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ViewRestApi. */ + interface IViewRestApi { + + /** ViewRestApi documentations */ + documentations?: (google.cloud.aiplatform.v1.PublisherModel.IDocumentation[]|null); + + /** ViewRestApi title */ + title?: (string|null); + } + + /** Represents a ViewRestApi. */ + class ViewRestApi implements IViewRestApi { + + /** + * Constructs a new ViewRestApi. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi); + + /** ViewRestApi documentations. */ + public documentations: google.cloud.aiplatform.v1.PublisherModel.IDocumentation[]; + + /** ViewRestApi title. */ + public title: string; + + /** + * Creates a new ViewRestApi instance using the specified properties. + * @param [properties] Properties to set + * @returns ViewRestApi instance + */ + public static create(properties?: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi): google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi; + + /** + * Encodes the specified ViewRestApi message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.verify|verify} messages. + * @param message ViewRestApi message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ViewRestApi message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.verify|verify} messages. + * @param message ViewRestApi message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ViewRestApi message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ViewRestApi + * @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.PublisherModel.CallToAction.ViewRestApi; + + /** + * Decodes a ViewRestApi message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ViewRestApi + * @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.PublisherModel.CallToAction.ViewRestApi; + + /** + * Verifies a ViewRestApi 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 ViewRestApi message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ViewRestApi + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi; + + /** + * Creates a plain object from a ViewRestApi message. Also converts values to other types if specified. + * @param message ViewRestApi + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ViewRestApi to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ViewRestApi + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Deploy. */ + interface IDeploy { + + /** Deploy dedicatedResources */ + dedicatedResources?: (google.cloud.aiplatform.v1.IDedicatedResources|null); + + /** Deploy automaticResources */ + automaticResources?: (google.cloud.aiplatform.v1.IAutomaticResources|null); + + /** Deploy sharedResources */ + sharedResources?: (string|null); + + /** Deploy modelDisplayName */ + modelDisplayName?: (string|null); + + /** Deploy largeModelReference */ + largeModelReference?: (google.cloud.aiplatform.v1.ILargeModelReference|null); + + /** Deploy containerSpec */ + containerSpec?: (google.cloud.aiplatform.v1.IModelContainerSpec|null); + + /** Deploy artifactUri */ + artifactUri?: (string|null); + + /** Deploy title */ + title?: (string|null); + } + + /** Represents a Deploy. */ + class Deploy implements IDeploy { + + /** + * Constructs a new Deploy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy); + + /** Deploy dedicatedResources. */ + public dedicatedResources?: (google.cloud.aiplatform.v1.IDedicatedResources|null); + + /** Deploy automaticResources. */ + public automaticResources?: (google.cloud.aiplatform.v1.IAutomaticResources|null); + + /** Deploy sharedResources. */ + public sharedResources?: (string|null); + + /** Deploy modelDisplayName. */ + public modelDisplayName: string; + + /** Deploy largeModelReference. */ + public largeModelReference?: (google.cloud.aiplatform.v1.ILargeModelReference|null); + + /** Deploy containerSpec. */ + public containerSpec?: (google.cloud.aiplatform.v1.IModelContainerSpec|null); + + /** Deploy artifactUri. */ + public artifactUri: string; + + /** Deploy title. */ + public title: string; + + /** Deploy predictionResources. */ + public predictionResources?: ("dedicatedResources"|"automaticResources"|"sharedResources"); + + /** + * Creates a new Deploy instance using the specified properties. + * @param [properties] Properties to set + * @returns Deploy instance + */ + public static create(properties?: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy): google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy; + + /** + * Encodes the specified Deploy message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.verify|verify} messages. + * @param message Deploy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Deploy message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.verify|verify} messages. + * @param message Deploy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Deploy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deploy + * @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.PublisherModel.CallToAction.Deploy; + + /** + * Decodes a Deploy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deploy + * @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.PublisherModel.CallToAction.Deploy; + + /** + * Verifies a Deploy 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 Deploy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deploy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy; + + /** + * Creates a plain object from a Deploy message. Also converts values to other types if specified. + * @param message Deploy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Deploy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Deploy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** OpenSourceCategory enum. */ + enum OpenSourceCategory { + OPEN_SOURCE_CATEGORY_UNSPECIFIED = 0, + PROPRIETARY = 1, + GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 2, + THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 3, + GOOGLE_OWNED_OSS = 4, + THIRD_PARTY_OWNED_OSS = 5 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + EXPERIMENTAL = 1, + PRIVATE_PREVIEW = 2, + PUBLIC_PREVIEW = 3, + GA = 4 + } + } + /** Represents a ModelService */ class ModelService extends $protobuf.rpc.Service { @@ -103746,6 +105701,9 @@ export namespace google { /** ImportFeatureValuesOperationMetadata timestampOutsideRetentionRowsCount */ timestampOutsideRetentionRowsCount?: (number|Long|string|null); + + /** ImportFeatureValuesOperationMetadata blockingOperationIds */ + blockingOperationIds?: ((number|Long|string)[]|null); } /** Represents an ImportFeatureValuesOperationMetadata. */ @@ -103775,6 +105733,9 @@ export namespace google { /** ImportFeatureValuesOperationMetadata timestampOutsideRetentionRowsCount. */ public timestampOutsideRetentionRowsCount: (number|Long|string); + /** ImportFeatureValuesOperationMetadata blockingOperationIds. */ + public blockingOperationIds: (number|Long|string)[]; + /** * Creates a new ImportFeatureValuesOperationMetadata instance using the specified properties. * @param [properties] Properties to set @@ -129762,6 +131723,9 @@ export namespace google { /** PublisherModel frameworks */ frameworks?: (string[]|null); + /** PublisherModel launchStage */ + launchStage?: (google.cloud.aiplatform.v1beta1.PublisherModel.LaunchStage|keyof typeof google.cloud.aiplatform.v1beta1.PublisherModel.LaunchStage|null); + /** PublisherModel publisherModelTemplate */ publisherModelTemplate?: (string|null); @@ -129793,6 +131757,9 @@ export namespace google { /** PublisherModel frameworks. */ public frameworks: string[]; + /** PublisherModel launchStage. */ + public launchStage: (google.cloud.aiplatform.v1beta1.PublisherModel.LaunchStage|keyof typeof google.cloud.aiplatform.v1beta1.PublisherModel.LaunchStage); + /** PublisherModel publisherModelTemplate. */ public publisherModelTemplate: string; @@ -130114,6 +132081,9 @@ export namespace google { /** CallToAction openGenerationAiStudio */ openGenerationAiStudio?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction requestAccess */ + requestAccess?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); } /** Represents a CallToAction. */ @@ -130149,6 +132119,9 @@ export namespace google { /** CallToAction openGenerationAiStudio. */ public openGenerationAiStudio?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + /** CallToAction requestAccess. */ + public requestAccess?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + /** * Creates a new CallToAction instance using the specified properties. * @param [properties] Properties to set @@ -130587,6 +132560,15 @@ export namespace google { GOOGLE_OWNED_OSS = 4, THIRD_PARTY_OWNED_OSS = 5 } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + EXPERIMENTAL = 1, + PRIVATE_PREVIEW = 2, + PUBLIC_PREVIEW = 3, + GA = 4 + } } /** Represents a ModelService */ diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index 513ea3afc0d..1140760f22c 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -77,6 +77,7 @@ * @property {number} NVIDIA_TESLA_P4=4 NVIDIA_TESLA_P4 value * @property {number} NVIDIA_TESLA_T4=5 NVIDIA_TESLA_T4 value * @property {number} NVIDIA_TESLA_A100=8 NVIDIA_TESLA_A100 value + * @property {number} NVIDIA_A100_80GB=9 NVIDIA_A100_80GB value * @property {number} NVIDIA_L4=11 NVIDIA_L4 value * @property {number} TPU_V2=6 TPU_V2 value * @property {number} TPU_V3=7 TPU_V3 value @@ -91,6 +92,7 @@ values[valuesById[4] = "NVIDIA_TESLA_P4"] = 4; values[valuesById[5] = "NVIDIA_TESLA_T4"] = 5; values[valuesById[8] = "NVIDIA_TESLA_A100"] = 8; + values[valuesById[9] = "NVIDIA_A100_80GB"] = 9; values[valuesById[11] = "NVIDIA_L4"] = 11; values[valuesById[6] = "TPU_V2"] = 6; values[valuesById[7] = "TPU_V3"] = 7; @@ -14111,6 +14113,7 @@ case 4: case 5: case 8: + case 9: case 11: case 6: case 7: @@ -14172,6 +14175,10 @@ case 8: message.acceleratorType = 8; break; + case "NVIDIA_A100_80GB": + case 9: + message.acceleratorType = 9; + break; case "NVIDIA_L4": case 11: message.acceleratorType = 11; @@ -16421,6 +16428,7 @@ * @property {google.protobuf.IValue|null} [metadata] Model metadata * @property {Array.|null} [supportedExportFormats] Model supportedExportFormats * @property {string|null} [trainingPipeline] Model trainingPipeline + * @property {string|null} [pipelineJob] Model pipelineJob * @property {google.cloud.aiplatform.v1.IModelContainerSpec|null} [containerSpec] Model containerSpec * @property {string|null} [artifactUri] Model artifactUri * @property {Array.|null} [supportedDeploymentResourcesTypes] Model supportedDeploymentResourcesTypes @@ -16564,6 +16572,14 @@ */ Model.prototype.trainingPipeline = ""; + /** + * Model pipelineJob. + * @member {string} pipelineJob + * @memberof google.cloud.aiplatform.v1.Model + * @instance + */ + Model.prototype.pipelineJob = ""; + /** * Model containerSpec. * @member {google.cloud.aiplatform.v1.IModelContainerSpec|null|undefined} containerSpec @@ -16774,6 +16790,8 @@ $root.google.cloud.aiplatform.v1.ModelSourceInfo.encode(message.modelSourceInfo, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); if (message.metadataArtifact != null && Object.hasOwnProperty.call(message, "metadataArtifact")) writer.uint32(/* id 44, wireType 2 =*/354).string(message.metadataArtifact); + if (message.pipelineJob != null && Object.hasOwnProperty.call(message, "pipelineJob")) + writer.uint32(/* id 47, wireType 2 =*/378).string(message.pipelineJob); return writer; }; @@ -16864,6 +16882,10 @@ message.trainingPipeline = reader.string(); break; } + case 47: { + message.pipelineJob = reader.string(); + break; + } case 9: { message.containerSpec = $root.google.cloud.aiplatform.v1.ModelContainerSpec.decode(reader, reader.uint32()); break; @@ -17048,6 +17070,9 @@ if (message.trainingPipeline != null && message.hasOwnProperty("trainingPipeline")) if (!$util.isString(message.trainingPipeline)) return "trainingPipeline: string expected"; + if (message.pipelineJob != null && message.hasOwnProperty("pipelineJob")) + if (!$util.isString(message.pipelineJob)) + return "pipelineJob: string expected"; if (message.containerSpec != null && message.hasOwnProperty("containerSpec")) { var error = $root.google.cloud.aiplatform.v1.ModelContainerSpec.verify(message.containerSpec); if (error) @@ -17203,6 +17228,8 @@ } if (object.trainingPipeline != null) message.trainingPipeline = String(object.trainingPipeline); + if (object.pipelineJob != null) + message.pipelineJob = String(object.pipelineJob); if (object.containerSpec != null) { if (typeof object.containerSpec !== "object") throw TypeError(".google.cloud.aiplatform.v1.Model.containerSpec: object expected"); @@ -17352,6 +17379,7 @@ object.originalModelInfo = null; object.modelSourceInfo = null; object.metadataArtifact = ""; + object.pipelineJob = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -17431,6 +17459,8 @@ object.modelSourceInfo = $root.google.cloud.aiplatform.v1.ModelSourceInfo.toObject(message.modelSourceInfo, options); if (message.metadataArtifact != null && message.hasOwnProperty("metadataArtifact")) object.metadataArtifact = message.metadataArtifact; + if (message.pipelineJob != null && message.hasOwnProperty("pipelineJob")) + object.pipelineJob = message.pipelineJob; return object; }; @@ -17975,6 +18005,209 @@ return Model; })(); + v1.LargeModelReference = (function() { + + /** + * Properties of a LargeModelReference. + * @memberof google.cloud.aiplatform.v1 + * @interface ILargeModelReference + * @property {string|null} [name] LargeModelReference name + */ + + /** + * Constructs a new LargeModelReference. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a LargeModelReference. + * @implements ILargeModelReference + * @constructor + * @param {google.cloud.aiplatform.v1.ILargeModelReference=} [properties] Properties to set + */ + function LargeModelReference(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]]; + } + + /** + * LargeModelReference name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @instance + */ + LargeModelReference.prototype.name = ""; + + /** + * Creates a new LargeModelReference instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1.ILargeModelReference=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.LargeModelReference} LargeModelReference instance + */ + LargeModelReference.create = function create(properties) { + return new LargeModelReference(properties); + }; + + /** + * Encodes the specified LargeModelReference message. Does not implicitly {@link google.cloud.aiplatform.v1.LargeModelReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1.ILargeModelReference} message LargeModelReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LargeModelReference.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 LargeModelReference message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.LargeModelReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1.ILargeModelReference} message LargeModelReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LargeModelReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @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.LargeModelReference} LargeModelReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LargeModelReference.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.LargeModelReference(); + 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 LargeModelReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.LargeModelReference} LargeModelReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LargeModelReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LargeModelReference message. + * @function verify + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LargeModelReference.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 LargeModelReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.LargeModelReference} LargeModelReference + */ + LargeModelReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.LargeModelReference) + return object; + var message = new $root.google.cloud.aiplatform.v1.LargeModelReference(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a LargeModelReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1.LargeModelReference} message LargeModelReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LargeModelReference.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 LargeModelReference to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @instance + * @returns {Object.} JSON object + */ + LargeModelReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LargeModelReference + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.LargeModelReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LargeModelReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.LargeModelReference"; + }; + + return LargeModelReference; + })(); + v1.PredictSchemata = (function() { /** @@ -60520,6 +60753,7 @@ * @property {Array.|null} [sourceUris] ImportFeatureValuesOperationMetadata sourceUris * @property {number|Long|null} [invalidRowCount] ImportFeatureValuesOperationMetadata invalidRowCount * @property {number|Long|null} [timestampOutsideRetentionRowsCount] ImportFeatureValuesOperationMetadata timestampOutsideRetentionRowsCount + * @property {Array.|null} [blockingOperationIds] ImportFeatureValuesOperationMetadata blockingOperationIds */ /** @@ -60532,6 +60766,7 @@ */ function ImportFeatureValuesOperationMetadata(properties) { this.sourceUris = []; + this.blockingOperationIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60586,6 +60821,14 @@ */ ImportFeatureValuesOperationMetadata.prototype.timestampOutsideRetentionRowsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * ImportFeatureValuesOperationMetadata blockingOperationIds. + * @member {Array.} blockingOperationIds + * @memberof google.cloud.aiplatform.v1.ImportFeatureValuesOperationMetadata + * @instance + */ + ImportFeatureValuesOperationMetadata.prototype.blockingOperationIds = $util.emptyArray; + /** * Creates a new ImportFeatureValuesOperationMetadata instance using the specified properties. * @function create @@ -60623,6 +60866,12 @@ writer.uint32(/* id 6, wireType 0 =*/48).int64(message.invalidRowCount); if (message.timestampOutsideRetentionRowsCount != null && Object.hasOwnProperty.call(message, "timestampOutsideRetentionRowsCount")) writer.uint32(/* id 7, wireType 0 =*/56).int64(message.timestampOutsideRetentionRowsCount); + if (message.blockingOperationIds != null && message.blockingOperationIds.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.blockingOperationIds.length; ++i) + writer.int64(message.blockingOperationIds[i]); + writer.ldelim(); + } return writer; }; @@ -60683,6 +60932,17 @@ message.timestampOutsideRetentionRowsCount = reader.int64(); break; } + case 8: { + if (!(message.blockingOperationIds && message.blockingOperationIds.length)) + message.blockingOperationIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.blockingOperationIds.push(reader.int64()); + } else + message.blockingOperationIds.push(reader.int64()); + break; + } default: reader.skipType(tag & 7); break; @@ -60742,6 +61002,13 @@ if (message.timestampOutsideRetentionRowsCount != null && message.hasOwnProperty("timestampOutsideRetentionRowsCount")) if (!$util.isInteger(message.timestampOutsideRetentionRowsCount) && !(message.timestampOutsideRetentionRowsCount && $util.isInteger(message.timestampOutsideRetentionRowsCount.low) && $util.isInteger(message.timestampOutsideRetentionRowsCount.high))) return "timestampOutsideRetentionRowsCount: integer|Long expected"; + if (message.blockingOperationIds != null && message.hasOwnProperty("blockingOperationIds")) { + if (!Array.isArray(message.blockingOperationIds)) + return "blockingOperationIds: array expected"; + for (var i = 0; i < message.blockingOperationIds.length; ++i) + if (!$util.isInteger(message.blockingOperationIds[i]) && !(message.blockingOperationIds[i] && $util.isInteger(message.blockingOperationIds[i].low) && $util.isInteger(message.blockingOperationIds[i].high))) + return "blockingOperationIds: integer|Long[] expected"; + } return null; }; @@ -60805,6 +61072,20 @@ message.timestampOutsideRetentionRowsCount = object.timestampOutsideRetentionRowsCount; else if (typeof object.timestampOutsideRetentionRowsCount === "object") message.timestampOutsideRetentionRowsCount = new $util.LongBits(object.timestampOutsideRetentionRowsCount.low >>> 0, object.timestampOutsideRetentionRowsCount.high >>> 0).toNumber(); + if (object.blockingOperationIds) { + if (!Array.isArray(object.blockingOperationIds)) + throw TypeError(".google.cloud.aiplatform.v1.ImportFeatureValuesOperationMetadata.blockingOperationIds: array expected"); + message.blockingOperationIds = []; + for (var i = 0; i < object.blockingOperationIds.length; ++i) + if ($util.Long) + (message.blockingOperationIds[i] = $util.Long.fromValue(object.blockingOperationIds[i])).unsigned = false; + else if (typeof object.blockingOperationIds[i] === "string") + message.blockingOperationIds[i] = parseInt(object.blockingOperationIds[i], 10); + else if (typeof object.blockingOperationIds[i] === "number") + message.blockingOperationIds[i] = object.blockingOperationIds[i]; + else if (typeof object.blockingOperationIds[i] === "object") + message.blockingOperationIds[i] = new $util.LongBits(object.blockingOperationIds[i].low >>> 0, object.blockingOperationIds[i].high >>> 0).toNumber(); + } return message; }; @@ -60821,8 +61102,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.sourceUris = []; + object.blockingOperationIds = []; + } if (options.defaults) { object.genericMetadata = null; if ($util.Long) { @@ -60873,6 +61156,14 @@ object.timestampOutsideRetentionRowsCount = options.longs === String ? String(message.timestampOutsideRetentionRowsCount) : message.timestampOutsideRetentionRowsCount; else object.timestampOutsideRetentionRowsCount = options.longs === String ? $util.Long.prototype.toString.call(message.timestampOutsideRetentionRowsCount) : options.longs === Number ? new $util.LongBits(message.timestampOutsideRetentionRowsCount.low >>> 0, message.timestampOutsideRetentionRowsCount.high >>> 0).toNumber() : message.timestampOutsideRetentionRowsCount; + if (message.blockingOperationIds && message.blockingOperationIds.length) { + object.blockingOperationIds = []; + for (var j = 0; j < message.blockingOperationIds.length; ++j) + if (typeof message.blockingOperationIds[j] === "number") + object.blockingOperationIds[j] = options.longs === String ? String(message.blockingOperationIds[j]) : message.blockingOperationIds[j]; + else + object.blockingOperationIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.blockingOperationIds[j]) : options.longs === Number ? new $util.LongBits(message.blockingOperationIds[j].low >>> 0, message.blockingOperationIds[j].high >>> 0).toNumber() : message.blockingOperationIds[j]; + } return object; }; @@ -103339,175 +103630,250 @@ return LineageSubgraph; })(); - v1.MetadataSchema = (function() { + v1.MatchService = (function() { /** - * Properties of a MetadataSchema. + * Constructs a new MatchService service. * @memberof google.cloud.aiplatform.v1 - * @interface IMetadataSchema - * @property {string|null} [name] MetadataSchema name - * @property {string|null} [schemaVersion] MetadataSchema schemaVersion - * @property {string|null} [schema] MetadataSchema schema - * @property {google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType|null} [schemaType] MetadataSchema schemaType - * @property {google.protobuf.ITimestamp|null} [createTime] MetadataSchema createTime - * @property {string|null} [description] MetadataSchema description + * @classdesc Represents a MatchService + * @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 MatchService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MatchService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MatchService; /** - * Constructs a new MetadataSchema. - * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a MetadataSchema. - * @implements IMetadataSchema - * @constructor - * @param {google.cloud.aiplatform.v1.IMetadataSchema=} [properties] Properties to set + * Creates new MatchService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.aiplatform.v1.MatchService + * @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 {MatchService} RPC service. Useful where requests and/or responses are streamed. */ - function MetadataSchema(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]]; - } + MatchService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * MetadataSchema name. - * @member {string} name - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * Callback as used by {@link google.cloud.aiplatform.v1.MatchService|findNeighbors}. + * @memberof google.cloud.aiplatform.v1.MatchService + * @typedef FindNeighborsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse} [response] FindNeighborsResponse + */ + + /** + * Calls FindNeighbors. + * @function findNeighbors + * @memberof google.cloud.aiplatform.v1.MatchService * @instance + * @param {google.cloud.aiplatform.v1.IFindNeighborsRequest} request FindNeighborsRequest message or plain object + * @param {google.cloud.aiplatform.v1.MatchService.FindNeighborsCallback} callback Node-style callback called with the error, if any, and FindNeighborsResponse + * @returns {undefined} + * @variation 1 */ - MetadataSchema.prototype.name = ""; + Object.defineProperty(MatchService.prototype.findNeighbors = function findNeighbors(request, callback) { + return this.rpcCall(findNeighbors, $root.google.cloud.aiplatform.v1.FindNeighborsRequest, $root.google.cloud.aiplatform.v1.FindNeighborsResponse, request, callback); + }, "name", { value: "FindNeighbors" }); /** - * MetadataSchema schemaVersion. - * @member {string} schemaVersion - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * Calls FindNeighbors. + * @function findNeighbors + * @memberof google.cloud.aiplatform.v1.MatchService * @instance + * @param {google.cloud.aiplatform.v1.IFindNeighborsRequest} request FindNeighborsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - MetadataSchema.prototype.schemaVersion = ""; /** - * MetadataSchema schema. - * @member {string} schema - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * Callback as used by {@link google.cloud.aiplatform.v1.MatchService|readIndexDatapoints}. + * @memberof google.cloud.aiplatform.v1.MatchService + * @typedef ReadIndexDatapointsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.ReadIndexDatapointsResponse} [response] ReadIndexDatapointsResponse + */ + + /** + * Calls ReadIndexDatapoints. + * @function readIndexDatapoints + * @memberof google.cloud.aiplatform.v1.MatchService * @instance + * @param {google.cloud.aiplatform.v1.IReadIndexDatapointsRequest} request ReadIndexDatapointsRequest message or plain object + * @param {google.cloud.aiplatform.v1.MatchService.ReadIndexDatapointsCallback} callback Node-style callback called with the error, if any, and ReadIndexDatapointsResponse + * @returns {undefined} + * @variation 1 */ - MetadataSchema.prototype.schema = ""; + Object.defineProperty(MatchService.prototype.readIndexDatapoints = function readIndexDatapoints(request, callback) { + return this.rpcCall(readIndexDatapoints, $root.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest, $root.google.cloud.aiplatform.v1.ReadIndexDatapointsResponse, request, callback); + }, "name", { value: "ReadIndexDatapoints" }); /** - * MetadataSchema schemaType. - * @member {google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType} schemaType - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * Calls ReadIndexDatapoints. + * @function readIndexDatapoints + * @memberof google.cloud.aiplatform.v1.MatchService * @instance + * @param {google.cloud.aiplatform.v1.IReadIndexDatapointsRequest} request ReadIndexDatapointsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - MetadataSchema.prototype.schemaType = 0; + + return MatchService; + })(); + + v1.FindNeighborsRequest = (function() { /** - * MetadataSchema createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * Properties of a FindNeighborsRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface IFindNeighborsRequest + * @property {string|null} [indexEndpoint] FindNeighborsRequest indexEndpoint + * @property {string|null} [deployedIndexId] FindNeighborsRequest deployedIndexId + * @property {Array.|null} [queries] FindNeighborsRequest queries + * @property {boolean|null} [returnFullDatapoint] FindNeighborsRequest returnFullDatapoint + */ + + /** + * Constructs a new FindNeighborsRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a FindNeighborsRequest. + * @implements IFindNeighborsRequest + * @constructor + * @param {google.cloud.aiplatform.v1.IFindNeighborsRequest=} [properties] Properties to set + */ + function FindNeighborsRequest(properties) { + this.queries = []; + 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]]; + } + + /** + * FindNeighborsRequest indexEndpoint. + * @member {string} indexEndpoint + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @instance */ - MetadataSchema.prototype.createTime = null; + FindNeighborsRequest.prototype.indexEndpoint = ""; /** - * MetadataSchema description. - * @member {string} description - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * FindNeighborsRequest deployedIndexId. + * @member {string} deployedIndexId + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @instance */ - MetadataSchema.prototype.description = ""; + FindNeighborsRequest.prototype.deployedIndexId = ""; /** - * Creates a new MetadataSchema instance using the specified properties. + * FindNeighborsRequest queries. + * @member {Array.} queries + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest + * @instance + */ + FindNeighborsRequest.prototype.queries = $util.emptyArray; + + /** + * FindNeighborsRequest returnFullDatapoint. + * @member {boolean} returnFullDatapoint + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest + * @instance + */ + FindNeighborsRequest.prototype.returnFullDatapoint = false; + + /** + * Creates a new FindNeighborsRequest instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @static - * @param {google.cloud.aiplatform.v1.IMetadataSchema=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MetadataSchema} MetadataSchema instance + * @param {google.cloud.aiplatform.v1.IFindNeighborsRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FindNeighborsRequest} FindNeighborsRequest instance */ - MetadataSchema.create = function create(properties) { - return new MetadataSchema(properties); + FindNeighborsRequest.create = function create(properties) { + return new FindNeighborsRequest(properties); }; /** - * Encodes the specified MetadataSchema message. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataSchema.verify|verify} messages. + * Encodes the specified FindNeighborsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @static - * @param {google.cloud.aiplatform.v1.IMetadataSchema} message MetadataSchema message or plain object to encode + * @param {google.cloud.aiplatform.v1.IFindNeighborsRequest} message FindNeighborsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataSchema.encode = function encode(message, writer) { + FindNeighborsRequest.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.schemaVersion != null && Object.hasOwnProperty.call(message, "schemaVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.schemaVersion); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.schema); - if (message.schemaType != null && Object.hasOwnProperty.call(message, "schemaType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.schemaType); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.indexEndpoint != null && Object.hasOwnProperty.call(message, "indexEndpoint")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.indexEndpoint); + if (message.deployedIndexId != null && Object.hasOwnProperty.call(message, "deployedIndexId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deployedIndexId); + if (message.queries != null && message.queries.length) + for (var i = 0; i < message.queries.length; ++i) + $root.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.encode(message.queries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.returnFullDatapoint != null && Object.hasOwnProperty.call(message, "returnFullDatapoint")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.returnFullDatapoint); return writer; }; /** - * Encodes the specified MetadataSchema message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataSchema.verify|verify} messages. + * Encodes the specified FindNeighborsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @static - * @param {google.cloud.aiplatform.v1.IMetadataSchema} message MetadataSchema message or plain object to encode + * @param {google.cloud.aiplatform.v1.IFindNeighborsRequest} message FindNeighborsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataSchema.encodeDelimited = function encodeDelimited(message, writer) { + FindNeighborsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataSchema message from the specified reader or buffer. + * Decodes a FindNeighborsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @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.MetadataSchema} MetadataSchema + * @returns {google.cloud.aiplatform.v1.FindNeighborsRequest} FindNeighborsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataSchema.decode = function decode(reader, length) { + FindNeighborsRequest.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.MetadataSchema(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.FindNeighborsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.indexEndpoint = reader.string(); break; } case 2: { - message.schemaVersion = reader.string(); + message.deployedIndexId = reader.string(); break; } case 3: { - message.schema = reader.string(); + if (!(message.queries && message.queries.length)) + message.queries = []; + message.queries.push($root.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.decode(reader, reader.uint32())); break; } case 4: { - message.schemaType = reader.int32(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.description = reader.string(); + message.returnFullDatapoint = reader.bool(); break; } default: @@ -103519,643 +103885,2460 @@ }; /** - * Decodes a MetadataSchema message from the specified reader or buffer, length delimited. + * Decodes a FindNeighborsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MetadataSchema} MetadataSchema + * @returns {google.cloud.aiplatform.v1.FindNeighborsRequest} FindNeighborsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataSchema.decodeDelimited = function decodeDelimited(reader) { + FindNeighborsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataSchema message. + * Verifies a FindNeighborsRequest message. * @function verify - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataSchema.verify = function verify(message) { + FindNeighborsRequest.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.schemaVersion != null && message.hasOwnProperty("schemaVersion")) - if (!$util.isString(message.schemaVersion)) - return "schemaVersion: string expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.schemaType != null && message.hasOwnProperty("schemaType")) - switch (message.schemaType) { - default: - return "schemaType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + if (message.indexEndpoint != null && message.hasOwnProperty("indexEndpoint")) + if (!$util.isString(message.indexEndpoint)) + return "indexEndpoint: string expected"; + if (message.deployedIndexId != null && message.hasOwnProperty("deployedIndexId")) + if (!$util.isString(message.deployedIndexId)) + return "deployedIndexId: string expected"; + if (message.queries != null && message.hasOwnProperty("queries")) { + if (!Array.isArray(message.queries)) + return "queries: array expected"; + for (var i = 0; i < message.queries.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.verify(message.queries[i]); + if (error) + return "queries." + error; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + if (message.returnFullDatapoint != null && message.hasOwnProperty("returnFullDatapoint")) + if (typeof message.returnFullDatapoint !== "boolean") + return "returnFullDatapoint: boolean expected"; return null; }; /** - * Creates a MetadataSchema message from a plain object. Also converts values to their respective internal types. + * Creates a FindNeighborsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MetadataSchema} MetadataSchema + * @returns {google.cloud.aiplatform.v1.FindNeighborsRequest} FindNeighborsRequest */ - MetadataSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MetadataSchema) + FindNeighborsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FindNeighborsRequest) return object; - var message = new $root.google.cloud.aiplatform.v1.MetadataSchema(); - if (object.name != null) - message.name = String(object.name); - if (object.schemaVersion != null) - message.schemaVersion = String(object.schemaVersion); - if (object.schema != null) - message.schema = String(object.schema); - switch (object.schemaType) { - default: - if (typeof object.schemaType === "number") { - message.schemaType = object.schemaType; - break; + var message = new $root.google.cloud.aiplatform.v1.FindNeighborsRequest(); + if (object.indexEndpoint != null) + message.indexEndpoint = String(object.indexEndpoint); + if (object.deployedIndexId != null) + message.deployedIndexId = String(object.deployedIndexId); + if (object.queries) { + if (!Array.isArray(object.queries)) + throw TypeError(".google.cloud.aiplatform.v1.FindNeighborsRequest.queries: array expected"); + message.queries = []; + for (var i = 0; i < object.queries.length; ++i) { + if (typeof object.queries[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FindNeighborsRequest.queries: object expected"); + message.queries[i] = $root.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.fromObject(object.queries[i]); } - break; - case "METADATA_SCHEMA_TYPE_UNSPECIFIED": - case 0: - message.schemaType = 0; - break; - case "ARTIFACT_TYPE": - case 1: - message.schemaType = 1; - break; - case "EXECUTION_TYPE": - case 2: - message.schemaType = 2; - break; - case "CONTEXT_TYPE": - case 3: - message.schemaType = 3; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MetadataSchema.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.description != null) - message.description = String(object.description); + if (object.returnFullDatapoint != null) + message.returnFullDatapoint = Boolean(object.returnFullDatapoint); return message; }; /** - * Creates a plain object from a MetadataSchema message. Also converts values to other types if specified. + * Creates a plain object from a FindNeighborsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @static - * @param {google.cloud.aiplatform.v1.MetadataSchema} message MetadataSchema + * @param {google.cloud.aiplatform.v1.FindNeighborsRequest} message FindNeighborsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataSchema.toObject = function toObject(message, options) { + FindNeighborsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.queries = []; if (options.defaults) { - object.name = ""; - object.schemaVersion = ""; - object.schema = ""; - object.schemaType = options.enums === String ? "METADATA_SCHEMA_TYPE_UNSPECIFIED" : 0; - object.createTime = null; - object.description = ""; + object.indexEndpoint = ""; + object.deployedIndexId = ""; + object.returnFullDatapoint = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.schemaVersion != null && message.hasOwnProperty("schemaVersion")) - object.schemaVersion = message.schemaVersion; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.schemaType != null && message.hasOwnProperty("schemaType")) - object.schemaType = options.enums === String ? $root.google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType[message.schemaType] === undefined ? message.schemaType : $root.google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType[message.schemaType] : message.schemaType; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.indexEndpoint != null && message.hasOwnProperty("indexEndpoint")) + object.indexEndpoint = message.indexEndpoint; + if (message.deployedIndexId != null && message.hasOwnProperty("deployedIndexId")) + object.deployedIndexId = message.deployedIndexId; + if (message.queries && message.queries.length) { + object.queries = []; + for (var j = 0; j < message.queries.length; ++j) + object.queries[j] = $root.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.toObject(message.queries[j], options); + } + if (message.returnFullDatapoint != null && message.hasOwnProperty("returnFullDatapoint")) + object.returnFullDatapoint = message.returnFullDatapoint; return object; }; /** - * Converts this MetadataSchema to JSON. + * Converts this FindNeighborsRequest to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @instance * @returns {Object.} JSON object */ - MetadataSchema.prototype.toJSON = function toJSON() { + FindNeighborsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataSchema + * Gets the default type url for FindNeighborsRequest * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FindNeighborsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MetadataSchema"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FindNeighborsRequest"; }; - /** - * MetadataSchemaType enum. - * @name google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType - * @enum {number} - * @property {number} METADATA_SCHEMA_TYPE_UNSPECIFIED=0 METADATA_SCHEMA_TYPE_UNSPECIFIED value - * @property {number} ARTIFACT_TYPE=1 ARTIFACT_TYPE value - * @property {number} EXECUTION_TYPE=2 EXECUTION_TYPE value - * @property {number} CONTEXT_TYPE=3 CONTEXT_TYPE value - */ - MetadataSchema.MetadataSchemaType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METADATA_SCHEMA_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ARTIFACT_TYPE"] = 1; - values[valuesById[2] = "EXECUTION_TYPE"] = 2; - values[valuesById[3] = "CONTEXT_TYPE"] = 3; - return values; + FindNeighborsRequest.Query = (function() { + + /** + * Properties of a Query. + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest + * @interface IQuery + * @property {google.cloud.aiplatform.v1.IIndexDatapoint|null} [datapoint] Query datapoint + * @property {number|null} [neighborCount] Query neighborCount + * @property {number|null} [perCrowdingAttributeNeighborCount] Query perCrowdingAttributeNeighborCount + * @property {number|null} [approximateNeighborCount] Query approximateNeighborCount + * @property {number|null} [fractionLeafNodesToSearchOverride] Query fractionLeafNodesToSearchOverride + */ + + /** + * Constructs a new Query. + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest + * @classdesc Represents a Query. + * @implements IQuery + * @constructor + * @param {google.cloud.aiplatform.v1.FindNeighborsRequest.IQuery=} [properties] Properties to set + */ + function Query(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]]; + } + + /** + * Query datapoint. + * @member {google.cloud.aiplatform.v1.IIndexDatapoint|null|undefined} datapoint + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @instance + */ + Query.prototype.datapoint = null; + + /** + * Query neighborCount. + * @member {number} neighborCount + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @instance + */ + Query.prototype.neighborCount = 0; + + /** + * Query perCrowdingAttributeNeighborCount. + * @member {number} perCrowdingAttributeNeighborCount + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @instance + */ + Query.prototype.perCrowdingAttributeNeighborCount = 0; + + /** + * Query approximateNeighborCount. + * @member {number} approximateNeighborCount + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @instance + */ + Query.prototype.approximateNeighborCount = 0; + + /** + * Query fractionLeafNodesToSearchOverride. + * @member {number} fractionLeafNodesToSearchOverride + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @instance + */ + Query.prototype.fractionLeafNodesToSearchOverride = 0; + + /** + * Creates a new Query instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsRequest.IQuery=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FindNeighborsRequest.Query} Query instance + */ + Query.create = function create(properties) { + return new Query(properties); + }; + + /** + * Encodes the specified Query message. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsRequest.Query.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsRequest.IQuery} message Query message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Query.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datapoint != null && Object.hasOwnProperty.call(message, "datapoint")) + $root.google.cloud.aiplatform.v1.IndexDatapoint.encode(message.datapoint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.neighborCount != null && Object.hasOwnProperty.call(message, "neighborCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.neighborCount); + if (message.perCrowdingAttributeNeighborCount != null && Object.hasOwnProperty.call(message, "perCrowdingAttributeNeighborCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.perCrowdingAttributeNeighborCount); + if (message.approximateNeighborCount != null && Object.hasOwnProperty.call(message, "approximateNeighborCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.approximateNeighborCount); + if (message.fractionLeafNodesToSearchOverride != null && Object.hasOwnProperty.call(message, "fractionLeafNodesToSearchOverride")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.fractionLeafNodesToSearchOverride); + return writer; + }; + + /** + * Encodes the specified Query message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsRequest.Query.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsRequest.IQuery} message Query message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Query.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Query message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @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.FindNeighborsRequest.Query} Query + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Query.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.FindNeighborsRequest.Query(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datapoint = $root.google.cloud.aiplatform.v1.IndexDatapoint.decode(reader, reader.uint32()); + break; + } + case 2: { + message.neighborCount = reader.int32(); + break; + } + case 3: { + message.perCrowdingAttributeNeighborCount = reader.int32(); + break; + } + case 4: { + message.approximateNeighborCount = reader.int32(); + break; + } + case 5: { + message.fractionLeafNodesToSearchOverride = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Query message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FindNeighborsRequest.Query} Query + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Query.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Query message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Query.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datapoint != null && message.hasOwnProperty("datapoint")) { + var error = $root.google.cloud.aiplatform.v1.IndexDatapoint.verify(message.datapoint); + if (error) + return "datapoint." + error; + } + if (message.neighborCount != null && message.hasOwnProperty("neighborCount")) + if (!$util.isInteger(message.neighborCount)) + return "neighborCount: integer expected"; + if (message.perCrowdingAttributeNeighborCount != null && message.hasOwnProperty("perCrowdingAttributeNeighborCount")) + if (!$util.isInteger(message.perCrowdingAttributeNeighborCount)) + return "perCrowdingAttributeNeighborCount: integer expected"; + if (message.approximateNeighborCount != null && message.hasOwnProperty("approximateNeighborCount")) + if (!$util.isInteger(message.approximateNeighborCount)) + return "approximateNeighborCount: integer expected"; + if (message.fractionLeafNodesToSearchOverride != null && message.hasOwnProperty("fractionLeafNodesToSearchOverride")) + if (typeof message.fractionLeafNodesToSearchOverride !== "number") + return "fractionLeafNodesToSearchOverride: number expected"; + return null; + }; + + /** + * Creates a Query message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FindNeighborsRequest.Query} Query + */ + Query.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FindNeighborsRequest.Query) + return object; + var message = new $root.google.cloud.aiplatform.v1.FindNeighborsRequest.Query(); + if (object.datapoint != null) { + if (typeof object.datapoint !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FindNeighborsRequest.Query.datapoint: object expected"); + message.datapoint = $root.google.cloud.aiplatform.v1.IndexDatapoint.fromObject(object.datapoint); + } + if (object.neighborCount != null) + message.neighborCount = object.neighborCount | 0; + if (object.perCrowdingAttributeNeighborCount != null) + message.perCrowdingAttributeNeighborCount = object.perCrowdingAttributeNeighborCount | 0; + if (object.approximateNeighborCount != null) + message.approximateNeighborCount = object.approximateNeighborCount | 0; + if (object.fractionLeafNodesToSearchOverride != null) + message.fractionLeafNodesToSearchOverride = Number(object.fractionLeafNodesToSearchOverride); + return message; + }; + + /** + * Creates a plain object from a Query message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsRequest.Query} message Query + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Query.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.datapoint = null; + object.neighborCount = 0; + object.perCrowdingAttributeNeighborCount = 0; + object.approximateNeighborCount = 0; + object.fractionLeafNodesToSearchOverride = 0; + } + if (message.datapoint != null && message.hasOwnProperty("datapoint")) + object.datapoint = $root.google.cloud.aiplatform.v1.IndexDatapoint.toObject(message.datapoint, options); + if (message.neighborCount != null && message.hasOwnProperty("neighborCount")) + object.neighborCount = message.neighborCount; + if (message.perCrowdingAttributeNeighborCount != null && message.hasOwnProperty("perCrowdingAttributeNeighborCount")) + object.perCrowdingAttributeNeighborCount = message.perCrowdingAttributeNeighborCount; + if (message.approximateNeighborCount != null && message.hasOwnProperty("approximateNeighborCount")) + object.approximateNeighborCount = message.approximateNeighborCount; + if (message.fractionLeafNodesToSearchOverride != null && message.hasOwnProperty("fractionLeafNodesToSearchOverride")) + object.fractionLeafNodesToSearchOverride = options.json && !isFinite(message.fractionLeafNodesToSearchOverride) ? String(message.fractionLeafNodesToSearchOverride) : message.fractionLeafNodesToSearchOverride; + return object; + }; + + /** + * Converts this Query to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @instance + * @returns {Object.} JSON object + */ + Query.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Query + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FindNeighborsRequest.Query + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Query.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FindNeighborsRequest.Query"; + }; + + return Query; })(); - return MetadataSchema; + return FindNeighborsRequest; })(); - v1.MetadataService = (function() { + v1.FindNeighborsResponse = (function() { /** - * Constructs a new MetadataService service. + * Properties of a FindNeighborsResponse. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a MetadataService - * @extends $protobuf.rpc.Service + * @interface IFindNeighborsResponse + * @property {Array.|null} [nearestNeighbors] FindNeighborsResponse nearestNeighbors + */ + + /** + * Constructs a new FindNeighborsResponse. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a FindNeighborsResponse. + * @implements IFindNeighborsResponse * @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 + * @param {google.cloud.aiplatform.v1.IFindNeighborsResponse=} [properties] Properties to set */ - function MetadataService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function FindNeighborsResponse(properties) { + this.nearestNeighbors = []; + 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]]; } - (MetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetadataService; + /** + * FindNeighborsResponse nearestNeighbors. + * @member {Array.} nearestNeighbors + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @instance + */ + FindNeighborsResponse.prototype.nearestNeighbors = $util.emptyArray; /** - * Creates new MetadataService service using the specified rpc implementation. + * Creates a new FindNeighborsResponse instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MetadataService + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse * @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 {MetadataService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.aiplatform.v1.IFindNeighborsResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FindNeighborsResponse} FindNeighborsResponse instance */ - MetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + FindNeighborsResponse.create = function create(properties) { + return new FindNeighborsResponse(properties); }; /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|createMetadataStore}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef CreateMetadataStoreCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified FindNeighborsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @static + * @param {google.cloud.aiplatform.v1.IFindNeighborsResponse} message FindNeighborsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + FindNeighborsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nearestNeighbors != null && message.nearestNeighbors.length) + for (var i = 0; i < message.nearestNeighbors.length; ++i) + $root.google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.encode(message.nearestNeighbors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Calls CreateMetadataStore. - * @function createMetadataStore - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.ICreateMetadataStoreRequest} request CreateMetadataStoreRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.CreateMetadataStoreCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified FindNeighborsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @static + * @param {google.cloud.aiplatform.v1.IFindNeighborsResponse} message FindNeighborsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(MetadataService.prototype.createMetadataStore = function createMetadataStore(request, callback) { - return this.rpcCall(createMetadataStore, $root.google.cloud.aiplatform.v1.CreateMetadataStoreRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateMetadataStore" }); + FindNeighborsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateMetadataStore. - * @function createMetadataStore - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.ICreateMetadataStoreRequest} request CreateMetadataStoreRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a FindNeighborsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @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.FindNeighborsResponse} FindNeighborsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + FindNeighborsResponse.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.FindNeighborsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.nearestNeighbors && message.nearestNeighbors.length)) + message.nearestNeighbors = []; + message.nearestNeighbors.push($root.google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|getMetadataStore}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef GetMetadataStoreCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.MetadataStore} [response] MetadataStore + * Decodes a FindNeighborsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FindNeighborsResponse} FindNeighborsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + FindNeighborsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetMetadataStore. - * @function getMetadataStore - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IGetMetadataStoreRequest} request GetMetadataStoreRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.GetMetadataStoreCallback} callback Node-style callback called with the error, if any, and MetadataStore - * @returns {undefined} - * @variation 1 + * Verifies a FindNeighborsResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(MetadataService.prototype.getMetadataStore = function getMetadataStore(request, callback) { - return this.rpcCall(getMetadataStore, $root.google.cloud.aiplatform.v1.GetMetadataStoreRequest, $root.google.cloud.aiplatform.v1.MetadataStore, request, callback); - }, "name", { value: "GetMetadataStore" }); + FindNeighborsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nearestNeighbors != null && message.hasOwnProperty("nearestNeighbors")) { + if (!Array.isArray(message.nearestNeighbors)) + return "nearestNeighbors: array expected"; + for (var i = 0; i < message.nearestNeighbors.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.verify(message.nearestNeighbors[i]); + if (error) + return "nearestNeighbors." + error; + } + } + return null; + }; /** - * Calls GetMetadataStore. - * @function getMetadataStore - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IGetMetadataStoreRequest} request GetMetadataStoreRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|listMetadataStores}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef ListMetadataStoresCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.ListMetadataStoresResponse} [response] ListMetadataStoresResponse + * Creates a FindNeighborsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FindNeighborsResponse} FindNeighborsResponse */ + FindNeighborsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FindNeighborsResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1.FindNeighborsResponse(); + if (object.nearestNeighbors) { + if (!Array.isArray(object.nearestNeighbors)) + throw TypeError(".google.cloud.aiplatform.v1.FindNeighborsResponse.nearestNeighbors: array expected"); + message.nearestNeighbors = []; + for (var i = 0; i < object.nearestNeighbors.length; ++i) { + if (typeof object.nearestNeighbors[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FindNeighborsResponse.nearestNeighbors: object expected"); + message.nearestNeighbors[i] = $root.google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.fromObject(object.nearestNeighbors[i]); + } + } + return message; + }; /** - * Calls ListMetadataStores. - * @function listMetadataStores - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IListMetadataStoresRequest} request ListMetadataStoresRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.ListMetadataStoresCallback} callback Node-style callback called with the error, if any, and ListMetadataStoresResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a FindNeighborsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse} message FindNeighborsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(MetadataService.prototype.listMetadataStores = function listMetadataStores(request, callback) { - return this.rpcCall(listMetadataStores, $root.google.cloud.aiplatform.v1.ListMetadataStoresRequest, $root.google.cloud.aiplatform.v1.ListMetadataStoresResponse, request, callback); - }, "name", { value: "ListMetadataStores" }); + FindNeighborsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nearestNeighbors = []; + if (message.nearestNeighbors && message.nearestNeighbors.length) { + object.nearestNeighbors = []; + for (var j = 0; j < message.nearestNeighbors.length; ++j) + object.nearestNeighbors[j] = $root.google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.toObject(message.nearestNeighbors[j], options); + } + return object; + }; /** - * Calls ListMetadataStores. - * @function listMetadataStores - * @memberof google.cloud.aiplatform.v1.MetadataService + * Converts this FindNeighborsResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse * @instance - * @param {google.cloud.aiplatform.v1.IListMetadataStoresRequest} request ListMetadataStoresRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + FindNeighborsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|deleteMetadataStore}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef DeleteMetadataStoreCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Gets the default type url for FindNeighborsResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + FindNeighborsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FindNeighborsResponse"; + }; + + FindNeighborsResponse.Neighbor = (function() { + + /** + * Properties of a Neighbor. + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @interface INeighbor + * @property {google.cloud.aiplatform.v1.IIndexDatapoint|null} [datapoint] Neighbor datapoint + * @property {number|null} [distance] Neighbor distance + */ + + /** + * Constructs a new Neighbor. + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @classdesc Represents a Neighbor. + * @implements INeighbor + * @constructor + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse.INeighbor=} [properties] Properties to set + */ + function Neighbor(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]]; + } + + /** + * Neighbor datapoint. + * @member {google.cloud.aiplatform.v1.IIndexDatapoint|null|undefined} datapoint + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @instance + */ + Neighbor.prototype.datapoint = null; + + /** + * Neighbor distance. + * @member {number} distance + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @instance + */ + Neighbor.prototype.distance = 0; + + /** + * Creates a new Neighbor instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse.INeighbor=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor} Neighbor instance + */ + Neighbor.create = function create(properties) { + return new Neighbor(properties); + }; + + /** + * Encodes the specified Neighbor message. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse.INeighbor} message Neighbor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Neighbor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datapoint != null && Object.hasOwnProperty.call(message, "datapoint")) + $root.google.cloud.aiplatform.v1.IndexDatapoint.encode(message.datapoint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.distance != null && Object.hasOwnProperty.call(message, "distance")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.distance); + return writer; + }; + + /** + * Encodes the specified Neighbor message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse.INeighbor} message Neighbor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Neighbor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Neighbor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @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.FindNeighborsResponse.Neighbor} Neighbor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Neighbor.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.FindNeighborsResponse.Neighbor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datapoint = $root.google.cloud.aiplatform.v1.IndexDatapoint.decode(reader, reader.uint32()); + break; + } + case 2: { + message.distance = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Neighbor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor} Neighbor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Neighbor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Neighbor message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Neighbor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datapoint != null && message.hasOwnProperty("datapoint")) { + var error = $root.google.cloud.aiplatform.v1.IndexDatapoint.verify(message.datapoint); + if (error) + return "datapoint." + error; + } + if (message.distance != null && message.hasOwnProperty("distance")) + if (typeof message.distance !== "number") + return "distance: number expected"; + return null; + }; + + /** + * Creates a Neighbor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor} Neighbor + */ + Neighbor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor) + return object; + var message = new $root.google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor(); + if (object.datapoint != null) { + if (typeof object.datapoint !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.datapoint: object expected"); + message.datapoint = $root.google.cloud.aiplatform.v1.IndexDatapoint.fromObject(object.datapoint); + } + if (object.distance != null) + message.distance = Number(object.distance); + return message; + }; + + /** + * Creates a plain object from a Neighbor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor} message Neighbor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Neighbor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.datapoint = null; + object.distance = 0; + } + if (message.datapoint != null && message.hasOwnProperty("datapoint")) + object.datapoint = $root.google.cloud.aiplatform.v1.IndexDatapoint.toObject(message.datapoint, options); + if (message.distance != null && message.hasOwnProperty("distance")) + object.distance = options.json && !isFinite(message.distance) ? String(message.distance) : message.distance; + return object; + }; + + /** + * Converts this Neighbor to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @instance + * @returns {Object.} JSON object + */ + Neighbor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Neighbor + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Neighbor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor"; + }; + + return Neighbor; + })(); + + FindNeighborsResponse.NearestNeighbors = (function() { + + /** + * Properties of a NearestNeighbors. + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @interface INearestNeighbors + * @property {string|null} [id] NearestNeighbors id + * @property {Array.|null} [neighbors] NearestNeighbors neighbors + */ + + /** + * Constructs a new NearestNeighbors. + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse + * @classdesc Represents a NearestNeighbors. + * @implements INearestNeighbors + * @constructor + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse.INearestNeighbors=} [properties] Properties to set + */ + function NearestNeighbors(properties) { + this.neighbors = []; + 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]]; + } + + /** + * NearestNeighbors id. + * @member {string} id + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @instance + */ + NearestNeighbors.prototype.id = ""; + + /** + * NearestNeighbors neighbors. + * @member {Array.} neighbors + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @instance + */ + NearestNeighbors.prototype.neighbors = $util.emptyArray; + + /** + * Creates a new NearestNeighbors instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse.INearestNeighbors=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors} NearestNeighbors instance + */ + NearestNeighbors.create = function create(properties) { + return new NearestNeighbors(properties); + }; + + /** + * Encodes the specified NearestNeighbors message. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse.INearestNeighbors} message NearestNeighbors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NearestNeighbors.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.neighbors != null && message.neighbors.length) + for (var i = 0; i < message.neighbors.length; ++i) + $root.google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.encode(message.neighbors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NearestNeighbors message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse.INearestNeighbors} message NearestNeighbors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NearestNeighbors.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NearestNeighbors message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @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.FindNeighborsResponse.NearestNeighbors} NearestNeighbors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NearestNeighbors.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.FindNeighborsResponse.NearestNeighbors(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + if (!(message.neighbors && message.neighbors.length)) + message.neighbors = []; + message.neighbors.push($root.google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NearestNeighbors message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors} NearestNeighbors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NearestNeighbors.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NearestNeighbors message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NearestNeighbors.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.neighbors != null && message.hasOwnProperty("neighbors")) { + if (!Array.isArray(message.neighbors)) + return "neighbors: array expected"; + for (var i = 0; i < message.neighbors.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.verify(message.neighbors[i]); + if (error) + return "neighbors." + error; + } + } + return null; + }; + + /** + * Creates a NearestNeighbors message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors} NearestNeighbors + */ + NearestNeighbors.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors) + return object; + var message = new $root.google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors(); + if (object.id != null) + message.id = String(object.id); + if (object.neighbors) { + if (!Array.isArray(object.neighbors)) + throw TypeError(".google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.neighbors: array expected"); + message.neighbors = []; + for (var i = 0; i < object.neighbors.length; ++i) { + if (typeof object.neighbors[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors.neighbors: object expected"); + message.neighbors[i] = $root.google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.fromObject(object.neighbors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a NearestNeighbors message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors} message NearestNeighbors + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NearestNeighbors.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.neighbors = []; + if (options.defaults) + object.id = ""; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.neighbors && message.neighbors.length) { + object.neighbors = []; + for (var j = 0; j < message.neighbors.length; ++j) + object.neighbors[j] = $root.google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.toObject(message.neighbors[j], options); + } + return object; + }; + + /** + * Converts this NearestNeighbors to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @instance + * @returns {Object.} JSON object + */ + NearestNeighbors.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NearestNeighbors + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NearestNeighbors.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors"; + }; + + return NearestNeighbors; + })(); + + return FindNeighborsResponse; + })(); + + v1.ReadIndexDatapointsRequest = (function() { /** - * Calls DeleteMetadataStore. - * @function deleteMetadataStore - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IDeleteMetadataStoreRequest} request DeleteMetadataStoreRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStoreCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Properties of a ReadIndexDatapointsRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface IReadIndexDatapointsRequest + * @property {string|null} [indexEndpoint] ReadIndexDatapointsRequest indexEndpoint + * @property {string|null} [deployedIndexId] ReadIndexDatapointsRequest deployedIndexId + * @property {Array.|null} [ids] ReadIndexDatapointsRequest ids */ - Object.defineProperty(MetadataService.prototype.deleteMetadataStore = function deleteMetadataStore(request, callback) { - return this.rpcCall(deleteMetadataStore, $root.google.cloud.aiplatform.v1.DeleteMetadataStoreRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteMetadataStore" }); /** - * Calls DeleteMetadataStore. - * @function deleteMetadataStore - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IDeleteMetadataStoreRequest} request DeleteMetadataStoreRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new ReadIndexDatapointsRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a ReadIndexDatapointsRequest. + * @implements IReadIndexDatapointsRequest + * @constructor + * @param {google.cloud.aiplatform.v1.IReadIndexDatapointsRequest=} [properties] Properties to set */ + function ReadIndexDatapointsRequest(properties) { + this.ids = []; + 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]]; + } /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|createArtifact}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef CreateArtifactCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.Artifact} [response] Artifact + * ReadIndexDatapointsRequest indexEndpoint. + * @member {string} indexEndpoint + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest + * @instance */ + ReadIndexDatapointsRequest.prototype.indexEndpoint = ""; /** - * Calls CreateArtifact. - * @function createArtifact - * @memberof google.cloud.aiplatform.v1.MetadataService + * ReadIndexDatapointsRequest deployedIndexId. + * @member {string} deployedIndexId + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest * @instance - * @param {google.cloud.aiplatform.v1.ICreateArtifactRequest} request CreateArtifactRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.CreateArtifactCallback} callback Node-style callback called with the error, if any, and Artifact - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(MetadataService.prototype.createArtifact = function createArtifact(request, callback) { - return this.rpcCall(createArtifact, $root.google.cloud.aiplatform.v1.CreateArtifactRequest, $root.google.cloud.aiplatform.v1.Artifact, request, callback); - }, "name", { value: "CreateArtifact" }); + ReadIndexDatapointsRequest.prototype.deployedIndexId = ""; /** - * Calls CreateArtifact. - * @function createArtifact - * @memberof google.cloud.aiplatform.v1.MetadataService + * ReadIndexDatapointsRequest ids. + * @member {Array.} ids + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest * @instance - * @param {google.cloud.aiplatform.v1.ICreateArtifactRequest} request CreateArtifactRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ReadIndexDatapointsRequest.prototype.ids = $util.emptyArray; /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|getArtifact}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef GetArtifactCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.Artifact} [response] Artifact + * Creates a new ReadIndexDatapointsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest + * @static + * @param {google.cloud.aiplatform.v1.IReadIndexDatapointsRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReadIndexDatapointsRequest} ReadIndexDatapointsRequest instance */ + ReadIndexDatapointsRequest.create = function create(properties) { + return new ReadIndexDatapointsRequest(properties); + }; /** - * Calls GetArtifact. - * @function getArtifact - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IGetArtifactRequest} request GetArtifactRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.GetArtifactCallback} callback Node-style callback called with the error, if any, and Artifact - * @returns {undefined} - * @variation 1 + * Encodes the specified ReadIndexDatapointsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadIndexDatapointsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest + * @static + * @param {google.cloud.aiplatform.v1.IReadIndexDatapointsRequest} message ReadIndexDatapointsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(MetadataService.prototype.getArtifact = function getArtifact(request, callback) { - return this.rpcCall(getArtifact, $root.google.cloud.aiplatform.v1.GetArtifactRequest, $root.google.cloud.aiplatform.v1.Artifact, request, callback); - }, "name", { value: "GetArtifact" }); + ReadIndexDatapointsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.indexEndpoint != null && Object.hasOwnProperty.call(message, "indexEndpoint")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.indexEndpoint); + if (message.deployedIndexId != null && Object.hasOwnProperty.call(message, "deployedIndexId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deployedIndexId); + if (message.ids != null && message.ids.length) + for (var i = 0; i < message.ids.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ids[i]); + return writer; + }; /** - * Calls GetArtifact. - * @function getArtifact - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IGetArtifactRequest} request GetArtifactRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ReadIndexDatapointsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadIndexDatapointsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest + * @static + * @param {google.cloud.aiplatform.v1.IReadIndexDatapointsRequest} message ReadIndexDatapointsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ReadIndexDatapointsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|listArtifacts}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef ListArtifactsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.ListArtifactsResponse} [response] ListArtifactsResponse + * Decodes a ReadIndexDatapointsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest + * @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.ReadIndexDatapointsRequest} ReadIndexDatapointsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ReadIndexDatapointsRequest.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.ReadIndexDatapointsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.indexEndpoint = reader.string(); + break; + } + case 2: { + message.deployedIndexId = reader.string(); + break; + } + case 3: { + if (!(message.ids && message.ids.length)) + message.ids = []; + message.ids.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListArtifacts. - * @function listArtifacts - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IListArtifactsRequest} request ListArtifactsRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.ListArtifactsCallback} callback Node-style callback called with the error, if any, and ListArtifactsResponse - * @returns {undefined} - * @variation 1 + * Decodes a ReadIndexDatapointsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReadIndexDatapointsRequest} ReadIndexDatapointsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(MetadataService.prototype.listArtifacts = function listArtifacts(request, callback) { - return this.rpcCall(listArtifacts, $root.google.cloud.aiplatform.v1.ListArtifactsRequest, $root.google.cloud.aiplatform.v1.ListArtifactsResponse, request, callback); - }, "name", { value: "ListArtifacts" }); + ReadIndexDatapointsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListArtifacts. - * @function listArtifacts - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IListArtifactsRequest} request ListArtifactsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ReadIndexDatapointsRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ReadIndexDatapointsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.indexEndpoint != null && message.hasOwnProperty("indexEndpoint")) + if (!$util.isString(message.indexEndpoint)) + return "indexEndpoint: string expected"; + if (message.deployedIndexId != null && message.hasOwnProperty("deployedIndexId")) + if (!$util.isString(message.deployedIndexId)) + return "deployedIndexId: string expected"; + if (message.ids != null && message.hasOwnProperty("ids")) { + if (!Array.isArray(message.ids)) + return "ids: array expected"; + for (var i = 0; i < message.ids.length; ++i) + if (!$util.isString(message.ids[i])) + return "ids: string[] expected"; + } + return null; + }; /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|updateArtifact}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef UpdateArtifactCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.Artifact} [response] Artifact + * Creates a ReadIndexDatapointsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReadIndexDatapointsRequest} ReadIndexDatapointsRequest */ + ReadIndexDatapointsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest(); + if (object.indexEndpoint != null) + message.indexEndpoint = String(object.indexEndpoint); + if (object.deployedIndexId != null) + message.deployedIndexId = String(object.deployedIndexId); + if (object.ids) { + if (!Array.isArray(object.ids)) + throw TypeError(".google.cloud.aiplatform.v1.ReadIndexDatapointsRequest.ids: array expected"); + message.ids = []; + for (var i = 0; i < object.ids.length; ++i) + message.ids[i] = String(object.ids[i]); + } + return message; + }; /** - * Calls UpdateArtifact. - * @function updateArtifact - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IUpdateArtifactRequest} request UpdateArtifactRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.UpdateArtifactCallback} callback Node-style callback called with the error, if any, and Artifact - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ReadIndexDatapointsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest + * @static + * @param {google.cloud.aiplatform.v1.ReadIndexDatapointsRequest} message ReadIndexDatapointsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(MetadataService.prototype.updateArtifact = function updateArtifact(request, callback) { - return this.rpcCall(updateArtifact, $root.google.cloud.aiplatform.v1.UpdateArtifactRequest, $root.google.cloud.aiplatform.v1.Artifact, request, callback); - }, "name", { value: "UpdateArtifact" }); + ReadIndexDatapointsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.ids = []; + if (options.defaults) { + object.indexEndpoint = ""; + object.deployedIndexId = ""; + } + if (message.indexEndpoint != null && message.hasOwnProperty("indexEndpoint")) + object.indexEndpoint = message.indexEndpoint; + if (message.deployedIndexId != null && message.hasOwnProperty("deployedIndexId")) + object.deployedIndexId = message.deployedIndexId; + if (message.ids && message.ids.length) { + object.ids = []; + for (var j = 0; j < message.ids.length; ++j) + object.ids[j] = message.ids[j]; + } + return object; + }; /** - * Calls UpdateArtifact. - * @function updateArtifact - * @memberof google.cloud.aiplatform.v1.MetadataService + * Converts this ReadIndexDatapointsRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest * @instance - * @param {google.cloud.aiplatform.v1.IUpdateArtifactRequest} request UpdateArtifactRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ReadIndexDatapointsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|deleteArtifact}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef DeleteArtifactCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Gets the default type url for ReadIndexDatapointsRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ReadIndexDatapointsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReadIndexDatapointsRequest"; + }; - /** - * Calls DeleteArtifact. - * @function deleteArtifact - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IDeleteArtifactRequest} request DeleteArtifactRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.DeleteArtifactCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.deleteArtifact = function deleteArtifact(request, callback) { - return this.rpcCall(deleteArtifact, $root.google.cloud.aiplatform.v1.DeleteArtifactRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteArtifact" }); + return ReadIndexDatapointsRequest; + })(); + + v1.ReadIndexDatapointsResponse = (function() { /** - * Calls DeleteArtifact. - * @function deleteArtifact - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IDeleteArtifactRequest} request DeleteArtifactRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a ReadIndexDatapointsResponse. + * @memberof google.cloud.aiplatform.v1 + * @interface IReadIndexDatapointsResponse + * @property {Array.|null} [datapoints] ReadIndexDatapointsResponse datapoints */ /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|purgeArtifacts}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef PurgeArtifactsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Constructs a new ReadIndexDatapointsResponse. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a ReadIndexDatapointsResponse. + * @implements IReadIndexDatapointsResponse + * @constructor + * @param {google.cloud.aiplatform.v1.IReadIndexDatapointsResponse=} [properties] Properties to set */ + function ReadIndexDatapointsResponse(properties) { + this.datapoints = []; + 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]]; + } /** - * Calls PurgeArtifacts. - * @function purgeArtifacts - * @memberof google.cloud.aiplatform.v1.MetadataService + * ReadIndexDatapointsResponse datapoints. + * @member {Array.} datapoints + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse * @instance - * @param {google.cloud.aiplatform.v1.IPurgeArtifactsRequest} request PurgeArtifactsRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.PurgeArtifactsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(MetadataService.prototype.purgeArtifacts = function purgeArtifacts(request, callback) { - return this.rpcCall(purgeArtifacts, $root.google.cloud.aiplatform.v1.PurgeArtifactsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "PurgeArtifacts" }); + ReadIndexDatapointsResponse.prototype.datapoints = $util.emptyArray; /** - * Calls PurgeArtifacts. - * @function purgeArtifacts - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IPurgeArtifactsRequest} request PurgeArtifactsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ReadIndexDatapointsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse + * @static + * @param {google.cloud.aiplatform.v1.IReadIndexDatapointsResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReadIndexDatapointsResponse} ReadIndexDatapointsResponse instance */ + ReadIndexDatapointsResponse.create = function create(properties) { + return new ReadIndexDatapointsResponse(properties); + }; /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|createContext}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef CreateContextCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.Context} [response] Context + * Encodes the specified ReadIndexDatapointsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.ReadIndexDatapointsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse + * @static + * @param {google.cloud.aiplatform.v1.IReadIndexDatapointsResponse} message ReadIndexDatapointsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ReadIndexDatapointsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datapoints != null && message.datapoints.length) + for (var i = 0; i < message.datapoints.length; ++i) + $root.google.cloud.aiplatform.v1.IndexDatapoint.encode(message.datapoints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Calls CreateContext. - * @function createContext - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.ICreateContextRequest} request CreateContextRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.CreateContextCallback} callback Node-style callback called with the error, if any, and Context - * @returns {undefined} - * @variation 1 + * Encodes the specified ReadIndexDatapointsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReadIndexDatapointsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse + * @static + * @param {google.cloud.aiplatform.v1.IReadIndexDatapointsResponse} message ReadIndexDatapointsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(MetadataService.prototype.createContext = function createContext(request, callback) { - return this.rpcCall(createContext, $root.google.cloud.aiplatform.v1.CreateContextRequest, $root.google.cloud.aiplatform.v1.Context, request, callback); - }, "name", { value: "CreateContext" }); + ReadIndexDatapointsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateContext. - * @function createContext - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.ICreateContextRequest} request CreateContextRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ReadIndexDatapointsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse + * @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.ReadIndexDatapointsResponse} ReadIndexDatapointsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ReadIndexDatapointsResponse.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.ReadIndexDatapointsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.datapoints && message.datapoints.length)) + message.datapoints = []; + message.datapoints.push($root.google.cloud.aiplatform.v1.IndexDatapoint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|getContext}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef GetContextCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.Context} [response] Context + * Decodes a ReadIndexDatapointsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReadIndexDatapointsResponse} ReadIndexDatapointsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ReadIndexDatapointsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetContext. - * @function getContext - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IGetContextRequest} request GetContextRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.GetContextCallback} callback Node-style callback called with the error, if any, and Context - * @returns {undefined} - * @variation 1 + * Verifies a ReadIndexDatapointsResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(MetadataService.prototype.getContext = function getContext(request, callback) { - return this.rpcCall(getContext, $root.google.cloud.aiplatform.v1.GetContextRequest, $root.google.cloud.aiplatform.v1.Context, request, callback); - }, "name", { value: "GetContext" }); + ReadIndexDatapointsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datapoints != null && message.hasOwnProperty("datapoints")) { + if (!Array.isArray(message.datapoints)) + return "datapoints: array expected"; + for (var i = 0; i < message.datapoints.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.IndexDatapoint.verify(message.datapoints[i]); + if (error) + return "datapoints." + error; + } + } + return null; + }; /** - * Calls GetContext. - * @function getContext - * @memberof google.cloud.aiplatform.v1.MetadataService - * @instance - * @param {google.cloud.aiplatform.v1.IGetContextRequest} request GetContextRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ReadIndexDatapointsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReadIndexDatapointsResponse} ReadIndexDatapointsResponse */ + ReadIndexDatapointsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReadIndexDatapointsResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReadIndexDatapointsResponse(); + if (object.datapoints) { + if (!Array.isArray(object.datapoints)) + throw TypeError(".google.cloud.aiplatform.v1.ReadIndexDatapointsResponse.datapoints: array expected"); + message.datapoints = []; + for (var i = 0; i < object.datapoints.length; ++i) { + if (typeof object.datapoints[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ReadIndexDatapointsResponse.datapoints: object expected"); + message.datapoints[i] = $root.google.cloud.aiplatform.v1.IndexDatapoint.fromObject(object.datapoints[i]); + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|listContexts}. - * @memberof google.cloud.aiplatform.v1.MetadataService - * @typedef ListContextsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.ListContextsResponse} [response] ListContextsResponse + * Creates a plain object from a ReadIndexDatapointsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse + * @static + * @param {google.cloud.aiplatform.v1.ReadIndexDatapointsResponse} message ReadIndexDatapointsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + ReadIndexDatapointsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.datapoints = []; + if (message.datapoints && message.datapoints.length) { + object.datapoints = []; + for (var j = 0; j < message.datapoints.length; ++j) + object.datapoints[j] = $root.google.cloud.aiplatform.v1.IndexDatapoint.toObject(message.datapoints[j], options); + } + return object; + }; /** - * Calls ListContexts. - * @function listContexts - * @memberof google.cloud.aiplatform.v1.MetadataService + * Converts this ReadIndexDatapointsResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse * @instance - * @param {google.cloud.aiplatform.v1.IListContextsRequest} request ListContextsRequest message or plain object - * @param {google.cloud.aiplatform.v1.MetadataService.ListContextsCallback} callback Node-style callback called with the error, if any, and ListContextsResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object + */ + ReadIndexDatapointsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadIndexDatapointsResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReadIndexDatapointsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadIndexDatapointsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReadIndexDatapointsResponse"; + }; + + return ReadIndexDatapointsResponse; + })(); + + v1.MetadataSchema = (function() { + + /** + * Properties of a MetadataSchema. + * @memberof google.cloud.aiplatform.v1 + * @interface IMetadataSchema + * @property {string|null} [name] MetadataSchema name + * @property {string|null} [schemaVersion] MetadataSchema schemaVersion + * @property {string|null} [schema] MetadataSchema schema + * @property {google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType|null} [schemaType] MetadataSchema schemaType + * @property {google.protobuf.ITimestamp|null} [createTime] MetadataSchema createTime + * @property {string|null} [description] MetadataSchema description + */ + + /** + * Constructs a new MetadataSchema. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a MetadataSchema. + * @implements IMetadataSchema + * @constructor + * @param {google.cloud.aiplatform.v1.IMetadataSchema=} [properties] Properties to set + */ + function MetadataSchema(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]]; + } + + /** + * MetadataSchema name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @instance + */ + MetadataSchema.prototype.name = ""; + + /** + * MetadataSchema schemaVersion. + * @member {string} schemaVersion + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @instance + */ + MetadataSchema.prototype.schemaVersion = ""; + + /** + * MetadataSchema schema. + * @member {string} schema + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @instance + */ + MetadataSchema.prototype.schema = ""; + + /** + * MetadataSchema schemaType. + * @member {google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType} schemaType + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @instance + */ + MetadataSchema.prototype.schemaType = 0; + + /** + * MetadataSchema createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @instance + */ + MetadataSchema.prototype.createTime = null; + + /** + * MetadataSchema description. + * @member {string} description + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @instance + */ + MetadataSchema.prototype.description = ""; + + /** + * Creates a new MetadataSchema instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @static + * @param {google.cloud.aiplatform.v1.IMetadataSchema=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MetadataSchema} MetadataSchema instance + */ + MetadataSchema.create = function create(properties) { + return new MetadataSchema(properties); + }; + + /** + * Encodes the specified MetadataSchema message. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataSchema.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @static + * @param {google.cloud.aiplatform.v1.IMetadataSchema} message MetadataSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataSchema.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.schemaVersion != null && Object.hasOwnProperty.call(message, "schemaVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schemaVersion); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.schema); + if (message.schemaType != null && Object.hasOwnProperty.call(message, "schemaType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.schemaType); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + return writer; + }; + + /** + * Encodes the specified MetadataSchema message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @static + * @param {google.cloud.aiplatform.v1.IMetadataSchema} message MetadataSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataSchema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @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.MetadataSchema} MetadataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataSchema.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.MetadataSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.schemaVersion = reader.string(); + break; + } + case 3: { + message.schema = reader.string(); + break; + } + case 4: { + message.schemaType = reader.int32(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MetadataSchema} MetadataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataSchema message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataSchema.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.schemaVersion != null && message.hasOwnProperty("schemaVersion")) + if (!$util.isString(message.schemaVersion)) + return "schemaVersion: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.schemaType != null && message.hasOwnProperty("schemaType")) + switch (message.schemaType) { + default: + return "schemaType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a MetadataSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MetadataSchema} MetadataSchema + */ + MetadataSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MetadataSchema) + return object; + var message = new $root.google.cloud.aiplatform.v1.MetadataSchema(); + if (object.name != null) + message.name = String(object.name); + if (object.schemaVersion != null) + message.schemaVersion = String(object.schemaVersion); + if (object.schema != null) + message.schema = String(object.schema); + switch (object.schemaType) { + default: + if (typeof object.schemaType === "number") { + message.schemaType = object.schemaType; + break; + } + break; + case "METADATA_SCHEMA_TYPE_UNSPECIFIED": + case 0: + message.schemaType = 0; + break; + case "ARTIFACT_TYPE": + case 1: + message.schemaType = 1; + break; + case "EXECUTION_TYPE": + case 2: + message.schemaType = 2; + break; + case "CONTEXT_TYPE": + case 3: + message.schemaType = 3; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MetadataSchema.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a MetadataSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @static + * @param {google.cloud.aiplatform.v1.MetadataSchema} message MetadataSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataSchema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.schemaVersion = ""; + object.schema = ""; + object.schemaType = options.enums === String ? "METADATA_SCHEMA_TYPE_UNSPECIFIED" : 0; + object.createTime = null; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.schemaVersion != null && message.hasOwnProperty("schemaVersion")) + object.schemaVersion = message.schemaVersion; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.schemaType != null && message.hasOwnProperty("schemaType")) + object.schemaType = options.enums === String ? $root.google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType[message.schemaType] === undefined ? message.schemaType : $root.google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType[message.schemaType] : message.schemaType; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this MetadataSchema to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @instance + * @returns {Object.} JSON object + */ + MetadataSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataSchema + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MetadataSchema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MetadataSchema"; + }; + + /** + * MetadataSchemaType enum. + * @name google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType + * @enum {number} + * @property {number} METADATA_SCHEMA_TYPE_UNSPECIFIED=0 METADATA_SCHEMA_TYPE_UNSPECIFIED value + * @property {number} ARTIFACT_TYPE=1 ARTIFACT_TYPE value + * @property {number} EXECUTION_TYPE=2 EXECUTION_TYPE value + * @property {number} CONTEXT_TYPE=3 CONTEXT_TYPE value + */ + MetadataSchema.MetadataSchemaType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METADATA_SCHEMA_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ARTIFACT_TYPE"] = 1; + values[valuesById[2] = "EXECUTION_TYPE"] = 2; + values[valuesById[3] = "CONTEXT_TYPE"] = 3; + return values; + })(); + + return MetadataSchema; + })(); + + v1.MetadataService = (function() { + + /** + * Constructs a new MetadataService service. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a MetadataService + * @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 MetadataService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetadataService; + + /** + * Creates new MetadataService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.aiplatform.v1.MetadataService + * @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 {MetadataService} RPC service. Useful where requests and/or responses are streamed. + */ + MetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|createMetadataStore}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef CreateMetadataStoreCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateMetadataStore. + * @function createMetadataStore + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.ICreateMetadataStoreRequest} request CreateMetadataStoreRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.CreateMetadataStoreCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.createMetadataStore = function createMetadataStore(request, callback) { + return this.rpcCall(createMetadataStore, $root.google.cloud.aiplatform.v1.CreateMetadataStoreRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateMetadataStore" }); + + /** + * Calls CreateMetadataStore. + * @function createMetadataStore + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.ICreateMetadataStoreRequest} request CreateMetadataStoreRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|getMetadataStore}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef GetMetadataStoreCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.MetadataStore} [response] MetadataStore + */ + + /** + * Calls GetMetadataStore. + * @function getMetadataStore + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IGetMetadataStoreRequest} request GetMetadataStoreRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.GetMetadataStoreCallback} callback Node-style callback called with the error, if any, and MetadataStore + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getMetadataStore = function getMetadataStore(request, callback) { + return this.rpcCall(getMetadataStore, $root.google.cloud.aiplatform.v1.GetMetadataStoreRequest, $root.google.cloud.aiplatform.v1.MetadataStore, request, callback); + }, "name", { value: "GetMetadataStore" }); + + /** + * Calls GetMetadataStore. + * @function getMetadataStore + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IGetMetadataStoreRequest} request GetMetadataStoreRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|listMetadataStores}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef ListMetadataStoresCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.ListMetadataStoresResponse} [response] ListMetadataStoresResponse + */ + + /** + * Calls ListMetadataStores. + * @function listMetadataStores + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IListMetadataStoresRequest} request ListMetadataStoresRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.ListMetadataStoresCallback} callback Node-style callback called with the error, if any, and ListMetadataStoresResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listMetadataStores = function listMetadataStores(request, callback) { + return this.rpcCall(listMetadataStores, $root.google.cloud.aiplatform.v1.ListMetadataStoresRequest, $root.google.cloud.aiplatform.v1.ListMetadataStoresResponse, request, callback); + }, "name", { value: "ListMetadataStores" }); + + /** + * Calls ListMetadataStores. + * @function listMetadataStores + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IListMetadataStoresRequest} request ListMetadataStoresRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|deleteMetadataStore}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef DeleteMetadataStoreCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteMetadataStore. + * @function deleteMetadataStore + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IDeleteMetadataStoreRequest} request DeleteMetadataStoreRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStoreCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.deleteMetadataStore = function deleteMetadataStore(request, callback) { + return this.rpcCall(deleteMetadataStore, $root.google.cloud.aiplatform.v1.DeleteMetadataStoreRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteMetadataStore" }); + + /** + * Calls DeleteMetadataStore. + * @function deleteMetadataStore + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IDeleteMetadataStoreRequest} request DeleteMetadataStoreRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|createArtifact}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef CreateArtifactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.Artifact} [response] Artifact + */ + + /** + * Calls CreateArtifact. + * @function createArtifact + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.ICreateArtifactRequest} request CreateArtifactRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.CreateArtifactCallback} callback Node-style callback called with the error, if any, and Artifact + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.createArtifact = function createArtifact(request, callback) { + return this.rpcCall(createArtifact, $root.google.cloud.aiplatform.v1.CreateArtifactRequest, $root.google.cloud.aiplatform.v1.Artifact, request, callback); + }, "name", { value: "CreateArtifact" }); + + /** + * Calls CreateArtifact. + * @function createArtifact + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.ICreateArtifactRequest} request CreateArtifactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|getArtifact}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef GetArtifactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.Artifact} [response] Artifact + */ + + /** + * Calls GetArtifact. + * @function getArtifact + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IGetArtifactRequest} request GetArtifactRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.GetArtifactCallback} callback Node-style callback called with the error, if any, and Artifact + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getArtifact = function getArtifact(request, callback) { + return this.rpcCall(getArtifact, $root.google.cloud.aiplatform.v1.GetArtifactRequest, $root.google.cloud.aiplatform.v1.Artifact, request, callback); + }, "name", { value: "GetArtifact" }); + + /** + * Calls GetArtifact. + * @function getArtifact + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IGetArtifactRequest} request GetArtifactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|listArtifacts}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef ListArtifactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.ListArtifactsResponse} [response] ListArtifactsResponse + */ + + /** + * Calls ListArtifacts. + * @function listArtifacts + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IListArtifactsRequest} request ListArtifactsRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.ListArtifactsCallback} callback Node-style callback called with the error, if any, and ListArtifactsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listArtifacts = function listArtifacts(request, callback) { + return this.rpcCall(listArtifacts, $root.google.cloud.aiplatform.v1.ListArtifactsRequest, $root.google.cloud.aiplatform.v1.ListArtifactsResponse, request, callback); + }, "name", { value: "ListArtifacts" }); + + /** + * Calls ListArtifacts. + * @function listArtifacts + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IListArtifactsRequest} request ListArtifactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|updateArtifact}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef UpdateArtifactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.Artifact} [response] Artifact + */ + + /** + * Calls UpdateArtifact. + * @function updateArtifact + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IUpdateArtifactRequest} request UpdateArtifactRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.UpdateArtifactCallback} callback Node-style callback called with the error, if any, and Artifact + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.updateArtifact = function updateArtifact(request, callback) { + return this.rpcCall(updateArtifact, $root.google.cloud.aiplatform.v1.UpdateArtifactRequest, $root.google.cloud.aiplatform.v1.Artifact, request, callback); + }, "name", { value: "UpdateArtifact" }); + + /** + * Calls UpdateArtifact. + * @function updateArtifact + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IUpdateArtifactRequest} request UpdateArtifactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|deleteArtifact}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef DeleteArtifactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteArtifact. + * @function deleteArtifact + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IDeleteArtifactRequest} request DeleteArtifactRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.DeleteArtifactCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.deleteArtifact = function deleteArtifact(request, callback) { + return this.rpcCall(deleteArtifact, $root.google.cloud.aiplatform.v1.DeleteArtifactRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteArtifact" }); + + /** + * Calls DeleteArtifact. + * @function deleteArtifact + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IDeleteArtifactRequest} request DeleteArtifactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|purgeArtifacts}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef PurgeArtifactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls PurgeArtifacts. + * @function purgeArtifacts + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IPurgeArtifactsRequest} request PurgeArtifactsRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.PurgeArtifactsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.purgeArtifacts = function purgeArtifacts(request, callback) { + return this.rpcCall(purgeArtifacts, $root.google.cloud.aiplatform.v1.PurgeArtifactsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PurgeArtifacts" }); + + /** + * Calls PurgeArtifacts. + * @function purgeArtifacts + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IPurgeArtifactsRequest} request PurgeArtifactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|createContext}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef CreateContextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.Context} [response] Context + */ + + /** + * Calls CreateContext. + * @function createContext + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.ICreateContextRequest} request CreateContextRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.CreateContextCallback} callback Node-style callback called with the error, if any, and Context + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.createContext = function createContext(request, callback) { + return this.rpcCall(createContext, $root.google.cloud.aiplatform.v1.CreateContextRequest, $root.google.cloud.aiplatform.v1.Context, request, callback); + }, "name", { value: "CreateContext" }); + + /** + * Calls CreateContext. + * @function createContext + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.ICreateContextRequest} request CreateContextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|getContext}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef GetContextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.Context} [response] Context + */ + + /** + * Calls GetContext. + * @function getContext + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IGetContextRequest} request GetContextRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.GetContextCallback} callback Node-style callback called with the error, if any, and Context + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getContext = function getContext(request, callback) { + return this.rpcCall(getContext, $root.google.cloud.aiplatform.v1.GetContextRequest, $root.google.cloud.aiplatform.v1.Context, request, callback); + }, "name", { value: "GetContext" }); + + /** + * Calls GetContext. + * @function getContext + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IGetContextRequest} request GetContextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.MetadataService|listContexts}. + * @memberof google.cloud.aiplatform.v1.MetadataService + * @typedef ListContextsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.ListContextsResponse} [response] ListContextsResponse + */ + + /** + * Calls ListContexts. + * @function listContexts + * @memberof google.cloud.aiplatform.v1.MetadataService + * @instance + * @param {google.cloud.aiplatform.v1.IListContextsRequest} request ListContextsRequest message or plain object + * @param {google.cloud.aiplatform.v1.MetadataService.ListContextsCallback} callback Node-style callback called with the error, if any, and ListContextsResponse + * @returns {undefined} + * @variation 1 */ Object.defineProperty(MetadataService.prototype.listContexts = function listContexts(request, callback) { return this.rpcCall(listContexts, $root.google.cloud.aiplatform.v1.ListContextsRequest, $root.google.cloud.aiplatform.v1.ListContextsResponse, request, callback); @@ -115483,160 +117666,3158 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMetadataSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + GetMetadataSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMetadataSchemaRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest + * @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.GetMetadataSchemaRequest} GetMetadataSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataSchemaRequest.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.GetMetadataSchemaRequest(); + 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 GetMetadataSchemaRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.GetMetadataSchemaRequest} GetMetadataSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMetadataSchemaRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMetadataSchemaRequest.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 GetMetadataSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.GetMetadataSchemaRequest} GetMetadataSchemaRequest + */ + GetMetadataSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.GetMetadataSchemaRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.GetMetadataSchemaRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMetadataSchemaRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest + * @static + * @param {google.cloud.aiplatform.v1.GetMetadataSchemaRequest} message GetMetadataSchemaRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMetadataSchemaRequest.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 GetMetadataSchemaRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest + * @instance + * @returns {Object.} JSON object + */ + GetMetadataSchemaRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMetadataSchemaRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMetadataSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.GetMetadataSchemaRequest"; + }; + + return GetMetadataSchemaRequest; + })(); + + v1.ListMetadataSchemasRequest = (function() { + + /** + * Properties of a ListMetadataSchemasRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface IListMetadataSchemasRequest + * @property {string|null} [parent] ListMetadataSchemasRequest parent + * @property {number|null} [pageSize] ListMetadataSchemasRequest pageSize + * @property {string|null} [pageToken] ListMetadataSchemasRequest pageToken + * @property {string|null} [filter] ListMetadataSchemasRequest filter + */ + + /** + * Constructs a new ListMetadataSchemasRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a ListMetadataSchemasRequest. + * @implements IListMetadataSchemasRequest + * @constructor + * @param {google.cloud.aiplatform.v1.IListMetadataSchemasRequest=} [properties] Properties to set + */ + function ListMetadataSchemasRequest(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]]; + } + + /** + * ListMetadataSchemasRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @instance + */ + ListMetadataSchemasRequest.prototype.parent = ""; + + /** + * ListMetadataSchemasRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @instance + */ + ListMetadataSchemasRequest.prototype.pageSize = 0; + + /** + * ListMetadataSchemasRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @instance + */ + ListMetadataSchemasRequest.prototype.pageToken = ""; + + /** + * ListMetadataSchemasRequest filter. + * @member {string} filter + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @instance + */ + ListMetadataSchemasRequest.prototype.filter = ""; + + /** + * Creates a new ListMetadataSchemasRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @static + * @param {google.cloud.aiplatform.v1.IListMetadataSchemasRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasRequest} ListMetadataSchemasRequest instance + */ + ListMetadataSchemasRequest.create = function create(properties) { + return new ListMetadataSchemasRequest(properties); + }; + + /** + * Encodes the specified ListMetadataSchemasRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.ListMetadataSchemasRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @static + * @param {google.cloud.aiplatform.v1.IListMetadataSchemasRequest} message ListMetadataSchemasRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataSchemasRequest.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 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListMetadataSchemasRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ListMetadataSchemasRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @static + * @param {google.cloud.aiplatform.v1.IListMetadataSchemasRequest} message ListMetadataSchemasRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMetadataSchemasRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @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.ListMetadataSchemasRequest} ListMetadataSchemasRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataSchemasRequest.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.ListMetadataSchemasRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMetadataSchemasRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasRequest} ListMetadataSchemasRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataSchemasRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMetadataSchemasRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMetadataSchemasRequest.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"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListMetadataSchemasRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasRequest} ListMetadataSchemasRequest + */ + ListMetadataSchemasRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ListMetadataSchemasRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.ListMetadataSchemasRequest(); + 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); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListMetadataSchemasRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @static + * @param {google.cloud.aiplatform.v1.ListMetadataSchemasRequest} message ListMetadataSchemasRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMetadataSchemasRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListMetadataSchemasRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @instance + * @returns {Object.} JSON object + */ + ListMetadataSchemasRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMetadataSchemasRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMetadataSchemasRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ListMetadataSchemasRequest"; + }; + + return ListMetadataSchemasRequest; + })(); + + v1.ListMetadataSchemasResponse = (function() { + + /** + * Properties of a ListMetadataSchemasResponse. + * @memberof google.cloud.aiplatform.v1 + * @interface IListMetadataSchemasResponse + * @property {Array.|null} [metadataSchemas] ListMetadataSchemasResponse metadataSchemas + * @property {string|null} [nextPageToken] ListMetadataSchemasResponse nextPageToken + */ + + /** + * Constructs a new ListMetadataSchemasResponse. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a ListMetadataSchemasResponse. + * @implements IListMetadataSchemasResponse + * @constructor + * @param {google.cloud.aiplatform.v1.IListMetadataSchemasResponse=} [properties] Properties to set + */ + function ListMetadataSchemasResponse(properties) { + this.metadataSchemas = []; + 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]]; + } + + /** + * ListMetadataSchemasResponse metadataSchemas. + * @member {Array.} metadataSchemas + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @instance + */ + ListMetadataSchemasResponse.prototype.metadataSchemas = $util.emptyArray; + + /** + * ListMetadataSchemasResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @instance + */ + ListMetadataSchemasResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMetadataSchemasResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @static + * @param {google.cloud.aiplatform.v1.IListMetadataSchemasResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasResponse} ListMetadataSchemasResponse instance + */ + ListMetadataSchemasResponse.create = function create(properties) { + return new ListMetadataSchemasResponse(properties); + }; + + /** + * Encodes the specified ListMetadataSchemasResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.ListMetadataSchemasResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @static + * @param {google.cloud.aiplatform.v1.IListMetadataSchemasResponse} message ListMetadataSchemasResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataSchemasResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadataSchemas != null && message.metadataSchemas.length) + for (var i = 0; i < message.metadataSchemas.length; ++i) + $root.google.cloud.aiplatform.v1.MetadataSchema.encode(message.metadataSchemas[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 ListMetadataSchemasResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ListMetadataSchemasResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @static + * @param {google.cloud.aiplatform.v1.IListMetadataSchemasResponse} message ListMetadataSchemasResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataSchemasResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMetadataSchemasResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @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.ListMetadataSchemasResponse} ListMetadataSchemasResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataSchemasResponse.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.ListMetadataSchemasResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.metadataSchemas && message.metadataSchemas.length)) + message.metadataSchemas = []; + message.metadataSchemas.push($root.google.cloud.aiplatform.v1.MetadataSchema.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMetadataSchemasResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasResponse} ListMetadataSchemasResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataSchemasResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMetadataSchemasResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMetadataSchemasResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadataSchemas != null && message.hasOwnProperty("metadataSchemas")) { + if (!Array.isArray(message.metadataSchemas)) + return "metadataSchemas: array expected"; + for (var i = 0; i < message.metadataSchemas.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.MetadataSchema.verify(message.metadataSchemas[i]); + if (error) + return "metadataSchemas." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMetadataSchemasResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasResponse} ListMetadataSchemasResponse + */ + ListMetadataSchemasResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ListMetadataSchemasResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1.ListMetadataSchemasResponse(); + if (object.metadataSchemas) { + if (!Array.isArray(object.metadataSchemas)) + throw TypeError(".google.cloud.aiplatform.v1.ListMetadataSchemasResponse.metadataSchemas: array expected"); + message.metadataSchemas = []; + for (var i = 0; i < object.metadataSchemas.length; ++i) { + if (typeof object.metadataSchemas[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ListMetadataSchemasResponse.metadataSchemas: object expected"); + message.metadataSchemas[i] = $root.google.cloud.aiplatform.v1.MetadataSchema.fromObject(object.metadataSchemas[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMetadataSchemasResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @static + * @param {google.cloud.aiplatform.v1.ListMetadataSchemasResponse} message ListMetadataSchemasResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMetadataSchemasResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metadataSchemas = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.metadataSchemas && message.metadataSchemas.length) { + object.metadataSchemas = []; + for (var j = 0; j < message.metadataSchemas.length; ++j) + object.metadataSchemas[j] = $root.google.cloud.aiplatform.v1.MetadataSchema.toObject(message.metadataSchemas[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMetadataSchemasResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @instance + * @returns {Object.} JSON object + */ + ListMetadataSchemasResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMetadataSchemasResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMetadataSchemasResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ListMetadataSchemasResponse"; + }; + + return ListMetadataSchemasResponse; + })(); + + v1.QueryArtifactLineageSubgraphRequest = (function() { + + /** + * Properties of a QueryArtifactLineageSubgraphRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface IQueryArtifactLineageSubgraphRequest + * @property {string|null} [artifact] QueryArtifactLineageSubgraphRequest artifact + * @property {number|null} [maxHops] QueryArtifactLineageSubgraphRequest maxHops + * @property {string|null} [filter] QueryArtifactLineageSubgraphRequest filter + */ + + /** + * Constructs a new QueryArtifactLineageSubgraphRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a QueryArtifactLineageSubgraphRequest. + * @implements IQueryArtifactLineageSubgraphRequest + * @constructor + * @param {google.cloud.aiplatform.v1.IQueryArtifactLineageSubgraphRequest=} [properties] Properties to set + */ + function QueryArtifactLineageSubgraphRequest(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]]; + } + + /** + * QueryArtifactLineageSubgraphRequest artifact. + * @member {string} artifact + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @instance + */ + QueryArtifactLineageSubgraphRequest.prototype.artifact = ""; + + /** + * QueryArtifactLineageSubgraphRequest maxHops. + * @member {number} maxHops + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @instance + */ + QueryArtifactLineageSubgraphRequest.prototype.maxHops = 0; + + /** + * QueryArtifactLineageSubgraphRequest filter. + * @member {string} filter + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @instance + */ + QueryArtifactLineageSubgraphRequest.prototype.filter = ""; + + /** + * Creates a new QueryArtifactLineageSubgraphRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @static + * @param {google.cloud.aiplatform.v1.IQueryArtifactLineageSubgraphRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest} QueryArtifactLineageSubgraphRequest instance + */ + QueryArtifactLineageSubgraphRequest.create = function create(properties) { + return new QueryArtifactLineageSubgraphRequest(properties); + }; + + /** + * Encodes the specified QueryArtifactLineageSubgraphRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @static + * @param {google.cloud.aiplatform.v1.IQueryArtifactLineageSubgraphRequest} message QueryArtifactLineageSubgraphRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryArtifactLineageSubgraphRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.artifact != null && Object.hasOwnProperty.call(message, "artifact")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.artifact); + if (message.maxHops != null && Object.hasOwnProperty.call(message, "maxHops")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxHops); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + return writer; + }; + + /** + * Encodes the specified QueryArtifactLineageSubgraphRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @static + * @param {google.cloud.aiplatform.v1.IQueryArtifactLineageSubgraphRequest} message QueryArtifactLineageSubgraphRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryArtifactLineageSubgraphRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryArtifactLineageSubgraphRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @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.QueryArtifactLineageSubgraphRequest} QueryArtifactLineageSubgraphRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryArtifactLineageSubgraphRequest.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.QueryArtifactLineageSubgraphRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.artifact = reader.string(); + break; + } + case 2: { + message.maxHops = reader.int32(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryArtifactLineageSubgraphRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest} QueryArtifactLineageSubgraphRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryArtifactLineageSubgraphRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryArtifactLineageSubgraphRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryArtifactLineageSubgraphRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.artifact != null && message.hasOwnProperty("artifact")) + if (!$util.isString(message.artifact)) + return "artifact: string expected"; + if (message.maxHops != null && message.hasOwnProperty("maxHops")) + if (!$util.isInteger(message.maxHops)) + return "maxHops: integer expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a QueryArtifactLineageSubgraphRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest} QueryArtifactLineageSubgraphRequest + */ + QueryArtifactLineageSubgraphRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest(); + if (object.artifact != null) + message.artifact = String(object.artifact); + if (object.maxHops != null) + message.maxHops = object.maxHops | 0; + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a QueryArtifactLineageSubgraphRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @static + * @param {google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest} message QueryArtifactLineageSubgraphRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryArtifactLineageSubgraphRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.artifact = ""; + object.maxHops = 0; + object.filter = ""; + } + if (message.artifact != null && message.hasOwnProperty("artifact")) + object.artifact = message.artifact; + if (message.maxHops != null && message.hasOwnProperty("maxHops")) + object.maxHops = message.maxHops; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this QueryArtifactLineageSubgraphRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @instance + * @returns {Object.} JSON object + */ + QueryArtifactLineageSubgraphRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryArtifactLineageSubgraphRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryArtifactLineageSubgraphRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest"; + }; + + return QueryArtifactLineageSubgraphRequest; + })(); + + v1.MetadataStore = (function() { + + /** + * Properties of a MetadataStore. + * @memberof google.cloud.aiplatform.v1 + * @interface IMetadataStore + * @property {string|null} [name] MetadataStore name + * @property {google.protobuf.ITimestamp|null} [createTime] MetadataStore createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataStore updateTime + * @property {google.cloud.aiplatform.v1.IEncryptionSpec|null} [encryptionSpec] MetadataStore encryptionSpec + * @property {string|null} [description] MetadataStore description + * @property {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState|null} [state] MetadataStore state + */ + + /** + * Constructs a new MetadataStore. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a MetadataStore. + * @implements IMetadataStore + * @constructor + * @param {google.cloud.aiplatform.v1.IMetadataStore=} [properties] Properties to set + */ + function MetadataStore(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]]; + } + + /** + * MetadataStore name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @instance + */ + MetadataStore.prototype.name = ""; + + /** + * MetadataStore createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @instance + */ + MetadataStore.prototype.createTime = null; + + /** + * MetadataStore updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @instance + */ + MetadataStore.prototype.updateTime = null; + + /** + * MetadataStore encryptionSpec. + * @member {google.cloud.aiplatform.v1.IEncryptionSpec|null|undefined} encryptionSpec + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @instance + */ + MetadataStore.prototype.encryptionSpec = null; + + /** + * MetadataStore description. + * @member {string} description + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @instance + */ + MetadataStore.prototype.description = ""; + + /** + * MetadataStore state. + * @member {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState|null|undefined} state + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @instance + */ + MetadataStore.prototype.state = null; + + /** + * Creates a new MetadataStore instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @static + * @param {google.cloud.aiplatform.v1.IMetadataStore=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MetadataStore} MetadataStore instance + */ + MetadataStore.create = function create(properties) { + return new MetadataStore(properties); + }; + + /** + * Encodes the specified MetadataStore message. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataStore.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @static + * @param {google.cloud.aiplatform.v1.IMetadataStore} message MetadataStore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataStore.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.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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) + $root.google.cloud.aiplatform.v1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.encode(message.state, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetadataStore message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataStore.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @static + * @param {google.cloud.aiplatform.v1.IMetadataStore} message MetadataStore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataStore.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataStore message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @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.MetadataStore} MetadataStore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataStore.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.MetadataStore(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.decode(reader, reader.uint32()); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + message.state = $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataStore message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MetadataStore} MetadataStore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataStore.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataStore message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataStore.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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) { + var error = $root.google.cloud.aiplatform.v1.EncryptionSpec.verify(message.encryptionSpec); + if (error) + return "encryptionSpec." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.verify(message.state); + if (error) + return "state." + error; + } + return null; + }; + + /** + * Creates a MetadataStore message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MetadataStore} MetadataStore + */ + MetadataStore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MetadataStore) + return object; + var message = new $root.google.cloud.aiplatform.v1.MetadataStore(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MetadataStore.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MetadataStore.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.encryptionSpec != null) { + if (typeof object.encryptionSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MetadataStore.encryptionSpec: object expected"); + message.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.fromObject(object.encryptionSpec); + } + if (object.description != null) + message.description = String(object.description); + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MetadataStore.state: object expected"); + message.state = $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.fromObject(object.state); + } + return message; + }; + + /** + * Creates a plain object from a MetadataStore message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @static + * @param {google.cloud.aiplatform.v1.MetadataStore} message MetadataStore + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataStore.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.encryptionSpec = null; + object.description = ""; + object.state = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + 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")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.toObject(message.state, options); + return object; + }; + + /** + * Converts this MetadataStore to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @instance + * @returns {Object.} JSON object + */ + MetadataStore.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataStore + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataStore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MetadataStore"; + }; + + MetadataStore.MetadataStoreState = (function() { + + /** + * Properties of a MetadataStoreState. + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @interface IMetadataStoreState + * @property {number|Long|null} [diskUtilizationBytes] MetadataStoreState diskUtilizationBytes + */ + + /** + * Constructs a new MetadataStoreState. + * @memberof google.cloud.aiplatform.v1.MetadataStore + * @classdesc Represents a MetadataStoreState. + * @implements IMetadataStoreState + * @constructor + * @param {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState=} [properties] Properties to set + */ + function MetadataStoreState(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]]; + } + + /** + * MetadataStoreState diskUtilizationBytes. + * @member {number|Long} diskUtilizationBytes + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @instance + */ + MetadataStoreState.prototype.diskUtilizationBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new MetadataStoreState instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @static + * @param {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState} MetadataStoreState instance + */ + MetadataStoreState.create = function create(properties) { + return new MetadataStoreState(properties); + }; + + /** + * Encodes the specified MetadataStoreState message. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @static + * @param {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState} message MetadataStoreState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataStoreState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.diskUtilizationBytes != null && Object.hasOwnProperty.call(message, "diskUtilizationBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.diskUtilizationBytes); + return writer; + }; + + /** + * Encodes the specified MetadataStoreState message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @static + * @param {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState} message MetadataStoreState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataStoreState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataStoreState message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @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.MetadataStore.MetadataStoreState} MetadataStoreState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataStoreState.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.MetadataStore.MetadataStoreState(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.diskUtilizationBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataStoreState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState} MetadataStoreState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataStoreState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataStoreState message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataStoreState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.diskUtilizationBytes != null && message.hasOwnProperty("diskUtilizationBytes")) + if (!$util.isInteger(message.diskUtilizationBytes) && !(message.diskUtilizationBytes && $util.isInteger(message.diskUtilizationBytes.low) && $util.isInteger(message.diskUtilizationBytes.high))) + return "diskUtilizationBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a MetadataStoreState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState} MetadataStoreState + */ + MetadataStoreState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState) + return object; + var message = new $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState(); + if (object.diskUtilizationBytes != null) + if ($util.Long) + (message.diskUtilizationBytes = $util.Long.fromValue(object.diskUtilizationBytes)).unsigned = false; + else if (typeof object.diskUtilizationBytes === "string") + message.diskUtilizationBytes = parseInt(object.diskUtilizationBytes, 10); + else if (typeof object.diskUtilizationBytes === "number") + message.diskUtilizationBytes = object.diskUtilizationBytes; + else if (typeof object.diskUtilizationBytes === "object") + message.diskUtilizationBytes = new $util.LongBits(object.diskUtilizationBytes.low >>> 0, object.diskUtilizationBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a MetadataStoreState message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @static + * @param {google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState} message MetadataStoreState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataStoreState.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.diskUtilizationBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.diskUtilizationBytes = options.longs === String ? "0" : 0; + if (message.diskUtilizationBytes != null && message.hasOwnProperty("diskUtilizationBytes")) + if (typeof message.diskUtilizationBytes === "number") + object.diskUtilizationBytes = options.longs === String ? String(message.diskUtilizationBytes) : message.diskUtilizationBytes; + else + object.diskUtilizationBytes = options.longs === String ? $util.Long.prototype.toString.call(message.diskUtilizationBytes) : options.longs === Number ? new $util.LongBits(message.diskUtilizationBytes.low >>> 0, message.diskUtilizationBytes.high >>> 0).toNumber() : message.diskUtilizationBytes; + return object; + }; + + /** + * Converts this MetadataStoreState to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @instance + * @returns {Object.} JSON object + */ + MetadataStoreState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataStoreState + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataStoreState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState"; + }; + + return MetadataStoreState; + })(); + + return MetadataStore; + })(); + + v1.MigratableResource = (function() { + + /** + * Properties of a MigratableResource. + * @memberof google.cloud.aiplatform.v1 + * @interface IMigratableResource + * @property {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion|null} [mlEngineModelVersion] MigratableResource mlEngineModelVersion + * @property {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel|null} [automlModel] MigratableResource automlModel + * @property {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset|null} [automlDataset] MigratableResource automlDataset + * @property {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset|null} [dataLabelingDataset] MigratableResource dataLabelingDataset + * @property {google.protobuf.ITimestamp|null} [lastMigrateTime] MigratableResource lastMigrateTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigratableResource lastUpdateTime + */ + + /** + * Constructs a new MigratableResource. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a MigratableResource. + * @implements IMigratableResource + * @constructor + * @param {google.cloud.aiplatform.v1.IMigratableResource=} [properties] Properties to set + */ + function MigratableResource(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]]; + } + + /** + * MigratableResource mlEngineModelVersion. + * @member {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion|null|undefined} mlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @instance + */ + MigratableResource.prototype.mlEngineModelVersion = null; + + /** + * MigratableResource automlModel. + * @member {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel|null|undefined} automlModel + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @instance + */ + MigratableResource.prototype.automlModel = null; + + /** + * MigratableResource automlDataset. + * @member {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset|null|undefined} automlDataset + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @instance + */ + MigratableResource.prototype.automlDataset = null; + + /** + * MigratableResource dataLabelingDataset. + * @member {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset|null|undefined} dataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @instance + */ + MigratableResource.prototype.dataLabelingDataset = null; + + /** + * MigratableResource lastMigrateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastMigrateTime + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @instance + */ + MigratableResource.prototype.lastMigrateTime = null; + + /** + * MigratableResource lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @instance + */ + MigratableResource.prototype.lastUpdateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MigratableResource resource. + * @member {"mlEngineModelVersion"|"automlModel"|"automlDataset"|"dataLabelingDataset"|undefined} resource + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @instance + */ + Object.defineProperty(MigratableResource.prototype, "resource", { + get: $util.oneOfGetter($oneOfFields = ["mlEngineModelVersion", "automlModel", "automlDataset", "dataLabelingDataset"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MigratableResource instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @static + * @param {google.cloud.aiplatform.v1.IMigratableResource=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigratableResource} MigratableResource instance + */ + MigratableResource.create = function create(properties) { + return new MigratableResource(properties); + }; + + /** + * Encodes the specified MigratableResource message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @static + * @param {google.cloud.aiplatform.v1.IMigratableResource} message MigratableResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigratableResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mlEngineModelVersion != null && Object.hasOwnProperty.call(message, "mlEngineModelVersion")) + $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.encode(message.mlEngineModelVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.automlModel != null && Object.hasOwnProperty.call(message, "automlModel")) + $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.encode(message.automlModel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.automlDataset != null && Object.hasOwnProperty.call(message, "automlDataset")) + $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.encode(message.automlDataset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dataLabelingDataset != null && Object.hasOwnProperty.call(message, "dataLabelingDataset")) + $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.encode(message.dataLabelingDataset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastMigrateTime != null && Object.hasOwnProperty.call(message, "lastMigrateTime")) + $root.google.protobuf.Timestamp.encode(message.lastMigrateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MigratableResource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @static + * @param {google.cloud.aiplatform.v1.IMigratableResource} message MigratableResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigratableResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigratableResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @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.MigratableResource} MigratableResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigratableResource.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.MigratableResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mlEngineModelVersion = $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.decode(reader, reader.uint32()); + break; + } + case 2: { + message.automlModel = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.decode(reader, reader.uint32()); + break; + } + case 3: { + message.automlDataset = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.decode(reader, reader.uint32()); + break; + } + case 4: { + message.dataLabelingDataset = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lastMigrateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigratableResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MigratableResource} MigratableResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigratableResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigratableResource message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigratableResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mlEngineModelVersion != null && message.hasOwnProperty("mlEngineModelVersion")) { + properties.resource = 1; + { + var error = $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.verify(message.mlEngineModelVersion); + if (error) + return "mlEngineModelVersion." + error; + } + } + if (message.automlModel != null && message.hasOwnProperty("automlModel")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.verify(message.automlModel); + if (error) + return "automlModel." + error; + } + } + if (message.automlDataset != null && message.hasOwnProperty("automlDataset")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.verify(message.automlDataset); + if (error) + return "automlDataset." + error; + } + } + if (message.dataLabelingDataset != null && message.hasOwnProperty("dataLabelingDataset")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.verify(message.dataLabelingDataset); + if (error) + return "dataLabelingDataset." + error; + } + } + if (message.lastMigrateTime != null && message.hasOwnProperty("lastMigrateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastMigrateTime); + if (error) + return "lastMigrateTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + return null; + }; + + /** + * Creates a MigratableResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MigratableResource} MigratableResource + */ + MigratableResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource) + return object; + var message = new $root.google.cloud.aiplatform.v1.MigratableResource(); + if (object.mlEngineModelVersion != null) { + if (typeof object.mlEngineModelVersion !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.mlEngineModelVersion: object expected"); + message.mlEngineModelVersion = $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.fromObject(object.mlEngineModelVersion); + } + if (object.automlModel != null) { + if (typeof object.automlModel !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.automlModel: object expected"); + message.automlModel = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.fromObject(object.automlModel); + } + if (object.automlDataset != null) { + if (typeof object.automlDataset !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.automlDataset: object expected"); + message.automlDataset = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.fromObject(object.automlDataset); + } + if (object.dataLabelingDataset != null) { + if (typeof object.dataLabelingDataset !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.dataLabelingDataset: object expected"); + message.dataLabelingDataset = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.fromObject(object.dataLabelingDataset); + } + if (object.lastMigrateTime != null) { + if (typeof object.lastMigrateTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.lastMigrateTime: object expected"); + message.lastMigrateTime = $root.google.protobuf.Timestamp.fromObject(object.lastMigrateTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a MigratableResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource} message MigratableResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigratableResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lastMigrateTime = null; + object.lastUpdateTime = null; + } + if (message.mlEngineModelVersion != null && message.hasOwnProperty("mlEngineModelVersion")) { + object.mlEngineModelVersion = $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.toObject(message.mlEngineModelVersion, options); + if (options.oneofs) + object.resource = "mlEngineModelVersion"; + } + if (message.automlModel != null && message.hasOwnProperty("automlModel")) { + object.automlModel = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.toObject(message.automlModel, options); + if (options.oneofs) + object.resource = "automlModel"; + } + if (message.automlDataset != null && message.hasOwnProperty("automlDataset")) { + object.automlDataset = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.toObject(message.automlDataset, options); + if (options.oneofs) + object.resource = "automlDataset"; + } + if (message.dataLabelingDataset != null && message.hasOwnProperty("dataLabelingDataset")) { + object.dataLabelingDataset = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.toObject(message.dataLabelingDataset, options); + if (options.oneofs) + object.resource = "dataLabelingDataset"; + } + if (message.lastMigrateTime != null && message.hasOwnProperty("lastMigrateTime")) + object.lastMigrateTime = $root.google.protobuf.Timestamp.toObject(message.lastMigrateTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + return object; + }; + + /** + * Converts this MigratableResource to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @instance + * @returns {Object.} JSON object + */ + MigratableResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigratableResource + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigratableResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource"; + }; + + MigratableResource.MlEngineModelVersion = (function() { + + /** + * Properties of a MlEngineModelVersion. + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @interface IMlEngineModelVersion + * @property {string|null} [endpoint] MlEngineModelVersion endpoint + * @property {string|null} [version] MlEngineModelVersion version + */ + + /** + * Constructs a new MlEngineModelVersion. + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @classdesc Represents a MlEngineModelVersion. + * @implements IMlEngineModelVersion + * @constructor + * @param {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion=} [properties] Properties to set + */ + function MlEngineModelVersion(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]]; + } + + /** + * MlEngineModelVersion endpoint. + * @member {string} endpoint + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @instance + */ + MlEngineModelVersion.prototype.endpoint = ""; + + /** + * MlEngineModelVersion version. + * @member {string} version + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @instance + */ + MlEngineModelVersion.prototype.version = ""; + + /** + * Creates a new MlEngineModelVersion instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion} MlEngineModelVersion instance + */ + MlEngineModelVersion.create = function create(properties) { + return new MlEngineModelVersion(properties); + }; + + /** + * Encodes the specified MlEngineModelVersion message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion} message MlEngineModelVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MlEngineModelVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.endpoint); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + return writer; + }; + + /** + * Encodes the specified MlEngineModelVersion message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion} message MlEngineModelVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MlEngineModelVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MlEngineModelVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @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.MigratableResource.MlEngineModelVersion} MlEngineModelVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MlEngineModelVersion.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.MigratableResource.MlEngineModelVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.endpoint = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MlEngineModelVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion} MlEngineModelVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MlEngineModelVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MlEngineModelVersion message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MlEngineModelVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a MlEngineModelVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion} MlEngineModelVersion + */ + MlEngineModelVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) + return object; + var message = new $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion(); + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a MlEngineModelVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion} message MlEngineModelVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MlEngineModelVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.endpoint = ""; + object.version = ""; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this MlEngineModelVersion to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @instance + * @returns {Object.} JSON object + */ + MlEngineModelVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MlEngineModelVersion + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MlEngineModelVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion"; + }; + + return MlEngineModelVersion; + })(); + + MigratableResource.AutomlModel = (function() { + + /** + * Properties of an AutomlModel. + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @interface IAutomlModel + * @property {string|null} [model] AutomlModel model + * @property {string|null} [modelDisplayName] AutomlModel modelDisplayName + */ + + /** + * Constructs a new AutomlModel. + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @classdesc Represents an AutomlModel. + * @implements IAutomlModel + * @constructor + * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel=} [properties] Properties to set + */ + function AutomlModel(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]]; + } + + /** + * AutomlModel model. + * @member {string} model + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @instance + */ + AutomlModel.prototype.model = ""; + + /** + * AutomlModel modelDisplayName. + * @member {string} modelDisplayName + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @instance + */ + AutomlModel.prototype.modelDisplayName = ""; + + /** + * Creates a new AutomlModel instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlModel} AutomlModel instance + */ + AutomlModel.create = function create(properties) { + return new AutomlModel(properties); + }; + + /** + * Encodes the specified AutomlModel message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.AutomlModel.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel} message AutomlModel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomlModel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.modelDisplayName != null && Object.hasOwnProperty.call(message, "modelDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.modelDisplayName); + return writer; + }; + + /** + * Encodes the specified AutomlModel message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.AutomlModel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel} message AutomlModel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomlModel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutomlModel message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @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.MigratableResource.AutomlModel} AutomlModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomlModel.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.MigratableResource.AutomlModel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.model = reader.string(); + break; + } + case 3: { + message.modelDisplayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutomlModel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlModel} AutomlModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomlModel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutomlModel message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutomlModel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) + if (!$util.isString(message.modelDisplayName)) + return "modelDisplayName: string expected"; + return null; + }; + + /** + * Creates an AutomlModel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlModel} AutomlModel + */ + AutomlModel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) + return object; + var message = new $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel(); + if (object.model != null) + message.model = String(object.model); + if (object.modelDisplayName != null) + message.modelDisplayName = String(object.modelDisplayName); + return message; + }; + + /** + * Creates a plain object from an AutomlModel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.AutomlModel} message AutomlModel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutomlModel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.model = ""; + object.modelDisplayName = ""; + } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) + object.modelDisplayName = message.modelDisplayName; + return object; + }; + + /** + * Converts this AutomlModel to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @instance + * @returns {Object.} JSON object + */ + AutomlModel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutomlModel + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutomlModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource.AutomlModel"; + }; + + return AutomlModel; + })(); + + MigratableResource.AutomlDataset = (function() { + + /** + * Properties of an AutomlDataset. + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @interface IAutomlDataset + * @property {string|null} [dataset] AutomlDataset dataset + * @property {string|null} [datasetDisplayName] AutomlDataset datasetDisplayName + */ + + /** + * Constructs a new AutomlDataset. + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @classdesc Represents an AutomlDataset. + * @implements IAutomlDataset + * @constructor + * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset=} [properties] Properties to set + */ + function AutomlDataset(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]]; + } + + /** + * AutomlDataset dataset. + * @member {string} dataset + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @instance + */ + AutomlDataset.prototype.dataset = ""; + + /** + * AutomlDataset datasetDisplayName. + * @member {string} datasetDisplayName + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @instance + */ + AutomlDataset.prototype.datasetDisplayName = ""; + + /** + * Creates a new AutomlDataset instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlDataset} AutomlDataset instance + */ + AutomlDataset.create = function create(properties) { + return new AutomlDataset(properties); + }; + + /** + * Encodes the specified AutomlDataset message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset} message AutomlDataset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomlDataset.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); + if (message.datasetDisplayName != null && Object.hasOwnProperty.call(message, "datasetDisplayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.datasetDisplayName); + return writer; + }; + + /** + * Encodes the specified AutomlDataset message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset} message AutomlDataset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomlDataset.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutomlDataset message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @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.MigratableResource.AutomlDataset} AutomlDataset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomlDataset.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.MigratableResource.AutomlDataset(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataset = reader.string(); + break; + } + case 4: { + message.datasetDisplayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutomlDataset message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlDataset} AutomlDataset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomlDataset.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutomlDataset message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutomlDataset.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataset != null && message.hasOwnProperty("dataset")) + if (!$util.isString(message.dataset)) + return "dataset: string expected"; + if (message.datasetDisplayName != null && message.hasOwnProperty("datasetDisplayName")) + if (!$util.isString(message.datasetDisplayName)) + return "datasetDisplayName: string expected"; + return null; + }; + + /** + * Creates an AutomlDataset message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlDataset} AutomlDataset + */ + AutomlDataset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) + return object; + var message = new $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset(); + if (object.dataset != null) + message.dataset = String(object.dataset); + if (object.datasetDisplayName != null) + message.datasetDisplayName = String(object.datasetDisplayName); + return message; + }; + + /** + * Creates a plain object from an AutomlDataset message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.AutomlDataset} message AutomlDataset + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutomlDataset.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataset = ""; + object.datasetDisplayName = ""; + } + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = message.dataset; + if (message.datasetDisplayName != null && message.hasOwnProperty("datasetDisplayName")) + object.datasetDisplayName = message.datasetDisplayName; + return object; + }; + + /** + * Converts this AutomlDataset to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @instance + * @returns {Object.} JSON object + */ + AutomlDataset.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutomlDataset + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutomlDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource.AutomlDataset"; + }; + + return AutomlDataset; + })(); + + MigratableResource.DataLabelingDataset = (function() { + + /** + * Properties of a DataLabelingDataset. + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @interface IDataLabelingDataset + * @property {string|null} [dataset] DataLabelingDataset dataset + * @property {string|null} [datasetDisplayName] DataLabelingDataset datasetDisplayName + * @property {Array.|null} [dataLabelingAnnotatedDatasets] DataLabelingDataset dataLabelingAnnotatedDatasets + */ + + /** + * Constructs a new DataLabelingDataset. + * @memberof google.cloud.aiplatform.v1.MigratableResource + * @classdesc Represents a DataLabelingDataset. + * @implements IDataLabelingDataset + * @constructor + * @param {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset=} [properties] Properties to set + */ + function DataLabelingDataset(properties) { + this.dataLabelingAnnotatedDatasets = []; + 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]]; + } + + /** + * DataLabelingDataset dataset. + * @member {string} dataset + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @instance + */ + DataLabelingDataset.prototype.dataset = ""; + + /** + * DataLabelingDataset datasetDisplayName. + * @member {string} datasetDisplayName + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @instance + */ + DataLabelingDataset.prototype.datasetDisplayName = ""; + + /** + * DataLabelingDataset dataLabelingAnnotatedDatasets. + * @member {Array.} dataLabelingAnnotatedDatasets + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @instance + */ + DataLabelingDataset.prototype.dataLabelingAnnotatedDatasets = $util.emptyArray; + + /** + * Creates a new DataLabelingDataset instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset} DataLabelingDataset instance + */ + DataLabelingDataset.create = function create(properties) { + return new DataLabelingDataset(properties); + }; + + /** + * Encodes the specified DataLabelingDataset message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset} message DataLabelingDataset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataLabelingDataset.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); + if (message.dataLabelingAnnotatedDatasets != null && message.dataLabelingAnnotatedDatasets.length) + for (var i = 0; i < message.dataLabelingAnnotatedDatasets.length; ++i) + $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.encode(message.dataLabelingAnnotatedDatasets[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.datasetDisplayName != null && Object.hasOwnProperty.call(message, "datasetDisplayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.datasetDisplayName); + return writer; + }; + + /** + * Encodes the specified DataLabelingDataset message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset} message DataLabelingDataset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataLabelingDataset.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataLabelingDataset message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @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.MigratableResource.DataLabelingDataset} DataLabelingDataset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataLabelingDataset.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.MigratableResource.DataLabelingDataset(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataset = reader.string(); + break; + } + case 4: { + message.datasetDisplayName = reader.string(); + break; + } + case 3: { + if (!(message.dataLabelingAnnotatedDatasets && message.dataLabelingAnnotatedDatasets.length)) + message.dataLabelingAnnotatedDatasets = []; + message.dataLabelingAnnotatedDatasets.push($root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataLabelingDataset message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset} DataLabelingDataset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataLabelingDataset.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataLabelingDataset message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataLabelingDataset.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataset != null && message.hasOwnProperty("dataset")) + if (!$util.isString(message.dataset)) + return "dataset: string expected"; + if (message.datasetDisplayName != null && message.hasOwnProperty("datasetDisplayName")) + if (!$util.isString(message.datasetDisplayName)) + return "datasetDisplayName: string expected"; + if (message.dataLabelingAnnotatedDatasets != null && message.hasOwnProperty("dataLabelingAnnotatedDatasets")) { + if (!Array.isArray(message.dataLabelingAnnotatedDatasets)) + return "dataLabelingAnnotatedDatasets: array expected"; + for (var i = 0; i < message.dataLabelingAnnotatedDatasets.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.verify(message.dataLabelingAnnotatedDatasets[i]); + if (error) + return "dataLabelingAnnotatedDatasets." + error; + } + } + return null; + }; + + /** + * Creates a DataLabelingDataset message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset} DataLabelingDataset + */ + DataLabelingDataset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) + return object; + var message = new $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset(); + if (object.dataset != null) + message.dataset = String(object.dataset); + if (object.datasetDisplayName != null) + message.datasetDisplayName = String(object.datasetDisplayName); + if (object.dataLabelingAnnotatedDatasets) { + if (!Array.isArray(object.dataLabelingAnnotatedDatasets)) + throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.dataLabelingAnnotatedDatasets: array expected"); + message.dataLabelingAnnotatedDatasets = []; + for (var i = 0; i < object.dataLabelingAnnotatedDatasets.length; ++i) { + if (typeof object.dataLabelingAnnotatedDatasets[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.dataLabelingAnnotatedDatasets: object expected"); + message.dataLabelingAnnotatedDatasets[i] = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.fromObject(object.dataLabelingAnnotatedDatasets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataLabelingDataset message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset} message DataLabelingDataset + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataLabelingDataset.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataLabelingAnnotatedDatasets = []; + if (options.defaults) { + object.dataset = ""; + object.datasetDisplayName = ""; + } + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = message.dataset; + if (message.dataLabelingAnnotatedDatasets && message.dataLabelingAnnotatedDatasets.length) { + object.dataLabelingAnnotatedDatasets = []; + for (var j = 0; j < message.dataLabelingAnnotatedDatasets.length; ++j) + object.dataLabelingAnnotatedDatasets[j] = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.toObject(message.dataLabelingAnnotatedDatasets[j], options); + } + if (message.datasetDisplayName != null && message.hasOwnProperty("datasetDisplayName")) + object.datasetDisplayName = message.datasetDisplayName; + return object; + }; + + /** + * Converts this DataLabelingDataset to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @instance + * @returns {Object.} JSON object + */ + DataLabelingDataset.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataLabelingDataset + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataLabelingDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset"; + }; + + DataLabelingDataset.DataLabelingAnnotatedDataset = (function() { + + /** + * Properties of a DataLabelingAnnotatedDataset. + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @interface IDataLabelingAnnotatedDataset + * @property {string|null} [annotatedDataset] DataLabelingAnnotatedDataset annotatedDataset + * @property {string|null} [annotatedDatasetDisplayName] DataLabelingAnnotatedDataset annotatedDatasetDisplayName + */ + + /** + * Constructs a new DataLabelingAnnotatedDataset. + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @classdesc Represents a DataLabelingAnnotatedDataset. + * @implements IDataLabelingAnnotatedDataset + * @constructor + * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.IDataLabelingAnnotatedDataset=} [properties] Properties to set + */ + function DataLabelingAnnotatedDataset(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]]; + } + + /** + * DataLabelingAnnotatedDataset annotatedDataset. + * @member {string} annotatedDataset + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @instance + */ + DataLabelingAnnotatedDataset.prototype.annotatedDataset = ""; + + /** + * DataLabelingAnnotatedDataset annotatedDatasetDisplayName. + * @member {string} annotatedDatasetDisplayName + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @instance + */ + DataLabelingAnnotatedDataset.prototype.annotatedDatasetDisplayName = ""; + + /** + * Creates a new DataLabelingAnnotatedDataset instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.IDataLabelingAnnotatedDataset=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} DataLabelingAnnotatedDataset instance + */ + DataLabelingAnnotatedDataset.create = function create(properties) { + return new DataLabelingAnnotatedDataset(properties); + }; + + /** + * Encodes the specified DataLabelingAnnotatedDataset message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.IDataLabelingAnnotatedDataset} message DataLabelingAnnotatedDataset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataLabelingAnnotatedDataset.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotatedDataset != null && Object.hasOwnProperty.call(message, "annotatedDataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotatedDataset); + if (message.annotatedDatasetDisplayName != null && Object.hasOwnProperty.call(message, "annotatedDatasetDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.annotatedDatasetDisplayName); + return writer; + }; + + /** + * Encodes the specified DataLabelingAnnotatedDataset message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.IDataLabelingAnnotatedDataset} message DataLabelingAnnotatedDataset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataLabelingAnnotatedDataset.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataLabelingAnnotatedDataset message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @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.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} DataLabelingAnnotatedDataset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataLabelingAnnotatedDataset.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.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.annotatedDataset = reader.string(); + break; + } + case 3: { + message.annotatedDatasetDisplayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataLabelingAnnotatedDataset message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} DataLabelingAnnotatedDataset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataLabelingAnnotatedDataset.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataLabelingAnnotatedDataset message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataLabelingAnnotatedDataset.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotatedDataset != null && message.hasOwnProperty("annotatedDataset")) + if (!$util.isString(message.annotatedDataset)) + return "annotatedDataset: string expected"; + if (message.annotatedDatasetDisplayName != null && message.hasOwnProperty("annotatedDatasetDisplayName")) + if (!$util.isString(message.annotatedDatasetDisplayName)) + return "annotatedDatasetDisplayName: string expected"; + return null; + }; + + /** + * Creates a DataLabelingAnnotatedDataset message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} DataLabelingAnnotatedDataset + */ + DataLabelingAnnotatedDataset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset) + return object; + var message = new $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset(); + if (object.annotatedDataset != null) + message.annotatedDataset = String(object.annotatedDataset); + if (object.annotatedDatasetDisplayName != null) + message.annotatedDatasetDisplayName = String(object.annotatedDatasetDisplayName); + return message; + }; + + /** + * Creates a plain object from a DataLabelingAnnotatedDataset message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @static + * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} message DataLabelingAnnotatedDataset + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataLabelingAnnotatedDataset.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.annotatedDataset = ""; + object.annotatedDatasetDisplayName = ""; + } + if (message.annotatedDataset != null && message.hasOwnProperty("annotatedDataset")) + object.annotatedDataset = message.annotatedDataset; + if (message.annotatedDatasetDisplayName != null && message.hasOwnProperty("annotatedDatasetDisplayName")) + object.annotatedDatasetDisplayName = message.annotatedDatasetDisplayName; + return object; + }; + + /** + * Converts this DataLabelingAnnotatedDataset to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @instance + * @returns {Object.} JSON object + */ + DataLabelingAnnotatedDataset.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataLabelingAnnotatedDataset + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataLabelingAnnotatedDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset"; + }; + + return DataLabelingAnnotatedDataset; + })(); + + return DataLabelingDataset; + })(); + + return MigratableResource; + })(); + + v1.MigrationService = (function() { + + /** + * Constructs a new MigrationService service. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a MigrationService + * @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 MigrationService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MigrationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MigrationService; /** - * Decodes a GetMetadataSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest + * Creates new MigrationService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.aiplatform.v1.MigrationService * @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.GetMetadataSchemaRequest} GetMetadataSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * @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 {MigrationService} RPC service. Useful where requests and/or responses are streamed. */ - GetMetadataSchemaRequest.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.GetMetadataSchemaRequest(); - 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; + MigrationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Decodes a GetMetadataSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.GetMetadataSchemaRequest} GetMetadataSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.aiplatform.v1.MigrationService|searchMigratableResources}. + * @memberof google.cloud.aiplatform.v1.MigrationService + * @typedef SearchMigratableResourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} [response] SearchMigratableResourcesResponse */ - GetMetadataSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GetMetadataSchemaRequest message. - * @function verify - * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls SearchMigratableResources. + * @function searchMigratableResources + * @memberof google.cloud.aiplatform.v1.MigrationService + * @instance + * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest} request SearchMigratableResourcesRequest message or plain object + * @param {google.cloud.aiplatform.v1.MigrationService.SearchMigratableResourcesCallback} callback Node-style callback called with the error, if any, and SearchMigratableResourcesResponse + * @returns {undefined} + * @variation 1 */ - GetMetadataSchemaRequest.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; - }; + Object.defineProperty(MigrationService.prototype.searchMigratableResources = function searchMigratableResources(request, callback) { + return this.rpcCall(searchMigratableResources, $root.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest, $root.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse, request, callback); + }, "name", { value: "SearchMigratableResources" }); /** - * Creates a GetMetadataSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.GetMetadataSchemaRequest} GetMetadataSchemaRequest + * Calls SearchMigratableResources. + * @function searchMigratableResources + * @memberof google.cloud.aiplatform.v1.MigrationService + * @instance + * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest} request SearchMigratableResourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetadataSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.GetMetadataSchemaRequest) - return object; - var message = new $root.google.cloud.aiplatform.v1.GetMetadataSchemaRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetMetadataSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest - * @static - * @param {google.cloud.aiplatform.v1.GetMetadataSchemaRequest} message GetMetadataSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.aiplatform.v1.MigrationService|batchMigrateResources}. + * @memberof google.cloud.aiplatform.v1.MigrationService + * @typedef BatchMigrateResourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - GetMetadataSchemaRequest.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 GetMetadataSchemaRequest to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest + * Calls BatchMigrateResources. + * @function batchMigrateResources + * @memberof google.cloud.aiplatform.v1.MigrationService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest} request BatchMigrateResourcesRequest message or plain object + * @param {google.cloud.aiplatform.v1.MigrationService.BatchMigrateResourcesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - GetMetadataSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(MigrationService.prototype.batchMigrateResources = function batchMigrateResources(request, callback) { + return this.rpcCall(batchMigrateResources, $root.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchMigrateResources" }); /** - * Gets the default type url for GetMetadataSchemaRequest - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.GetMetadataSchemaRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls BatchMigrateResources. + * @function batchMigrateResources + * @memberof google.cloud.aiplatform.v1.MigrationService + * @instance + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest} request BatchMigrateResourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetadataSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.GetMetadataSchemaRequest"; - }; - return GetMetadataSchemaRequest; + return MigrationService; })(); - v1.ListMetadataSchemasRequest = (function() { + v1.SearchMigratableResourcesRequest = (function() { /** - * Properties of a ListMetadataSchemasRequest. + * Properties of a SearchMigratableResourcesRequest. * @memberof google.cloud.aiplatform.v1 - * @interface IListMetadataSchemasRequest - * @property {string|null} [parent] ListMetadataSchemasRequest parent - * @property {number|null} [pageSize] ListMetadataSchemasRequest pageSize - * @property {string|null} [pageToken] ListMetadataSchemasRequest pageToken - * @property {string|null} [filter] ListMetadataSchemasRequest filter + * @interface ISearchMigratableResourcesRequest + * @property {string|null} [parent] SearchMigratableResourcesRequest parent + * @property {number|null} [pageSize] SearchMigratableResourcesRequest pageSize + * @property {string|null} [pageToken] SearchMigratableResourcesRequest pageToken + * @property {string|null} [filter] SearchMigratableResourcesRequest filter */ /** - * Constructs a new ListMetadataSchemasRequest. + * Constructs a new SearchMigratableResourcesRequest. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a ListMetadataSchemasRequest. - * @implements IListMetadataSchemasRequest + * @classdesc Represents a SearchMigratableResourcesRequest. + * @implements ISearchMigratableResourcesRequest * @constructor - * @param {google.cloud.aiplatform.v1.IListMetadataSchemasRequest=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest=} [properties] Properties to set */ - function ListMetadataSchemasRequest(properties) { + function SearchMigratableResourcesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -115644,59 +120825,59 @@ } /** - * ListMetadataSchemasRequest parent. + * SearchMigratableResourcesRequest parent. * @member {string} parent - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @instance */ - ListMetadataSchemasRequest.prototype.parent = ""; + SearchMigratableResourcesRequest.prototype.parent = ""; /** - * ListMetadataSchemasRequest pageSize. + * SearchMigratableResourcesRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @instance */ - ListMetadataSchemasRequest.prototype.pageSize = 0; + SearchMigratableResourcesRequest.prototype.pageSize = 0; /** - * ListMetadataSchemasRequest pageToken. + * SearchMigratableResourcesRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @instance */ - ListMetadataSchemasRequest.prototype.pageToken = ""; + SearchMigratableResourcesRequest.prototype.pageToken = ""; /** - * ListMetadataSchemasRequest filter. + * SearchMigratableResourcesRequest filter. * @member {string} filter - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @instance */ - ListMetadataSchemasRequest.prototype.filter = ""; + SearchMigratableResourcesRequest.prototype.filter = ""; /** - * Creates a new ListMetadataSchemasRequest instance using the specified properties. + * Creates a new SearchMigratableResourcesRequest instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @static - * @param {google.cloud.aiplatform.v1.IListMetadataSchemasRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasRequest} ListMetadataSchemasRequest instance + * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} SearchMigratableResourcesRequest instance */ - ListMetadataSchemasRequest.create = function create(properties) { - return new ListMetadataSchemasRequest(properties); + SearchMigratableResourcesRequest.create = function create(properties) { + return new SearchMigratableResourcesRequest(properties); }; /** - * Encodes the specified ListMetadataSchemasRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.ListMetadataSchemasRequest.verify|verify} messages. + * Encodes the specified SearchMigratableResourcesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @static - * @param {google.cloud.aiplatform.v1.IListMetadataSchemasRequest} message ListMetadataSchemasRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest} message SearchMigratableResourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataSchemasRequest.encode = function encode(message, writer) { + SearchMigratableResourcesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -115711,33 +120892,33 @@ }; /** - * Encodes the specified ListMetadataSchemasRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ListMetadataSchemasRequest.verify|verify} messages. + * Encodes the specified SearchMigratableResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @static - * @param {google.cloud.aiplatform.v1.IListMetadataSchemasRequest} message ListMetadataSchemasRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest} message SearchMigratableResourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { + SearchMigratableResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMetadataSchemasRequest message from the specified reader or buffer. + * Decodes a SearchMigratableResourcesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @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.ListMetadataSchemasRequest} ListMetadataSchemasRequest + * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} SearchMigratableResourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataSchemasRequest.decode = function decode(reader, length) { + SearchMigratableResourcesRequest.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.ListMetadataSchemasRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -115766,30 +120947,30 @@ }; /** - * Decodes a ListMetadataSchemasRequest message from the specified reader or buffer, length delimited. + * Decodes a SearchMigratableResourcesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasRequest} ListMetadataSchemasRequest + * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} SearchMigratableResourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataSchemasRequest.decodeDelimited = function decodeDelimited(reader) { + SearchMigratableResourcesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMetadataSchemasRequest message. + * Verifies a SearchMigratableResourcesRequest message. * @function verify - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMetadataSchemasRequest.verify = function verify(message) { + SearchMigratableResourcesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -115808,17 +120989,17 @@ }; /** - * Creates a ListMetadataSchemasRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SearchMigratableResourcesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasRequest} ListMetadataSchemasRequest + * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} SearchMigratableResourcesRequest */ - ListMetadataSchemasRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ListMetadataSchemasRequest) + SearchMigratableResourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest) return object; - var message = new $root.google.cloud.aiplatform.v1.ListMetadataSchemasRequest(); + var message = new $root.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -115831,15 +121012,15 @@ }; /** - * Creates a plain object from a ListMetadataSchemasRequest message. Also converts values to other types if specified. + * Creates a plain object from a SearchMigratableResourcesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @static - * @param {google.cloud.aiplatform.v1.ListMetadataSchemasRequest} message ListMetadataSchemasRequest + * @param {google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} message SearchMigratableResourcesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMetadataSchemasRequest.toObject = function toObject(message, options) { + SearchMigratableResourcesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -115861,54 +121042,54 @@ }; /** - * Converts this ListMetadataSchemasRequest to JSON. + * Converts this SearchMigratableResourcesRequest to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @instance * @returns {Object.} JSON object */ - ListMetadataSchemasRequest.prototype.toJSON = function toJSON() { + SearchMigratableResourcesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMetadataSchemasRequest + * Gets the default type url for SearchMigratableResourcesRequest * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasRequest + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMetadataSchemasRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchMigratableResourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ListMetadataSchemasRequest"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.SearchMigratableResourcesRequest"; }; - return ListMetadataSchemasRequest; + return SearchMigratableResourcesRequest; })(); - v1.ListMetadataSchemasResponse = (function() { + v1.SearchMigratableResourcesResponse = (function() { /** - * Properties of a ListMetadataSchemasResponse. + * Properties of a SearchMigratableResourcesResponse. * @memberof google.cloud.aiplatform.v1 - * @interface IListMetadataSchemasResponse - * @property {Array.|null} [metadataSchemas] ListMetadataSchemasResponse metadataSchemas - * @property {string|null} [nextPageToken] ListMetadataSchemasResponse nextPageToken + * @interface ISearchMigratableResourcesResponse + * @property {Array.|null} [migratableResources] SearchMigratableResourcesResponse migratableResources + * @property {string|null} [nextPageToken] SearchMigratableResourcesResponse nextPageToken */ /** - * Constructs a new ListMetadataSchemasResponse. + * Constructs a new SearchMigratableResourcesResponse. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a ListMetadataSchemasResponse. - * @implements IListMetadataSchemasResponse + * @classdesc Represents a SearchMigratableResourcesResponse. + * @implements ISearchMigratableResourcesResponse * @constructor - * @param {google.cloud.aiplatform.v1.IListMetadataSchemasResponse=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesResponse=} [properties] Properties to set */ - function ListMetadataSchemasResponse(properties) { - this.metadataSchemas = []; + function SearchMigratableResourcesResponse(properties) { + this.migratableResources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -115916,88 +121097,88 @@ } /** - * ListMetadataSchemasResponse metadataSchemas. - * @member {Array.} metadataSchemas - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * SearchMigratableResourcesResponse migratableResources. + * @member {Array.} migratableResources + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @instance */ - ListMetadataSchemasResponse.prototype.metadataSchemas = $util.emptyArray; + SearchMigratableResourcesResponse.prototype.migratableResources = $util.emptyArray; /** - * ListMetadataSchemasResponse nextPageToken. + * SearchMigratableResourcesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @instance */ - ListMetadataSchemasResponse.prototype.nextPageToken = ""; + SearchMigratableResourcesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListMetadataSchemasResponse instance using the specified properties. + * Creates a new SearchMigratableResourcesResponse instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @static - * @param {google.cloud.aiplatform.v1.IListMetadataSchemasResponse=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasResponse} ListMetadataSchemasResponse instance + * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} SearchMigratableResourcesResponse instance */ - ListMetadataSchemasResponse.create = function create(properties) { - return new ListMetadataSchemasResponse(properties); + SearchMigratableResourcesResponse.create = function create(properties) { + return new SearchMigratableResourcesResponse(properties); }; /** - * Encodes the specified ListMetadataSchemasResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.ListMetadataSchemasResponse.verify|verify} messages. + * Encodes the specified SearchMigratableResourcesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @static - * @param {google.cloud.aiplatform.v1.IListMetadataSchemasResponse} message ListMetadataSchemasResponse message or plain object to encode + * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesResponse} message SearchMigratableResourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataSchemasResponse.encode = function encode(message, writer) { + SearchMigratableResourcesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadataSchemas != null && message.metadataSchemas.length) - for (var i = 0; i < message.metadataSchemas.length; ++i) - $root.google.cloud.aiplatform.v1.MetadataSchema.encode(message.metadataSchemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.migratableResources != null && message.migratableResources.length) + for (var i = 0; i < message.migratableResources.length; ++i) + $root.google.cloud.aiplatform.v1.MigratableResource.encode(message.migratableResources[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 ListMetadataSchemasResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ListMetadataSchemasResponse.verify|verify} messages. + * Encodes the specified SearchMigratableResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @static - * @param {google.cloud.aiplatform.v1.IListMetadataSchemasResponse} message ListMetadataSchemasResponse message or plain object to encode + * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesResponse} message SearchMigratableResourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataSchemasResponse.encodeDelimited = function encodeDelimited(message, writer) { + SearchMigratableResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMetadataSchemasResponse message from the specified reader or buffer. + * Decodes a SearchMigratableResourcesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @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.ListMetadataSchemasResponse} ListMetadataSchemasResponse + * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} SearchMigratableResourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataSchemasResponse.decode = function decode(reader, length) { + SearchMigratableResourcesResponse.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.ListMetadataSchemasResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.metadataSchemas && message.metadataSchemas.length)) - message.metadataSchemas = []; - message.metadataSchemas.push($root.google.cloud.aiplatform.v1.MetadataSchema.decode(reader, reader.uint32())); + if (!(message.migratableResources && message.migratableResources.length)) + message.migratableResources = []; + message.migratableResources.push($root.google.cloud.aiplatform.v1.MigratableResource.decode(reader, reader.uint32())); break; } case 2: { @@ -116013,39 +121194,39 @@ }; /** - * Decodes a ListMetadataSchemasResponse message from the specified reader or buffer, length delimited. + * Decodes a SearchMigratableResourcesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasResponse} ListMetadataSchemasResponse + * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} SearchMigratableResourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataSchemasResponse.decodeDelimited = function decodeDelimited(reader) { + SearchMigratableResourcesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMetadataSchemasResponse message. + * Verifies a SearchMigratableResourcesResponse message. * @function verify - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMetadataSchemasResponse.verify = function verify(message) { + SearchMigratableResourcesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadataSchemas != null && message.hasOwnProperty("metadataSchemas")) { - if (!Array.isArray(message.metadataSchemas)) - return "metadataSchemas: array expected"; - for (var i = 0; i < message.metadataSchemas.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.MetadataSchema.verify(message.metadataSchemas[i]); + if (message.migratableResources != null && message.hasOwnProperty("migratableResources")) { + if (!Array.isArray(message.migratableResources)) + return "migratableResources: array expected"; + for (var i = 0; i < message.migratableResources.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.MigratableResource.verify(message.migratableResources[i]); if (error) - return "metadataSchemas." + error; + return "migratableResources." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -116055,25 +121236,25 @@ }; /** - * Creates a ListMetadataSchemasResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SearchMigratableResourcesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ListMetadataSchemasResponse} ListMetadataSchemasResponse + * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} SearchMigratableResourcesResponse */ - ListMetadataSchemasResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ListMetadataSchemasResponse) + SearchMigratableResourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse) return object; - var message = new $root.google.cloud.aiplatform.v1.ListMetadataSchemasResponse(); - if (object.metadataSchemas) { - if (!Array.isArray(object.metadataSchemas)) - throw TypeError(".google.cloud.aiplatform.v1.ListMetadataSchemasResponse.metadataSchemas: array expected"); - message.metadataSchemas = []; - for (var i = 0; i < object.metadataSchemas.length; ++i) { - if (typeof object.metadataSchemas[i] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ListMetadataSchemasResponse.metadataSchemas: object expected"); - message.metadataSchemas[i] = $root.google.cloud.aiplatform.v1.MetadataSchema.fromObject(object.metadataSchemas[i]); + var message = new $root.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse(); + if (object.migratableResources) { + if (!Array.isArray(object.migratableResources)) + throw TypeError(".google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.migratableResources: array expected"); + message.migratableResources = []; + for (var i = 0; i < object.migratableResources.length; ++i) { + if (typeof object.migratableResources[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.migratableResources: object expected"); + message.migratableResources[i] = $root.google.cloud.aiplatform.v1.MigratableResource.fromObject(object.migratableResources[i]); } } if (object.nextPageToken != null) @@ -116082,26 +121263,26 @@ }; /** - * Creates a plain object from a ListMetadataSchemasResponse message. Also converts values to other types if specified. + * Creates a plain object from a SearchMigratableResourcesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @static - * @param {google.cloud.aiplatform.v1.ListMetadataSchemasResponse} message ListMetadataSchemasResponse + * @param {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} message SearchMigratableResourcesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMetadataSchemasResponse.toObject = function toObject(message, options) { + SearchMigratableResourcesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.metadataSchemas = []; + object.migratableResources = []; if (options.defaults) object.nextPageToken = ""; - if (message.metadataSchemas && message.metadataSchemas.length) { - object.metadataSchemas = []; - for (var j = 0; j < message.metadataSchemas.length; ++j) - object.metadataSchemas[j] = $root.google.cloud.aiplatform.v1.MetadataSchema.toObject(message.metadataSchemas[j], options); + if (message.migratableResources && message.migratableResources.length) { + object.migratableResources = []; + for (var j = 0; j < message.migratableResources.length; ++j) + object.migratableResources[j] = $root.google.cloud.aiplatform.v1.MigratableResource.toObject(message.migratableResources[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -116109,54 +121290,54 @@ }; /** - * Converts this ListMetadataSchemasResponse to JSON. + * Converts this SearchMigratableResourcesResponse to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @instance * @returns {Object.} JSON object */ - ListMetadataSchemasResponse.prototype.toJSON = function toJSON() { + SearchMigratableResourcesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMetadataSchemasResponse + * Gets the default type url for SearchMigratableResourcesResponse * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ListMetadataSchemasResponse + * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMetadataSchemasResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchMigratableResourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ListMetadataSchemasResponse"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.SearchMigratableResourcesResponse"; }; - return ListMetadataSchemasResponse; + return SearchMigratableResourcesResponse; })(); - v1.QueryArtifactLineageSubgraphRequest = (function() { + v1.BatchMigrateResourcesRequest = (function() { /** - * Properties of a QueryArtifactLineageSubgraphRequest. + * Properties of a BatchMigrateResourcesRequest. * @memberof google.cloud.aiplatform.v1 - * @interface IQueryArtifactLineageSubgraphRequest - * @property {string|null} [artifact] QueryArtifactLineageSubgraphRequest artifact - * @property {number|null} [maxHops] QueryArtifactLineageSubgraphRequest maxHops - * @property {string|null} [filter] QueryArtifactLineageSubgraphRequest filter + * @interface IBatchMigrateResourcesRequest + * @property {string|null} [parent] BatchMigrateResourcesRequest parent + * @property {Array.|null} [migrateResourceRequests] BatchMigrateResourcesRequest migrateResourceRequests */ /** - * Constructs a new QueryArtifactLineageSubgraphRequest. + * Constructs a new BatchMigrateResourcesRequest. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a QueryArtifactLineageSubgraphRequest. - * @implements IQueryArtifactLineageSubgraphRequest + * @classdesc Represents a BatchMigrateResourcesRequest. + * @implements IBatchMigrateResourcesRequest * @constructor - * @param {google.cloud.aiplatform.v1.IQueryArtifactLineageSubgraphRequest=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest=} [properties] Properties to set */ - function QueryArtifactLineageSubgraphRequest(properties) { + function BatchMigrateResourcesRequest(properties) { + this.migrateResourceRequests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116164,103 +121345,92 @@ } /** - * QueryArtifactLineageSubgraphRequest artifact. - * @member {string} artifact - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest - * @instance - */ - QueryArtifactLineageSubgraphRequest.prototype.artifact = ""; - - /** - * QueryArtifactLineageSubgraphRequest maxHops. - * @member {number} maxHops - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * BatchMigrateResourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @instance */ - QueryArtifactLineageSubgraphRequest.prototype.maxHops = 0; + BatchMigrateResourcesRequest.prototype.parent = ""; /** - * QueryArtifactLineageSubgraphRequest filter. - * @member {string} filter - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * BatchMigrateResourcesRequest migrateResourceRequests. + * @member {Array.} migrateResourceRequests + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @instance */ - QueryArtifactLineageSubgraphRequest.prototype.filter = ""; + BatchMigrateResourcesRequest.prototype.migrateResourceRequests = $util.emptyArray; /** - * Creates a new QueryArtifactLineageSubgraphRequest instance using the specified properties. + * Creates a new BatchMigrateResourcesRequest instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @static - * @param {google.cloud.aiplatform.v1.IQueryArtifactLineageSubgraphRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest} QueryArtifactLineageSubgraphRequest instance + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} BatchMigrateResourcesRequest instance */ - QueryArtifactLineageSubgraphRequest.create = function create(properties) { - return new QueryArtifactLineageSubgraphRequest(properties); + BatchMigrateResourcesRequest.create = function create(properties) { + return new BatchMigrateResourcesRequest(properties); }; /** - * Encodes the specified QueryArtifactLineageSubgraphRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest.verify|verify} messages. + * Encodes the specified BatchMigrateResourcesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @static - * @param {google.cloud.aiplatform.v1.IQueryArtifactLineageSubgraphRequest} message QueryArtifactLineageSubgraphRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest} message BatchMigrateResourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryArtifactLineageSubgraphRequest.encode = function encode(message, writer) { + BatchMigrateResourcesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.artifact != null && Object.hasOwnProperty.call(message, "artifact")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.artifact); - if (message.maxHops != null && Object.hasOwnProperty.call(message, "maxHops")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxHops); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.migrateResourceRequests != null && message.migrateResourceRequests.length) + for (var i = 0; i < message.migrateResourceRequests.length; ++i) + $root.google.cloud.aiplatform.v1.MigrateResourceRequest.encode(message.migrateResourceRequests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified QueryArtifactLineageSubgraphRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest.verify|verify} messages. + * Encodes the specified BatchMigrateResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @static - * @param {google.cloud.aiplatform.v1.IQueryArtifactLineageSubgraphRequest} message QueryArtifactLineageSubgraphRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest} message BatchMigrateResourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryArtifactLineageSubgraphRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchMigrateResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryArtifactLineageSubgraphRequest message from the specified reader or buffer. + * Decodes a BatchMigrateResourcesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @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.QueryArtifactLineageSubgraphRequest} QueryArtifactLineageSubgraphRequest + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} BatchMigrateResourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryArtifactLineageSubgraphRequest.decode = function decode(reader, length) { + BatchMigrateResourcesRequest.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.QueryArtifactLineageSubgraphRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.artifact = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.maxHops = reader.int32(); - break; - } - case 3: { - message.filter = reader.string(); + if (!(message.migrateResourceRequests && message.migrateResourceRequests.length)) + message.migrateResourceRequests = []; + message.migrateResourceRequests.push($root.google.cloud.aiplatform.v1.MigrateResourceRequest.decode(reader, reader.uint32())); break; } default: @@ -116272,700 +121442,151 @@ }; /** - * Decodes a QueryArtifactLineageSubgraphRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchMigrateResourcesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest} QueryArtifactLineageSubgraphRequest + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} BatchMigrateResourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryArtifactLineageSubgraphRequest.decodeDelimited = function decodeDelimited(reader) { + BatchMigrateResourcesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryArtifactLineageSubgraphRequest message. + * Verifies a BatchMigrateResourcesRequest message. * @function verify - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryArtifactLineageSubgraphRequest.verify = function verify(message) { + BatchMigrateResourcesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.artifact != null && message.hasOwnProperty("artifact")) - if (!$util.isString(message.artifact)) - return "artifact: string expected"; - if (message.maxHops != null && message.hasOwnProperty("maxHops")) - if (!$util.isInteger(message.maxHops)) - return "maxHops: integer expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a QueryArtifactLineageSubgraphRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest} QueryArtifactLineageSubgraphRequest - */ - QueryArtifactLineageSubgraphRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest) - return object; - var message = new $root.google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest(); - if (object.artifact != null) - message.artifact = String(object.artifact); - if (object.maxHops != null) - message.maxHops = object.maxHops | 0; - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a QueryArtifactLineageSubgraphRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest - * @static - * @param {google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest} message QueryArtifactLineageSubgraphRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArtifactLineageSubgraphRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.artifact = ""; - object.maxHops = 0; - object.filter = ""; - } - if (message.artifact != null && message.hasOwnProperty("artifact")) - object.artifact = message.artifact; - if (message.maxHops != null && message.hasOwnProperty("maxHops")) - object.maxHops = message.maxHops; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this QueryArtifactLineageSubgraphRequest to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest - * @instance - * @returns {Object.} JSON object - */ - QueryArtifactLineageSubgraphRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueryArtifactLineageSubgraphRequest - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryArtifactLineageSubgraphRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest"; - }; - - return QueryArtifactLineageSubgraphRequest; - })(); - - v1.MetadataStore = (function() { - - /** - * Properties of a MetadataStore. - * @memberof google.cloud.aiplatform.v1 - * @interface IMetadataStore - * @property {string|null} [name] MetadataStore name - * @property {google.protobuf.ITimestamp|null} [createTime] MetadataStore createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataStore updateTime - * @property {google.cloud.aiplatform.v1.IEncryptionSpec|null} [encryptionSpec] MetadataStore encryptionSpec - * @property {string|null} [description] MetadataStore description - * @property {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState|null} [state] MetadataStore state - */ - - /** - * Constructs a new MetadataStore. - * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a MetadataStore. - * @implements IMetadataStore - * @constructor - * @param {google.cloud.aiplatform.v1.IMetadataStore=} [properties] Properties to set - */ - function MetadataStore(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]]; - } - - /** - * MetadataStore name. - * @member {string} name - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @instance - */ - MetadataStore.prototype.name = ""; - - /** - * MetadataStore createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @instance - */ - MetadataStore.prototype.createTime = null; - - /** - * MetadataStore updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @instance - */ - MetadataStore.prototype.updateTime = null; - - /** - * MetadataStore encryptionSpec. - * @member {google.cloud.aiplatform.v1.IEncryptionSpec|null|undefined} encryptionSpec - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @instance - */ - MetadataStore.prototype.encryptionSpec = null; - - /** - * MetadataStore description. - * @member {string} description - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @instance - */ - MetadataStore.prototype.description = ""; - - /** - * MetadataStore state. - * @member {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState|null|undefined} state - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @instance - */ - MetadataStore.prototype.state = null; - - /** - * Creates a new MetadataStore instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @static - * @param {google.cloud.aiplatform.v1.IMetadataStore=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MetadataStore} MetadataStore instance - */ - MetadataStore.create = function create(properties) { - return new MetadataStore(properties); - }; - - /** - * Encodes the specified MetadataStore message. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataStore.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @static - * @param {google.cloud.aiplatform.v1.IMetadataStore} message MetadataStore message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetadataStore.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.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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) - $root.google.cloud.aiplatform.v1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.encode(message.state, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MetadataStore message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataStore.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @static - * @param {google.cloud.aiplatform.v1.IMetadataStore} message MetadataStore message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetadataStore.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetadataStore message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @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.MetadataStore} MetadataStore - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetadataStore.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.MetadataStore(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.decode(reader, reader.uint32()); - break; - } - case 6: { - message.description = reader.string(); - break; - } - case 7: { - message.state = $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.migrateResourceRequests != null && message.hasOwnProperty("migrateResourceRequests")) { + if (!Array.isArray(message.migrateResourceRequests)) + return "migrateResourceRequests: array expected"; + for (var i = 0; i < message.migrateResourceRequests.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.verify(message.migrateResourceRequests[i]); + if (error) + return "migrateResourceRequests." + error; } } - return message; - }; - - /** - * Decodes a MetadataStore message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MetadataStore} MetadataStore - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetadataStore.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetadataStore message. - * @function verify - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetadataStore.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) { - var error = $root.google.cloud.aiplatform.v1.EncryptionSpec.verify(message.encryptionSpec); - if (error) - return "encryptionSpec." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) { - var error = $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.verify(message.state); - if (error) - return "state." + error; - } return null; }; /** - * Creates a MetadataStore message from a plain object. Also converts values to their respective internal types. + * Creates a BatchMigrateResourcesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MetadataStore + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MetadataStore} MetadataStore + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} BatchMigrateResourcesRequest */ - MetadataStore.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MetadataStore) + BatchMigrateResourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest) return object; - var message = new $root.google.cloud.aiplatform.v1.MetadataStore(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MetadataStore.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MetadataStore.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.encryptionSpec != null) { - if (typeof object.encryptionSpec !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MetadataStore.encryptionSpec: object expected"); - message.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.fromObject(object.encryptionSpec); - } - if (object.description != null) - message.description = String(object.description); - if (object.state != null) { - if (typeof object.state !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MetadataStore.state: object expected"); - message.state = $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.fromObject(object.state); + var message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.migrateResourceRequests) { + if (!Array.isArray(object.migrateResourceRequests)) + throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.migrateResourceRequests: array expected"); + message.migrateResourceRequests = []; + for (var i = 0; i < object.migrateResourceRequests.length; ++i) { + if (typeof object.migrateResourceRequests[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.migrateResourceRequests: object expected"); + message.migrateResourceRequests[i] = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.fromObject(object.migrateResourceRequests[i]); + } } return message; }; /** - * Creates a plain object from a MetadataStore message. Also converts values to other types if specified. + * Creates a plain object from a BatchMigrateResourcesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MetadataStore + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @static - * @param {google.cloud.aiplatform.v1.MetadataStore} message MetadataStore + * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} message BatchMigrateResourcesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataStore.toObject = function toObject(message, options) { + BatchMigrateResourcesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.encryptionSpec = null; - object.description = ""; - object.state = null; + if (options.arrays || options.defaults) + object.migrateResourceRequests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.migrateResourceRequests && message.migrateResourceRequests.length) { + object.migrateResourceRequests = []; + for (var j = 0; j < message.migrateResourceRequests.length; ++j) + object.migrateResourceRequests[j] = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.toObject(message.migrateResourceRequests[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.toObject(message.state, options); return object; }; /** - * Converts this MetadataStore to JSON. + * Converts this BatchMigrateResourcesRequest to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MetadataStore + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @instance * @returns {Object.} JSON object */ - MetadataStore.prototype.toJSON = function toJSON() { + BatchMigrateResourcesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataStore + * Gets the default type url for BatchMigrateResourcesRequest * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MetadataStore + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataStore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchMigrateResourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MetadataStore"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.BatchMigrateResourcesRequest"; }; - MetadataStore.MetadataStoreState = (function() { - - /** - * Properties of a MetadataStoreState. - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @interface IMetadataStoreState - * @property {number|Long|null} [diskUtilizationBytes] MetadataStoreState diskUtilizationBytes - */ - - /** - * Constructs a new MetadataStoreState. - * @memberof google.cloud.aiplatform.v1.MetadataStore - * @classdesc Represents a MetadataStoreState. - * @implements IMetadataStoreState - * @constructor - * @param {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState=} [properties] Properties to set - */ - function MetadataStoreState(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]]; - } - - /** - * MetadataStoreState diskUtilizationBytes. - * @member {number|Long} diskUtilizationBytes - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @instance - */ - MetadataStoreState.prototype.diskUtilizationBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new MetadataStoreState instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @static - * @param {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState} MetadataStoreState instance - */ - MetadataStoreState.create = function create(properties) { - return new MetadataStoreState(properties); - }; - - /** - * Encodes the specified MetadataStoreState message. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @static - * @param {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState} message MetadataStoreState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetadataStoreState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.diskUtilizationBytes != null && Object.hasOwnProperty.call(message, "diskUtilizationBytes")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.diskUtilizationBytes); - return writer; - }; - - /** - * Encodes the specified MetadataStoreState message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @static - * @param {google.cloud.aiplatform.v1.MetadataStore.IMetadataStoreState} message MetadataStoreState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetadataStoreState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetadataStoreState message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @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.MetadataStore.MetadataStoreState} MetadataStoreState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetadataStoreState.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.MetadataStore.MetadataStoreState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.diskUtilizationBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetadataStoreState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState} MetadataStoreState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetadataStoreState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetadataStoreState message. - * @function verify - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetadataStoreState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.diskUtilizationBytes != null && message.hasOwnProperty("diskUtilizationBytes")) - if (!$util.isInteger(message.diskUtilizationBytes) && !(message.diskUtilizationBytes && $util.isInteger(message.diskUtilizationBytes.low) && $util.isInteger(message.diskUtilizationBytes.high))) - return "diskUtilizationBytes: integer|Long expected"; - return null; - }; - - /** - * Creates a MetadataStoreState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState} MetadataStoreState - */ - MetadataStoreState.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState) - return object; - var message = new $root.google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState(); - if (object.diskUtilizationBytes != null) - if ($util.Long) - (message.diskUtilizationBytes = $util.Long.fromValue(object.diskUtilizationBytes)).unsigned = false; - else if (typeof object.diskUtilizationBytes === "string") - message.diskUtilizationBytes = parseInt(object.diskUtilizationBytes, 10); - else if (typeof object.diskUtilizationBytes === "number") - message.diskUtilizationBytes = object.diskUtilizationBytes; - else if (typeof object.diskUtilizationBytes === "object") - message.diskUtilizationBytes = new $util.LongBits(object.diskUtilizationBytes.low >>> 0, object.diskUtilizationBytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a MetadataStoreState message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @static - * @param {google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState} message MetadataStoreState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetadataStoreState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.diskUtilizationBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.diskUtilizationBytes = options.longs === String ? "0" : 0; - if (message.diskUtilizationBytes != null && message.hasOwnProperty("diskUtilizationBytes")) - if (typeof message.diskUtilizationBytes === "number") - object.diskUtilizationBytes = options.longs === String ? String(message.diskUtilizationBytes) : message.diskUtilizationBytes; - else - object.diskUtilizationBytes = options.longs === String ? $util.Long.prototype.toString.call(message.diskUtilizationBytes) : options.longs === Number ? new $util.LongBits(message.diskUtilizationBytes.low >>> 0, message.diskUtilizationBytes.high >>> 0).toNumber() : message.diskUtilizationBytes; - return object; - }; - - /** - * Converts this MetadataStoreState to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @instance - * @returns {Object.} JSON object - */ - MetadataStoreState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetadataStoreState - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetadataStoreState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState"; - }; - - return MetadataStoreState; - })(); - - return MetadataStore; + return BatchMigrateResourcesRequest; })(); - v1.MigratableResource = (function() { + v1.MigrateResourceRequest = (function() { /** - * Properties of a MigratableResource. + * Properties of a MigrateResourceRequest. * @memberof google.cloud.aiplatform.v1 - * @interface IMigratableResource - * @property {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion|null} [mlEngineModelVersion] MigratableResource mlEngineModelVersion - * @property {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel|null} [automlModel] MigratableResource automlModel - * @property {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset|null} [automlDataset] MigratableResource automlDataset - * @property {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset|null} [dataLabelingDataset] MigratableResource dataLabelingDataset - * @property {google.protobuf.ITimestamp|null} [lastMigrateTime] MigratableResource lastMigrateTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigratableResource lastUpdateTime + * @interface IMigrateResourceRequest + * @property {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig|null} [migrateMlEngineModelVersionConfig] MigrateResourceRequest migrateMlEngineModelVersionConfig + * @property {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig|null} [migrateAutomlModelConfig] MigrateResourceRequest migrateAutomlModelConfig + * @property {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig|null} [migrateAutomlDatasetConfig] MigrateResourceRequest migrateAutomlDatasetConfig + * @property {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig|null} [migrateDataLabelingDatasetConfig] MigrateResourceRequest migrateDataLabelingDatasetConfig */ /** - * Constructs a new MigratableResource. + * Constructs a new MigrateResourceRequest. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a MigratableResource. - * @implements IMigratableResource + * @classdesc Represents a MigrateResourceRequest. + * @implements IMigrateResourceRequest * @constructor - * @param {google.cloud.aiplatform.v1.IMigratableResource=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.IMigrateResourceRequest=} [properties] Properties to set */ - function MigratableResource(properties) { + function MigrateResourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116973,159 +121594,131 @@ } /** - * MigratableResource mlEngineModelVersion. - * @member {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion|null|undefined} mlEngineModelVersion - * @memberof google.cloud.aiplatform.v1.MigratableResource - * @instance - */ - MigratableResource.prototype.mlEngineModelVersion = null; - - /** - * MigratableResource automlModel. - * @member {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel|null|undefined} automlModel - * @memberof google.cloud.aiplatform.v1.MigratableResource - * @instance - */ - MigratableResource.prototype.automlModel = null; - - /** - * MigratableResource automlDataset. - * @member {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset|null|undefined} automlDataset - * @memberof google.cloud.aiplatform.v1.MigratableResource + * MigrateResourceRequest migrateMlEngineModelVersionConfig. + * @member {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig|null|undefined} migrateMlEngineModelVersionConfig + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @instance */ - MigratableResource.prototype.automlDataset = null; + MigrateResourceRequest.prototype.migrateMlEngineModelVersionConfig = null; /** - * MigratableResource dataLabelingDataset. - * @member {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset|null|undefined} dataLabelingDataset - * @memberof google.cloud.aiplatform.v1.MigratableResource + * MigrateResourceRequest migrateAutomlModelConfig. + * @member {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig|null|undefined} migrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @instance */ - MigratableResource.prototype.dataLabelingDataset = null; + MigrateResourceRequest.prototype.migrateAutomlModelConfig = null; /** - * MigratableResource lastMigrateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastMigrateTime - * @memberof google.cloud.aiplatform.v1.MigratableResource + * MigrateResourceRequest migrateAutomlDatasetConfig. + * @member {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig|null|undefined} migrateAutomlDatasetConfig + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @instance */ - MigratableResource.prototype.lastMigrateTime = null; + MigrateResourceRequest.prototype.migrateAutomlDatasetConfig = null; /** - * MigratableResource lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.aiplatform.v1.MigratableResource + * MigrateResourceRequest migrateDataLabelingDatasetConfig. + * @member {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig|null|undefined} migrateDataLabelingDatasetConfig + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @instance */ - MigratableResource.prototype.lastUpdateTime = null; + MigrateResourceRequest.prototype.migrateDataLabelingDatasetConfig = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * MigratableResource resource. - * @member {"mlEngineModelVersion"|"automlModel"|"automlDataset"|"dataLabelingDataset"|undefined} resource - * @memberof google.cloud.aiplatform.v1.MigratableResource + * MigrateResourceRequest request. + * @member {"migrateMlEngineModelVersionConfig"|"migrateAutomlModelConfig"|"migrateAutomlDatasetConfig"|"migrateDataLabelingDatasetConfig"|undefined} request + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @instance */ - Object.defineProperty(MigratableResource.prototype, "resource", { - get: $util.oneOfGetter($oneOfFields = ["mlEngineModelVersion", "automlModel", "automlDataset", "dataLabelingDataset"]), + Object.defineProperty(MigrateResourceRequest.prototype, "request", { + get: $util.oneOfGetter($oneOfFields = ["migrateMlEngineModelVersionConfig", "migrateAutomlModelConfig", "migrateAutomlDatasetConfig", "migrateDataLabelingDatasetConfig"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new MigratableResource instance using the specified properties. + * Creates a new MigrateResourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @static - * @param {google.cloud.aiplatform.v1.IMigratableResource=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigratableResource} MigratableResource instance + * @param {google.cloud.aiplatform.v1.IMigrateResourceRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest} MigrateResourceRequest instance */ - MigratableResource.create = function create(properties) { - return new MigratableResource(properties); + MigrateResourceRequest.create = function create(properties) { + return new MigrateResourceRequest(properties); }; /** - * Encodes the specified MigratableResource message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.verify|verify} messages. + * Encodes the specified MigrateResourceRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @static - * @param {google.cloud.aiplatform.v1.IMigratableResource} message MigratableResource message or plain object to encode + * @param {google.cloud.aiplatform.v1.IMigrateResourceRequest} message MigrateResourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigratableResource.encode = function encode(message, writer) { + MigrateResourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mlEngineModelVersion != null && Object.hasOwnProperty.call(message, "mlEngineModelVersion")) - $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.encode(message.mlEngineModelVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.automlModel != null && Object.hasOwnProperty.call(message, "automlModel")) - $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.encode(message.automlModel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.automlDataset != null && Object.hasOwnProperty.call(message, "automlDataset")) - $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.encode(message.automlDataset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dataLabelingDataset != null && Object.hasOwnProperty.call(message, "dataLabelingDataset")) - $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.encode(message.dataLabelingDataset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastMigrateTime != null && Object.hasOwnProperty.call(message, "lastMigrateTime")) - $root.google.protobuf.Timestamp.encode(message.lastMigrateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.migrateMlEngineModelVersionConfig != null && Object.hasOwnProperty.call(message, "migrateMlEngineModelVersionConfig")) + $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.encode(message.migrateMlEngineModelVersionConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.migrateAutomlModelConfig != null && Object.hasOwnProperty.call(message, "migrateAutomlModelConfig")) + $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.encode(message.migrateAutomlModelConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.migrateAutomlDatasetConfig != null && Object.hasOwnProperty.call(message, "migrateAutomlDatasetConfig")) + $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.encode(message.migrateAutomlDatasetConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.migrateDataLabelingDatasetConfig != null && Object.hasOwnProperty.call(message, "migrateDataLabelingDatasetConfig")) + $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.encode(message.migrateDataLabelingDatasetConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified MigratableResource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.verify|verify} messages. + * Encodes the specified MigrateResourceRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @static - * @param {google.cloud.aiplatform.v1.IMigratableResource} message MigratableResource message or plain object to encode + * @param {google.cloud.aiplatform.v1.IMigrateResourceRequest} message MigrateResourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigratableResource.encodeDelimited = function encodeDelimited(message, writer) { + MigrateResourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigratableResource message from the specified reader or buffer. + * Decodes a MigrateResourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @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.MigratableResource} MigratableResource + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest} MigrateResourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigratableResource.decode = function decode(reader, length) { + MigrateResourceRequest.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.MigratableResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.mlEngineModelVersion = $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.decode(reader, reader.uint32()); + message.migrateMlEngineModelVersionConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.decode(reader, reader.uint32()); break; } case 2: { - message.automlModel = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.decode(reader, reader.uint32()); + message.migrateAutomlModelConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.decode(reader, reader.uint32()); break; } case 3: { - message.automlDataset = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.decode(reader, reader.uint32()); + message.migrateAutomlDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.decode(reader, reader.uint32()); break; } case 4: { - message.dataLabelingDataset = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.decode(reader, reader.uint32()); - break; - } - case 5: { - message.lastMigrateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.migrateDataLabelingDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.decode(reader, reader.uint32()); break; } default: @@ -117137,218 +121730,191 @@ }; /** - * Decodes a MigratableResource message from the specified reader or buffer, length delimited. + * Decodes a MigrateResourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigratableResource} MigratableResource + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest} MigrateResourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigratableResource.decodeDelimited = function decodeDelimited(reader) { + MigrateResourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigratableResource message. + * Verifies a MigrateResourceRequest message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigratableResource.verify = function verify(message) { + MigrateResourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.mlEngineModelVersion != null && message.hasOwnProperty("mlEngineModelVersion")) { - properties.resource = 1; + if (message.migrateMlEngineModelVersionConfig != null && message.hasOwnProperty("migrateMlEngineModelVersionConfig")) { + properties.request = 1; { - var error = $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.verify(message.mlEngineModelVersion); + var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.verify(message.migrateMlEngineModelVersionConfig); if (error) - return "mlEngineModelVersion." + error; + return "migrateMlEngineModelVersionConfig." + error; } } - if (message.automlModel != null && message.hasOwnProperty("automlModel")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; + if (message.migrateAutomlModelConfig != null && message.hasOwnProperty("migrateAutomlModelConfig")) { + if (properties.request === 1) + return "request: multiple values"; + properties.request = 1; { - var error = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.verify(message.automlModel); + var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.verify(message.migrateAutomlModelConfig); if (error) - return "automlModel." + error; + return "migrateAutomlModelConfig." + error; } } - if (message.automlDataset != null && message.hasOwnProperty("automlDataset")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; + if (message.migrateAutomlDatasetConfig != null && message.hasOwnProperty("migrateAutomlDatasetConfig")) { + if (properties.request === 1) + return "request: multiple values"; + properties.request = 1; { - var error = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.verify(message.automlDataset); + var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.verify(message.migrateAutomlDatasetConfig); if (error) - return "automlDataset." + error; + return "migrateAutomlDatasetConfig." + error; } } - if (message.dataLabelingDataset != null && message.hasOwnProperty("dataLabelingDataset")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; + if (message.migrateDataLabelingDatasetConfig != null && message.hasOwnProperty("migrateDataLabelingDatasetConfig")) { + if (properties.request === 1) + return "request: multiple values"; + properties.request = 1; { - var error = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.verify(message.dataLabelingDataset); + var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.verify(message.migrateDataLabelingDatasetConfig); if (error) - return "dataLabelingDataset." + error; + return "migrateDataLabelingDatasetConfig." + error; } } - if (message.lastMigrateTime != null && message.hasOwnProperty("lastMigrateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastMigrateTime); - if (error) - return "lastMigrateTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; - } return null; }; /** - * Creates a MigratableResource message from a plain object. Also converts values to their respective internal types. + * Creates a MigrateResourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigratableResource} MigratableResource + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest} MigrateResourceRequest */ - MigratableResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource) + MigrateResourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest) return object; - var message = new $root.google.cloud.aiplatform.v1.MigratableResource(); - if (object.mlEngineModelVersion != null) { - if (typeof object.mlEngineModelVersion !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.mlEngineModelVersion: object expected"); - message.mlEngineModelVersion = $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.fromObject(object.mlEngineModelVersion); - } - if (object.automlModel != null) { - if (typeof object.automlModel !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.automlModel: object expected"); - message.automlModel = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.fromObject(object.automlModel); - } - if (object.automlDataset != null) { - if (typeof object.automlDataset !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.automlDataset: object expected"); - message.automlDataset = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.fromObject(object.automlDataset); + var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest(); + if (object.migrateMlEngineModelVersionConfig != null) { + if (typeof object.migrateMlEngineModelVersionConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.migrateMlEngineModelVersionConfig: object expected"); + message.migrateMlEngineModelVersionConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.fromObject(object.migrateMlEngineModelVersionConfig); } - if (object.dataLabelingDataset != null) { - if (typeof object.dataLabelingDataset !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.dataLabelingDataset: object expected"); - message.dataLabelingDataset = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.fromObject(object.dataLabelingDataset); + if (object.migrateAutomlModelConfig != null) { + if (typeof object.migrateAutomlModelConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.migrateAutomlModelConfig: object expected"); + message.migrateAutomlModelConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.fromObject(object.migrateAutomlModelConfig); } - if (object.lastMigrateTime != null) { - if (typeof object.lastMigrateTime !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.lastMigrateTime: object expected"); - message.lastMigrateTime = $root.google.protobuf.Timestamp.fromObject(object.lastMigrateTime); + if (object.migrateAutomlDatasetConfig != null) { + if (typeof object.migrateAutomlDatasetConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.migrateAutomlDatasetConfig: object expected"); + message.migrateAutomlDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.fromObject(object.migrateAutomlDatasetConfig); } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + if (object.migrateDataLabelingDatasetConfig != null) { + if (typeof object.migrateDataLabelingDatasetConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.migrateDataLabelingDatasetConfig: object expected"); + message.migrateDataLabelingDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.fromObject(object.migrateDataLabelingDatasetConfig); } return message; }; /** - * Creates a plain object from a MigratableResource message. Also converts values to other types if specified. + * Creates a plain object from a MigrateResourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @static - * @param {google.cloud.aiplatform.v1.MigratableResource} message MigratableResource + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest} message MigrateResourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigratableResource.toObject = function toObject(message, options) { + MigrateResourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.lastMigrateTime = null; - object.lastUpdateTime = null; - } - if (message.mlEngineModelVersion != null && message.hasOwnProperty("mlEngineModelVersion")) { - object.mlEngineModelVersion = $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.toObject(message.mlEngineModelVersion, options); + if (message.migrateMlEngineModelVersionConfig != null && message.hasOwnProperty("migrateMlEngineModelVersionConfig")) { + object.migrateMlEngineModelVersionConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.toObject(message.migrateMlEngineModelVersionConfig, options); if (options.oneofs) - object.resource = "mlEngineModelVersion"; + object.request = "migrateMlEngineModelVersionConfig"; } - if (message.automlModel != null && message.hasOwnProperty("automlModel")) { - object.automlModel = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.toObject(message.automlModel, options); + if (message.migrateAutomlModelConfig != null && message.hasOwnProperty("migrateAutomlModelConfig")) { + object.migrateAutomlModelConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.toObject(message.migrateAutomlModelConfig, options); if (options.oneofs) - object.resource = "automlModel"; + object.request = "migrateAutomlModelConfig"; } - if (message.automlDataset != null && message.hasOwnProperty("automlDataset")) { - object.automlDataset = $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.toObject(message.automlDataset, options); + if (message.migrateAutomlDatasetConfig != null && message.hasOwnProperty("migrateAutomlDatasetConfig")) { + object.migrateAutomlDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.toObject(message.migrateAutomlDatasetConfig, options); if (options.oneofs) - object.resource = "automlDataset"; + object.request = "migrateAutomlDatasetConfig"; } - if (message.dataLabelingDataset != null && message.hasOwnProperty("dataLabelingDataset")) { - object.dataLabelingDataset = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.toObject(message.dataLabelingDataset, options); + if (message.migrateDataLabelingDatasetConfig != null && message.hasOwnProperty("migrateDataLabelingDatasetConfig")) { + object.migrateDataLabelingDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.toObject(message.migrateDataLabelingDatasetConfig, options); if (options.oneofs) - object.resource = "dataLabelingDataset"; + object.request = "migrateDataLabelingDatasetConfig"; } - if (message.lastMigrateTime != null && message.hasOwnProperty("lastMigrateTime")) - object.lastMigrateTime = $root.google.protobuf.Timestamp.toObject(message.lastMigrateTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); return object; }; /** - * Converts this MigratableResource to JSON. + * Converts this MigrateResourceRequest to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @instance * @returns {Object.} JSON object */ - MigratableResource.prototype.toJSON = function toJSON() { + MigrateResourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigratableResource + * Gets the default type url for MigrateResourceRequest * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigratableResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrateResourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest"; }; - MigratableResource.MlEngineModelVersion = (function() { + MigrateResourceRequest.MigrateMlEngineModelVersionConfig = (function() { /** - * Properties of a MlEngineModelVersion. - * @memberof google.cloud.aiplatform.v1.MigratableResource - * @interface IMlEngineModelVersion - * @property {string|null} [endpoint] MlEngineModelVersion endpoint - * @property {string|null} [version] MlEngineModelVersion version + * Properties of a MigrateMlEngineModelVersionConfig. + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @interface IMigrateMlEngineModelVersionConfig + * @property {string|null} [endpoint] MigrateMlEngineModelVersionConfig endpoint + * @property {string|null} [modelVersion] MigrateMlEngineModelVersionConfig modelVersion + * @property {string|null} [modelDisplayName] MigrateMlEngineModelVersionConfig modelDisplayName */ /** - * Constructs a new MlEngineModelVersion. - * @memberof google.cloud.aiplatform.v1.MigratableResource - * @classdesc Represents a MlEngineModelVersion. - * @implements IMlEngineModelVersion + * Constructs a new MigrateMlEngineModelVersionConfig. + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @classdesc Represents a MigrateMlEngineModelVersionConfig. + * @implements IMigrateMlEngineModelVersionConfig * @constructor - * @param {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig=} [properties] Properties to set */ - function MlEngineModelVersion(properties) { + function MigrateMlEngineModelVersionConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -117356,80 +121922,90 @@ } /** - * MlEngineModelVersion endpoint. + * MigrateMlEngineModelVersionConfig endpoint. * @member {string} endpoint - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @instance */ - MlEngineModelVersion.prototype.endpoint = ""; + MigrateMlEngineModelVersionConfig.prototype.endpoint = ""; /** - * MlEngineModelVersion version. - * @member {string} version - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * MigrateMlEngineModelVersionConfig modelVersion. + * @member {string} modelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @instance */ - MlEngineModelVersion.prototype.version = ""; + MigrateMlEngineModelVersionConfig.prototype.modelVersion = ""; /** - * Creates a new MlEngineModelVersion instance using the specified properties. + * MigrateMlEngineModelVersionConfig modelDisplayName. + * @member {string} modelDisplayName + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * @instance + */ + MigrateMlEngineModelVersionConfig.prototype.modelDisplayName = ""; + + /** + * Creates a new MigrateMlEngineModelVersionConfig instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion} MlEngineModelVersion instance + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} MigrateMlEngineModelVersionConfig instance */ - MlEngineModelVersion.create = function create(properties) { - return new MlEngineModelVersion(properties); + MigrateMlEngineModelVersionConfig.create = function create(properties) { + return new MigrateMlEngineModelVersionConfig(properties); }; /** - * Encodes the specified MlEngineModelVersion message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.verify|verify} messages. + * Encodes the specified MigrateMlEngineModelVersionConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion} message MlEngineModelVersion message or plain object to encode + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig} message MigrateMlEngineModelVersionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MlEngineModelVersion.encode = function encode(message, writer) { + MigrateMlEngineModelVersionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.endpoint); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.modelVersion != null && Object.hasOwnProperty.call(message, "modelVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.modelVersion); + if (message.modelDisplayName != null && Object.hasOwnProperty.call(message, "modelDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.modelDisplayName); return writer; }; /** - * Encodes the specified MlEngineModelVersion message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.verify|verify} messages. + * Encodes the specified MigrateMlEngineModelVersionConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IMlEngineModelVersion} message MlEngineModelVersion message or plain object to encode + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig} message MigrateMlEngineModelVersionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MlEngineModelVersion.encodeDelimited = function encodeDelimited(message, writer) { + MigrateMlEngineModelVersionConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MlEngineModelVersion message from the specified reader or buffer. + * Decodes a MigrateMlEngineModelVersionConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @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.MigratableResource.MlEngineModelVersion} MlEngineModelVersion + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} MigrateMlEngineModelVersionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MlEngineModelVersion.decode = function decode(reader, length) { + MigrateMlEngineModelVersionConfig.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.MigratableResource.MlEngineModelVersion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -117438,7 +122014,11 @@ break; } case 2: { - message.version = reader.string(); + message.modelVersion = reader.string(); + break; + } + case 3: { + message.modelDisplayName = reader.string(); break; } default: @@ -117450,132 +122030,140 @@ }; /** - * Decodes a MlEngineModelVersion message from the specified reader or buffer, length delimited. + * Decodes a MigrateMlEngineModelVersionConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion} MlEngineModelVersion + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} MigrateMlEngineModelVersionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MlEngineModelVersion.decodeDelimited = function decodeDelimited(reader) { + MigrateMlEngineModelVersionConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MlEngineModelVersion message. + * Verifies a MigrateMlEngineModelVersionConfig message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MlEngineModelVersion.verify = function verify(message) { + MigrateMlEngineModelVersionConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.endpoint != null && message.hasOwnProperty("endpoint")) if (!$util.isString(message.endpoint)) return "endpoint: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; + if (message.modelVersion != null && message.hasOwnProperty("modelVersion")) + if (!$util.isString(message.modelVersion)) + return "modelVersion: string expected"; + if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) + if (!$util.isString(message.modelDisplayName)) + return "modelDisplayName: string expected"; return null; }; /** - * Creates a MlEngineModelVersion message from a plain object. Also converts values to their respective internal types. + * Creates a MigrateMlEngineModelVersionConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion} MlEngineModelVersion + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} MigrateMlEngineModelVersionConfig */ - MlEngineModelVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) + MigrateMlEngineModelVersionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig) return object; - var message = new $root.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion(); + var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig(); if (object.endpoint != null) message.endpoint = String(object.endpoint); - if (object.version != null) - message.version = String(object.version); + if (object.modelVersion != null) + message.modelVersion = String(object.modelVersion); + if (object.modelDisplayName != null) + message.modelDisplayName = String(object.modelDisplayName); return message; }; /** - * Creates a plain object from a MlEngineModelVersion message. Also converts values to other types if specified. + * Creates a plain object from a MigrateMlEngineModelVersionConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion} message MlEngineModelVersion + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} message MigrateMlEngineModelVersionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MlEngineModelVersion.toObject = function toObject(message, options) { + MigrateMlEngineModelVersionConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.endpoint = ""; - object.version = ""; + object.modelVersion = ""; + object.modelDisplayName = ""; } if (message.endpoint != null && message.hasOwnProperty("endpoint")) object.endpoint = message.endpoint; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; + if (message.modelVersion != null && message.hasOwnProperty("modelVersion")) + object.modelVersion = message.modelVersion; + if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) + object.modelDisplayName = message.modelDisplayName; return object; }; /** - * Converts this MlEngineModelVersion to JSON. + * Converts this MigrateMlEngineModelVersionConfig to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @instance * @returns {Object.} JSON object */ - MlEngineModelVersion.prototype.toJSON = function toJSON() { + MigrateMlEngineModelVersionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MlEngineModelVersion + * Gets the default type url for MigrateMlEngineModelVersionConfig * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MlEngineModelVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrateMlEngineModelVersionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig"; }; - return MlEngineModelVersion; + return MigrateMlEngineModelVersionConfig; })(); - MigratableResource.AutomlModel = (function() { + MigrateResourceRequest.MigrateAutomlModelConfig = (function() { /** - * Properties of an AutomlModel. - * @memberof google.cloud.aiplatform.v1.MigratableResource - * @interface IAutomlModel - * @property {string|null} [model] AutomlModel model - * @property {string|null} [modelDisplayName] AutomlModel modelDisplayName + * Properties of a MigrateAutomlModelConfig. + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @interface IMigrateAutomlModelConfig + * @property {string|null} [model] MigrateAutomlModelConfig model + * @property {string|null} [modelDisplayName] MigrateAutomlModelConfig modelDisplayName */ /** - * Constructs a new AutomlModel. - * @memberof google.cloud.aiplatform.v1.MigratableResource - * @classdesc Represents an AutomlModel. - * @implements IAutomlModel + * Constructs a new MigrateAutomlModelConfig. + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @classdesc Represents a MigrateAutomlModelConfig. + * @implements IMigrateAutomlModelConfig * @constructor - * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig=} [properties] Properties to set */ - function AutomlModel(properties) { + function MigrateAutomlModelConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -117583,80 +122171,80 @@ } /** - * AutomlModel model. + * MigrateAutomlModelConfig model. * @member {string} model - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @instance */ - AutomlModel.prototype.model = ""; + MigrateAutomlModelConfig.prototype.model = ""; /** - * AutomlModel modelDisplayName. + * MigrateAutomlModelConfig modelDisplayName. * @member {string} modelDisplayName - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @instance */ - AutomlModel.prototype.modelDisplayName = ""; + MigrateAutomlModelConfig.prototype.modelDisplayName = ""; /** - * Creates a new AutomlModel instance using the specified properties. + * Creates a new MigrateAutomlModelConfig instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlModel} AutomlModel instance + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} MigrateAutomlModelConfig instance */ - AutomlModel.create = function create(properties) { - return new AutomlModel(properties); + MigrateAutomlModelConfig.create = function create(properties) { + return new MigrateAutomlModelConfig(properties); }; /** - * Encodes the specified AutomlModel message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.AutomlModel.verify|verify} messages. + * Encodes the specified MigrateAutomlModelConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel} message AutomlModel message or plain object to encode + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig} message MigrateAutomlModelConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomlModel.encode = function encode(message, writer) { + MigrateAutomlModelConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.model != null && Object.hasOwnProperty.call(message, "model")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); if (message.modelDisplayName != null && Object.hasOwnProperty.call(message, "modelDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.modelDisplayName); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.modelDisplayName); return writer; }; /** - * Encodes the specified AutomlModel message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.AutomlModel.verify|verify} messages. + * Encodes the specified MigrateAutomlModelConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlModel} message AutomlModel message or plain object to encode + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig} message MigrateAutomlModelConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomlModel.encodeDelimited = function encodeDelimited(message, writer) { + MigrateAutomlModelConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AutomlModel message from the specified reader or buffer. + * Decodes a MigrateAutomlModelConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @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.MigratableResource.AutomlModel} AutomlModel + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} MigrateAutomlModelConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutomlModel.decode = function decode(reader, length) { + MigrateAutomlModelConfig.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.MigratableResource.AutomlModel(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -117664,7 +122252,7 @@ message.model = reader.string(); break; } - case 3: { + case 2: { message.modelDisplayName = reader.string(); break; } @@ -117677,30 +122265,30 @@ }; /** - * Decodes an AutomlModel message from the specified reader or buffer, length delimited. + * Decodes a MigrateAutomlModelConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlModel} AutomlModel + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} MigrateAutomlModelConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutomlModel.decodeDelimited = function decodeDelimited(reader) { + MigrateAutomlModelConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AutomlModel message. + * Verifies a MigrateAutomlModelConfig message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AutomlModel.verify = function verify(message) { + MigrateAutomlModelConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.model != null && message.hasOwnProperty("model")) @@ -117713,17 +122301,17 @@ }; /** - * Creates an AutomlModel message from a plain object. Also converts values to their respective internal types. + * Creates a MigrateAutomlModelConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlModel} AutomlModel + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} MigrateAutomlModelConfig */ - AutomlModel.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) + MigrateAutomlModelConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) return object; - var message = new $root.google.cloud.aiplatform.v1.MigratableResource.AutomlModel(); + var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig(); if (object.model != null) message.model = String(object.model); if (object.modelDisplayName != null) @@ -117732,15 +122320,15 @@ }; /** - * Creates a plain object from an AutomlModel message. Also converts values to other types if specified. + * Creates a plain object from a MigrateAutomlModelConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.AutomlModel} message AutomlModel + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} message MigrateAutomlModelConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AutomlModel.toObject = function toObject(message, options) { + MigrateAutomlModelConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -117756,53 +122344,53 @@ }; /** - * Converts this AutomlModel to JSON. + * Converts this MigrateAutomlModelConfig to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @instance * @returns {Object.} JSON object */ - AutomlModel.prototype.toJSON = function toJSON() { + MigrateAutomlModelConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AutomlModel + * Gets the default type url for MigrateAutomlModelConfig * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlModel + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AutomlModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrateAutomlModelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource.AutomlModel"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig"; }; - return AutomlModel; + return MigrateAutomlModelConfig; })(); - MigratableResource.AutomlDataset = (function() { + MigrateResourceRequest.MigrateAutomlDatasetConfig = (function() { /** - * Properties of an AutomlDataset. - * @memberof google.cloud.aiplatform.v1.MigratableResource - * @interface IAutomlDataset - * @property {string|null} [dataset] AutomlDataset dataset - * @property {string|null} [datasetDisplayName] AutomlDataset datasetDisplayName + * Properties of a MigrateAutomlDatasetConfig. + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @interface IMigrateAutomlDatasetConfig + * @property {string|null} [dataset] MigrateAutomlDatasetConfig dataset + * @property {string|null} [datasetDisplayName] MigrateAutomlDatasetConfig datasetDisplayName */ /** - * Constructs a new AutomlDataset. - * @memberof google.cloud.aiplatform.v1.MigratableResource - * @classdesc Represents an AutomlDataset. - * @implements IAutomlDataset + * Constructs a new MigrateAutomlDatasetConfig. + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @classdesc Represents a MigrateAutomlDatasetConfig. + * @implements IMigrateAutomlDatasetConfig * @constructor - * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig=} [properties] Properties to set */ - function AutomlDataset(properties) { + function MigrateAutomlDatasetConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -117810,80 +122398,80 @@ } /** - * AutomlDataset dataset. + * MigrateAutomlDatasetConfig dataset. * @member {string} dataset - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @instance */ - AutomlDataset.prototype.dataset = ""; + MigrateAutomlDatasetConfig.prototype.dataset = ""; /** - * AutomlDataset datasetDisplayName. + * MigrateAutomlDatasetConfig datasetDisplayName. * @member {string} datasetDisplayName - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @instance */ - AutomlDataset.prototype.datasetDisplayName = ""; + MigrateAutomlDatasetConfig.prototype.datasetDisplayName = ""; /** - * Creates a new AutomlDataset instance using the specified properties. + * Creates a new MigrateAutomlDatasetConfig instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlDataset} AutomlDataset instance + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} MigrateAutomlDatasetConfig instance */ - AutomlDataset.create = function create(properties) { - return new AutomlDataset(properties); + MigrateAutomlDatasetConfig.create = function create(properties) { + return new MigrateAutomlDatasetConfig(properties); }; /** - * Encodes the specified AutomlDataset message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.verify|verify} messages. + * Encodes the specified MigrateAutomlDatasetConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset} message AutomlDataset message or plain object to encode + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig} message MigrateAutomlDatasetConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomlDataset.encode = function encode(message, writer) { + MigrateAutomlDatasetConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); if (message.datasetDisplayName != null && Object.hasOwnProperty.call(message, "datasetDisplayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.datasetDisplayName); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetDisplayName); return writer; }; /** - * Encodes the specified AutomlDataset message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.verify|verify} messages. + * Encodes the specified MigrateAutomlDatasetConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IAutomlDataset} message AutomlDataset message or plain object to encode + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig} message MigrateAutomlDatasetConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomlDataset.encodeDelimited = function encodeDelimited(message, writer) { + MigrateAutomlDatasetConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AutomlDataset message from the specified reader or buffer. + * Decodes a MigrateAutomlDatasetConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @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.MigratableResource.AutomlDataset} AutomlDataset + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} MigrateAutomlDatasetConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutomlDataset.decode = function decode(reader, length) { + MigrateAutomlDatasetConfig.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.MigratableResource.AutomlDataset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -117891,7 +122479,7 @@ message.dataset = reader.string(); break; } - case 4: { + case 2: { message.datasetDisplayName = reader.string(); break; } @@ -117904,30 +122492,30 @@ }; /** - * Decodes an AutomlDataset message from the specified reader or buffer, length delimited. + * Decodes a MigrateAutomlDatasetConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlDataset} AutomlDataset + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} MigrateAutomlDatasetConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutomlDataset.decodeDelimited = function decodeDelimited(reader) { + MigrateAutomlDatasetConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AutomlDataset message. + * Verifies a MigrateAutomlDatasetConfig message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AutomlDataset.verify = function verify(message) { + MigrateAutomlDatasetConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.dataset != null && message.hasOwnProperty("dataset")) @@ -117940,17 +122528,17 @@ }; /** - * Creates an AutomlDataset message from a plain object. Also converts values to their respective internal types. + * Creates a MigrateAutomlDatasetConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigratableResource.AutomlDataset} AutomlDataset + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} MigrateAutomlDatasetConfig */ - AutomlDataset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) + MigrateAutomlDatasetConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) return object; - var message = new $root.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset(); + var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig(); if (object.dataset != null) message.dataset = String(object.dataset); if (object.datasetDisplayName != null) @@ -117959,15 +122547,15 @@ }; /** - * Creates a plain object from an AutomlDataset message. Also converts values to other types if specified. + * Creates a plain object from a MigrateAutomlDatasetConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.AutomlDataset} message AutomlDataset + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} message MigrateAutomlDatasetConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AutomlDataset.toObject = function toObject(message, options) { + MigrateAutomlDatasetConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -117983,55 +122571,55 @@ }; /** - * Converts this AutomlDataset to JSON. + * Converts this MigrateAutomlDatasetConfig to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @instance * @returns {Object.} JSON object */ - AutomlDataset.prototype.toJSON = function toJSON() { + MigrateAutomlDatasetConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AutomlDataset + * Gets the default type url for MigrateAutomlDatasetConfig * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AutomlDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrateAutomlDatasetConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource.AutomlDataset"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig"; }; - return AutomlDataset; + return MigrateAutomlDatasetConfig; })(); - MigratableResource.DataLabelingDataset = (function() { + MigrateResourceRequest.MigrateDataLabelingDatasetConfig = (function() { /** - * Properties of a DataLabelingDataset. - * @memberof google.cloud.aiplatform.v1.MigratableResource - * @interface IDataLabelingDataset - * @property {string|null} [dataset] DataLabelingDataset dataset - * @property {string|null} [datasetDisplayName] DataLabelingDataset datasetDisplayName - * @property {Array.|null} [dataLabelingAnnotatedDatasets] DataLabelingDataset dataLabelingAnnotatedDatasets + * Properties of a MigrateDataLabelingDatasetConfig. + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @interface IMigrateDataLabelingDatasetConfig + * @property {string|null} [dataset] MigrateDataLabelingDatasetConfig dataset + * @property {string|null} [datasetDisplayName] MigrateDataLabelingDatasetConfig datasetDisplayName + * @property {Array.|null} [migrateDataLabelingAnnotatedDatasetConfigs] MigrateDataLabelingDatasetConfig migrateDataLabelingAnnotatedDatasetConfigs */ /** - * Constructs a new DataLabelingDataset. - * @memberof google.cloud.aiplatform.v1.MigratableResource - * @classdesc Represents a DataLabelingDataset. - * @implements IDataLabelingDataset + * Constructs a new MigrateDataLabelingDatasetConfig. + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @classdesc Represents a MigrateDataLabelingDatasetConfig. + * @implements IMigrateDataLabelingDatasetConfig * @constructor - * @param {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig=} [properties] Properties to set */ - function DataLabelingDataset(properties) { - this.dataLabelingAnnotatedDatasets = []; + function MigrateDataLabelingDatasetConfig(properties) { + this.migrateDataLabelingAnnotatedDatasetConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118039,91 +122627,91 @@ } /** - * DataLabelingDataset dataset. + * MigrateDataLabelingDatasetConfig dataset. * @member {string} dataset - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @instance */ - DataLabelingDataset.prototype.dataset = ""; + MigrateDataLabelingDatasetConfig.prototype.dataset = ""; /** - * DataLabelingDataset datasetDisplayName. + * MigrateDataLabelingDatasetConfig datasetDisplayName. * @member {string} datasetDisplayName - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @instance */ - DataLabelingDataset.prototype.datasetDisplayName = ""; + MigrateDataLabelingDatasetConfig.prototype.datasetDisplayName = ""; /** - * DataLabelingDataset dataLabelingAnnotatedDatasets. - * @member {Array.} dataLabelingAnnotatedDatasets - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * MigrateDataLabelingDatasetConfig migrateDataLabelingAnnotatedDatasetConfigs. + * @member {Array.} migrateDataLabelingAnnotatedDatasetConfigs + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @instance */ - DataLabelingDataset.prototype.dataLabelingAnnotatedDatasets = $util.emptyArray; + MigrateDataLabelingDatasetConfig.prototype.migrateDataLabelingAnnotatedDatasetConfigs = $util.emptyArray; /** - * Creates a new DataLabelingDataset instance using the specified properties. + * Creates a new MigrateDataLabelingDatasetConfig instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset} DataLabelingDataset instance + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} MigrateDataLabelingDatasetConfig instance */ - DataLabelingDataset.create = function create(properties) { - return new DataLabelingDataset(properties); + MigrateDataLabelingDatasetConfig.create = function create(properties) { + return new MigrateDataLabelingDatasetConfig(properties); }; /** - * Encodes the specified DataLabelingDataset message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.verify|verify} messages. + * Encodes the specified MigrateDataLabelingDatasetConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset} message DataLabelingDataset message or plain object to encode + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig} message MigrateDataLabelingDatasetConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataLabelingDataset.encode = function encode(message, writer) { + MigrateDataLabelingDatasetConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); - if (message.dataLabelingAnnotatedDatasets != null && message.dataLabelingAnnotatedDatasets.length) - for (var i = 0; i < message.dataLabelingAnnotatedDatasets.length; ++i) - $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.encode(message.dataLabelingAnnotatedDatasets[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.datasetDisplayName != null && Object.hasOwnProperty.call(message, "datasetDisplayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.datasetDisplayName); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetDisplayName); + if (message.migrateDataLabelingAnnotatedDatasetConfigs != null && message.migrateDataLabelingAnnotatedDatasetConfigs.length) + for (var i = 0; i < message.migrateDataLabelingAnnotatedDatasetConfigs.length; ++i) + $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.encode(message.migrateDataLabelingAnnotatedDatasetConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DataLabelingDataset message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.verify|verify} messages. + * Encodes the specified MigrateDataLabelingDatasetConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.IDataLabelingDataset} message DataLabelingDataset message or plain object to encode + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig} message MigrateDataLabelingDatasetConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataLabelingDataset.encodeDelimited = function encodeDelimited(message, writer) { + MigrateDataLabelingDatasetConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataLabelingDataset message from the specified reader or buffer. + * Decodes a MigrateDataLabelingDatasetConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @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.MigratableResource.DataLabelingDataset} DataLabelingDataset + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} MigrateDataLabelingDatasetConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataLabelingDataset.decode = function decode(reader, length) { + MigrateDataLabelingDatasetConfig.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.MigratableResource.DataLabelingDataset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -118131,14 +122719,14 @@ message.dataset = reader.string(); break; } - case 4: { + case 2: { message.datasetDisplayName = reader.string(); break; } case 3: { - if (!(message.dataLabelingAnnotatedDatasets && message.dataLabelingAnnotatedDatasets.length)) - message.dataLabelingAnnotatedDatasets = []; - message.dataLabelingAnnotatedDatasets.push($root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.decode(reader, reader.uint32())); + if (!(message.migrateDataLabelingAnnotatedDatasetConfigs && message.migrateDataLabelingAnnotatedDatasetConfigs.length)) + message.migrateDataLabelingAnnotatedDatasetConfigs = []; + message.migrateDataLabelingAnnotatedDatasetConfigs.push($root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.decode(reader, reader.uint32())); break; } default: @@ -118150,30 +122738,30 @@ }; /** - * Decodes a DataLabelingDataset message from the specified reader or buffer, length delimited. + * Decodes a MigrateDataLabelingDatasetConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset} DataLabelingDataset + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} MigrateDataLabelingDatasetConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataLabelingDataset.decodeDelimited = function decodeDelimited(reader) { + MigrateDataLabelingDatasetConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataLabelingDataset message. + * Verifies a MigrateDataLabelingDatasetConfig message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataLabelingDataset.verify = function verify(message) { + MigrateDataLabelingDatasetConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.dataset != null && message.hasOwnProperty("dataset")) @@ -118182,123 +122770,122 @@ if (message.datasetDisplayName != null && message.hasOwnProperty("datasetDisplayName")) if (!$util.isString(message.datasetDisplayName)) return "datasetDisplayName: string expected"; - if (message.dataLabelingAnnotatedDatasets != null && message.hasOwnProperty("dataLabelingAnnotatedDatasets")) { - if (!Array.isArray(message.dataLabelingAnnotatedDatasets)) - return "dataLabelingAnnotatedDatasets: array expected"; - for (var i = 0; i < message.dataLabelingAnnotatedDatasets.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.verify(message.dataLabelingAnnotatedDatasets[i]); + if (message.migrateDataLabelingAnnotatedDatasetConfigs != null && message.hasOwnProperty("migrateDataLabelingAnnotatedDatasetConfigs")) { + if (!Array.isArray(message.migrateDataLabelingAnnotatedDatasetConfigs)) + return "migrateDataLabelingAnnotatedDatasetConfigs: array expected"; + for (var i = 0; i < message.migrateDataLabelingAnnotatedDatasetConfigs.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.verify(message.migrateDataLabelingAnnotatedDatasetConfigs[i]); if (error) - return "dataLabelingAnnotatedDatasets." + error; + return "migrateDataLabelingAnnotatedDatasetConfigs." + error; } } return null; }; /** - * Creates a DataLabelingDataset message from a plain object. Also converts values to their respective internal types. + * Creates a MigrateDataLabelingDatasetConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset} DataLabelingDataset + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} MigrateDataLabelingDatasetConfig */ - DataLabelingDataset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) + MigrateDataLabelingDatasetConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig) return object; - var message = new $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset(); + var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig(); if (object.dataset != null) message.dataset = String(object.dataset); if (object.datasetDisplayName != null) message.datasetDisplayName = String(object.datasetDisplayName); - if (object.dataLabelingAnnotatedDatasets) { - if (!Array.isArray(object.dataLabelingAnnotatedDatasets)) - throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.dataLabelingAnnotatedDatasets: array expected"); - message.dataLabelingAnnotatedDatasets = []; - for (var i = 0; i < object.dataLabelingAnnotatedDatasets.length; ++i) { - if (typeof object.dataLabelingAnnotatedDatasets[i] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.dataLabelingAnnotatedDatasets: object expected"); - message.dataLabelingAnnotatedDatasets[i] = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.fromObject(object.dataLabelingAnnotatedDatasets[i]); + if (object.migrateDataLabelingAnnotatedDatasetConfigs) { + if (!Array.isArray(object.migrateDataLabelingAnnotatedDatasetConfigs)) + throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.migrateDataLabelingAnnotatedDatasetConfigs: array expected"); + message.migrateDataLabelingAnnotatedDatasetConfigs = []; + for (var i = 0; i < object.migrateDataLabelingAnnotatedDatasetConfigs.length; ++i) { + if (typeof object.migrateDataLabelingAnnotatedDatasetConfigs[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.migrateDataLabelingAnnotatedDatasetConfigs: object expected"); + message.migrateDataLabelingAnnotatedDatasetConfigs[i] = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.fromObject(object.migrateDataLabelingAnnotatedDatasetConfigs[i]); } } return message; }; /** - * Creates a plain object from a DataLabelingDataset message. Also converts values to other types if specified. + * Creates a plain object from a MigrateDataLabelingDatasetConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset} message DataLabelingDataset + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} message MigrateDataLabelingDatasetConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataLabelingDataset.toObject = function toObject(message, options) { + MigrateDataLabelingDatasetConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.dataLabelingAnnotatedDatasets = []; + object.migrateDataLabelingAnnotatedDatasetConfigs = []; if (options.defaults) { object.dataset = ""; object.datasetDisplayName = ""; } if (message.dataset != null && message.hasOwnProperty("dataset")) object.dataset = message.dataset; - if (message.dataLabelingAnnotatedDatasets && message.dataLabelingAnnotatedDatasets.length) { - object.dataLabelingAnnotatedDatasets = []; - for (var j = 0; j < message.dataLabelingAnnotatedDatasets.length; ++j) - object.dataLabelingAnnotatedDatasets[j] = $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.toObject(message.dataLabelingAnnotatedDatasets[j], options); - } if (message.datasetDisplayName != null && message.hasOwnProperty("datasetDisplayName")) object.datasetDisplayName = message.datasetDisplayName; + if (message.migrateDataLabelingAnnotatedDatasetConfigs && message.migrateDataLabelingAnnotatedDatasetConfigs.length) { + object.migrateDataLabelingAnnotatedDatasetConfigs = []; + for (var j = 0; j < message.migrateDataLabelingAnnotatedDatasetConfigs.length; ++j) + object.migrateDataLabelingAnnotatedDatasetConfigs[j] = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.toObject(message.migrateDataLabelingAnnotatedDatasetConfigs[j], options); + } return object; }; /** - * Converts this DataLabelingDataset to JSON. + * Converts this MigrateDataLabelingDatasetConfig to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @instance * @returns {Object.} JSON object */ - DataLabelingDataset.prototype.toJSON = function toJSON() { + MigrateDataLabelingDatasetConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataLabelingDataset + * Gets the default type url for MigrateDataLabelingDatasetConfig * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataLabelingDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrateDataLabelingDatasetConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig"; }; - DataLabelingDataset.DataLabelingAnnotatedDataset = (function() { + MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig = (function() { /** - * Properties of a DataLabelingAnnotatedDataset. - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset - * @interface IDataLabelingAnnotatedDataset - * @property {string|null} [annotatedDataset] DataLabelingAnnotatedDataset annotatedDataset - * @property {string|null} [annotatedDatasetDisplayName] DataLabelingAnnotatedDataset annotatedDatasetDisplayName + * Properties of a MigrateDataLabelingAnnotatedDatasetConfig. + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @interface IMigrateDataLabelingAnnotatedDatasetConfig + * @property {string|null} [annotatedDataset] MigrateDataLabelingAnnotatedDatasetConfig annotatedDataset */ /** - * Constructs a new DataLabelingAnnotatedDataset. - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset - * @classdesc Represents a DataLabelingAnnotatedDataset. - * @implements IDataLabelingAnnotatedDataset + * Constructs a new MigrateDataLabelingAnnotatedDatasetConfig. + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @classdesc Represents a MigrateDataLabelingAnnotatedDatasetConfig. + * @implements IMigrateDataLabelingAnnotatedDatasetConfig * @constructor - * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.IDataLabelingAnnotatedDataset=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.IMigrateDataLabelingAnnotatedDatasetConfig=} [properties] Properties to set */ - function DataLabelingAnnotatedDataset(properties) { + function MigrateDataLabelingAnnotatedDatasetConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118306,80 +122893,70 @@ } /** - * DataLabelingAnnotatedDataset annotatedDataset. + * MigrateDataLabelingAnnotatedDatasetConfig annotatedDataset. * @member {string} annotatedDataset - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset - * @instance - */ - DataLabelingAnnotatedDataset.prototype.annotatedDataset = ""; - - /** - * DataLabelingAnnotatedDataset annotatedDatasetDisplayName. - * @member {string} annotatedDatasetDisplayName - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @instance */ - DataLabelingAnnotatedDataset.prototype.annotatedDatasetDisplayName = ""; + MigrateDataLabelingAnnotatedDatasetConfig.prototype.annotatedDataset = ""; /** - * Creates a new DataLabelingAnnotatedDataset instance using the specified properties. + * Creates a new MigrateDataLabelingAnnotatedDatasetConfig instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.IDataLabelingAnnotatedDataset=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} DataLabelingAnnotatedDataset instance + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.IMigrateDataLabelingAnnotatedDatasetConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} MigrateDataLabelingAnnotatedDatasetConfig instance */ - DataLabelingAnnotatedDataset.create = function create(properties) { - return new DataLabelingAnnotatedDataset(properties); + MigrateDataLabelingAnnotatedDatasetConfig.create = function create(properties) { + return new MigrateDataLabelingAnnotatedDatasetConfig(properties); }; /** - * Encodes the specified DataLabelingAnnotatedDataset message. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.verify|verify} messages. + * Encodes the specified MigrateDataLabelingAnnotatedDatasetConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.IDataLabelingAnnotatedDataset} message DataLabelingAnnotatedDataset message or plain object to encode + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.IMigrateDataLabelingAnnotatedDatasetConfig} message MigrateDataLabelingAnnotatedDatasetConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataLabelingAnnotatedDataset.encode = function encode(message, writer) { + MigrateDataLabelingAnnotatedDatasetConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.annotatedDataset != null && Object.hasOwnProperty.call(message, "annotatedDataset")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotatedDataset); - if (message.annotatedDatasetDisplayName != null && Object.hasOwnProperty.call(message, "annotatedDatasetDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.annotatedDatasetDisplayName); return writer; }; /** - * Encodes the specified DataLabelingAnnotatedDataset message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.verify|verify} messages. + * Encodes the specified MigrateDataLabelingAnnotatedDatasetConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.IDataLabelingAnnotatedDataset} message DataLabelingAnnotatedDataset message or plain object to encode + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.IMigrateDataLabelingAnnotatedDatasetConfig} message MigrateDataLabelingAnnotatedDatasetConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataLabelingAnnotatedDataset.encodeDelimited = function encodeDelimited(message, writer) { + MigrateDataLabelingAnnotatedDatasetConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataLabelingAnnotatedDataset message from the specified reader or buffer. + * Decodes a MigrateDataLabelingAnnotatedDatasetConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @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.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} DataLabelingAnnotatedDataset + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} MigrateDataLabelingAnnotatedDatasetConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataLabelingAnnotatedDataset.decode = function decode(reader, length) { + MigrateDataLabelingAnnotatedDatasetConfig.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.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -118387,10 +122964,6 @@ message.annotatedDataset = reader.string(); break; } - case 3: { - message.annotatedDatasetDisplayName = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -118400,241 +122973,129 @@ }; /** - * Decodes a DataLabelingAnnotatedDataset message from the specified reader or buffer, length delimited. + * Decodes a MigrateDataLabelingAnnotatedDatasetConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} DataLabelingAnnotatedDataset + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} MigrateDataLabelingAnnotatedDatasetConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataLabelingAnnotatedDataset.decodeDelimited = function decodeDelimited(reader) { + MigrateDataLabelingAnnotatedDatasetConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataLabelingAnnotatedDataset message. + * Verifies a MigrateDataLabelingAnnotatedDatasetConfig message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataLabelingAnnotatedDataset.verify = function verify(message) { + MigrateDataLabelingAnnotatedDatasetConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.annotatedDataset != null && message.hasOwnProperty("annotatedDataset")) if (!$util.isString(message.annotatedDataset)) return "annotatedDataset: string expected"; - if (message.annotatedDatasetDisplayName != null && message.hasOwnProperty("annotatedDatasetDisplayName")) - if (!$util.isString(message.annotatedDatasetDisplayName)) - return "annotatedDatasetDisplayName: string expected"; return null; }; /** - * Creates a DataLabelingAnnotatedDataset message from a plain object. Also converts values to their respective internal types. + * Creates a MigrateDataLabelingAnnotatedDatasetConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} DataLabelingAnnotatedDataset + * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} MigrateDataLabelingAnnotatedDatasetConfig */ - DataLabelingAnnotatedDataset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset) + MigrateDataLabelingAnnotatedDatasetConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig) return object; - var message = new $root.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset(); + var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig(); if (object.annotatedDataset != null) message.annotatedDataset = String(object.annotatedDataset); - if (object.annotatedDatasetDisplayName != null) - message.annotatedDatasetDisplayName = String(object.annotatedDatasetDisplayName); return message; }; /** - * Creates a plain object from a DataLabelingAnnotatedDataset message. Also converts values to other types if specified. + * Creates a plain object from a MigrateDataLabelingAnnotatedDatasetConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @static - * @param {google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} message DataLabelingAnnotatedDataset + * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} message MigrateDataLabelingAnnotatedDatasetConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataLabelingAnnotatedDataset.toObject = function toObject(message, options) { + MigrateDataLabelingAnnotatedDatasetConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.annotatedDataset = ""; - object.annotatedDatasetDisplayName = ""; - } if (message.annotatedDataset != null && message.hasOwnProperty("annotatedDataset")) object.annotatedDataset = message.annotatedDataset; - if (message.annotatedDatasetDisplayName != null && message.hasOwnProperty("annotatedDatasetDisplayName")) - object.annotatedDatasetDisplayName = message.annotatedDatasetDisplayName; return object; }; /** - * Converts this DataLabelingAnnotatedDataset to JSON. + * Converts this MigrateDataLabelingAnnotatedDatasetConfig to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @instance * @returns {Object.} JSON object */ - DataLabelingAnnotatedDataset.prototype.toJSON = function toJSON() { + MigrateDataLabelingAnnotatedDatasetConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataLabelingAnnotatedDataset + * Gets the default type url for MigrateDataLabelingAnnotatedDatasetConfig * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataLabelingAnnotatedDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrateDataLabelingAnnotatedDatasetConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig"; }; - return DataLabelingAnnotatedDataset; + return MigrateDataLabelingAnnotatedDatasetConfig; })(); - return DataLabelingDataset; + return MigrateDataLabelingDatasetConfig; })(); - return MigratableResource; - })(); - - v1.MigrationService = (function() { - - /** - * Constructs a new MigrationService service. - * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a MigrationService - * @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 MigrationService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (MigrationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MigrationService; - - /** - * Creates new MigrationService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.aiplatform.v1.MigrationService - * @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 {MigrationService} RPC service. Useful where requests and/or responses are streamed. - */ - MigrationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.aiplatform.v1.MigrationService|searchMigratableResources}. - * @memberof google.cloud.aiplatform.v1.MigrationService - * @typedef SearchMigratableResourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} [response] SearchMigratableResourcesResponse - */ - - /** - * Calls SearchMigratableResources. - * @function searchMigratableResources - * @memberof google.cloud.aiplatform.v1.MigrationService - * @instance - * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest} request SearchMigratableResourcesRequest message or plain object - * @param {google.cloud.aiplatform.v1.MigrationService.SearchMigratableResourcesCallback} callback Node-style callback called with the error, if any, and SearchMigratableResourcesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.searchMigratableResources = function searchMigratableResources(request, callback) { - return this.rpcCall(searchMigratableResources, $root.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest, $root.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse, request, callback); - }, "name", { value: "SearchMigratableResources" }); - - /** - * Calls SearchMigratableResources. - * @function searchMigratableResources - * @memberof google.cloud.aiplatform.v1.MigrationService - * @instance - * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest} request SearchMigratableResourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.aiplatform.v1.MigrationService|batchMigrateResources}. - * @memberof google.cloud.aiplatform.v1.MigrationService - * @typedef BatchMigrateResourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls BatchMigrateResources. - * @function batchMigrateResources - * @memberof google.cloud.aiplatform.v1.MigrationService - * @instance - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest} request BatchMigrateResourcesRequest message or plain object - * @param {google.cloud.aiplatform.v1.MigrationService.BatchMigrateResourcesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.batchMigrateResources = function batchMigrateResources(request, callback) { - return this.rpcCall(batchMigrateResources, $root.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchMigrateResources" }); - - /** - * Calls BatchMigrateResources. - * @function batchMigrateResources - * @memberof google.cloud.aiplatform.v1.MigrationService - * @instance - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest} request BatchMigrateResourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return MigrationService; + return MigrateResourceRequest; })(); - v1.SearchMigratableResourcesRequest = (function() { + v1.BatchMigrateResourcesResponse = (function() { /** - * Properties of a SearchMigratableResourcesRequest. + * Properties of a BatchMigrateResourcesResponse. * @memberof google.cloud.aiplatform.v1 - * @interface ISearchMigratableResourcesRequest - * @property {string|null} [parent] SearchMigratableResourcesRequest parent - * @property {number|null} [pageSize] SearchMigratableResourcesRequest pageSize - * @property {string|null} [pageToken] SearchMigratableResourcesRequest pageToken - * @property {string|null} [filter] SearchMigratableResourcesRequest filter + * @interface IBatchMigrateResourcesResponse + * @property {Array.|null} [migrateResourceResponses] BatchMigrateResourcesResponse migrateResourceResponses */ /** - * Constructs a new SearchMigratableResourcesRequest. + * Constructs a new BatchMigrateResourcesResponse. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a SearchMigratableResourcesRequest. - * @implements ISearchMigratableResourcesRequest + * @classdesc Represents a BatchMigrateResourcesResponse. + * @implements IBatchMigrateResourcesResponse * @constructor - * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesResponse=} [properties] Properties to set */ - function SearchMigratableResourcesRequest(properties) { + function BatchMigrateResourcesResponse(properties) { + this.migrateResourceResponses = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118642,117 +123103,78 @@ } /** - * SearchMigratableResourcesRequest parent. - * @member {string} parent - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest - * @instance - */ - SearchMigratableResourcesRequest.prototype.parent = ""; - - /** - * SearchMigratableResourcesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest - * @instance - */ - SearchMigratableResourcesRequest.prototype.pageSize = 0; - - /** - * SearchMigratableResourcesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest - * @instance - */ - SearchMigratableResourcesRequest.prototype.pageToken = ""; - - /** - * SearchMigratableResourcesRequest filter. - * @member {string} filter - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * BatchMigrateResourcesResponse migrateResourceResponses. + * @member {Array.} migrateResourceResponses + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @instance */ - SearchMigratableResourcesRequest.prototype.filter = ""; + BatchMigrateResourcesResponse.prototype.migrateResourceResponses = $util.emptyArray; /** - * Creates a new SearchMigratableResourcesRequest instance using the specified properties. + * Creates a new BatchMigrateResourcesResponse instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @static - * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} SearchMigratableResourcesRequest instance + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} BatchMigrateResourcesResponse instance */ - SearchMigratableResourcesRequest.create = function create(properties) { - return new SearchMigratableResourcesRequest(properties); + BatchMigrateResourcesResponse.create = function create(properties) { + return new BatchMigrateResourcesResponse(properties); }; /** - * Encodes the specified SearchMigratableResourcesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.verify|verify} messages. + * Encodes the specified BatchMigrateResourcesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @static - * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest} message SearchMigratableResourcesRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesResponse} message BatchMigrateResourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchMigratableResourcesRequest.encode = function encode(message, writer) { + BatchMigrateResourcesResponse.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 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.migrateResourceResponses != null && message.migrateResourceResponses.length) + for (var i = 0; i < message.migrateResourceResponses.length; ++i) + $root.google.cloud.aiplatform.v1.MigrateResourceResponse.encode(message.migrateResourceResponses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SearchMigratableResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.verify|verify} messages. + * Encodes the specified BatchMigrateResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @static - * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesRequest} message SearchMigratableResourcesRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesResponse} message BatchMigrateResourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchMigratableResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchMigrateResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchMigratableResourcesRequest message from the specified reader or buffer. + * Decodes a BatchMigrateResourcesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @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.SearchMigratableResourcesRequest} SearchMigratableResourcesRequest + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} BatchMigrateResourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchMigratableResourcesRequest.decode = function decode(reader, length) { + BatchMigrateResourcesResponse.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.SearchMigratableResourcesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); + if (!(message.migrateResourceResponses && message.migrateResourceResponses.length)) + message.migrateResourceResponses = []; + message.migrateResourceResponses.push($root.google.cloud.aiplatform.v1.MigrateResourceResponse.decode(reader, reader.uint32())); break; } default: @@ -118764,149 +123186,141 @@ }; /** - * Decodes a SearchMigratableResourcesRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchMigrateResourcesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} SearchMigratableResourcesRequest + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} BatchMigrateResourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchMigratableResourcesRequest.decodeDelimited = function decodeDelimited(reader) { + BatchMigrateResourcesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchMigratableResourcesRequest message. + * Verifies a BatchMigrateResourcesResponse message. * @function verify - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchMigratableResourcesRequest.verify = function verify(message) { + BatchMigrateResourcesResponse.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"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.migrateResourceResponses != null && message.hasOwnProperty("migrateResourceResponses")) { + if (!Array.isArray(message.migrateResourceResponses)) + return "migrateResourceResponses: array expected"; + for (var i = 0; i < message.migrateResourceResponses.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.MigrateResourceResponse.verify(message.migrateResourceResponses[i]); + if (error) + return "migrateResourceResponses." + error; + } + } return null; }; /** - * Creates a SearchMigratableResourcesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchMigrateResourcesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} SearchMigratableResourcesRequest + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} BatchMigrateResourcesResponse */ - SearchMigratableResourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest) + BatchMigrateResourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse) return object; - var message = new $root.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest(); - 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); - if (object.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse(); + if (object.migrateResourceResponses) { + if (!Array.isArray(object.migrateResourceResponses)) + throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.migrateResourceResponses: array expected"); + message.migrateResourceResponses = []; + for (var i = 0; i < object.migrateResourceResponses.length; ++i) { + if (typeof object.migrateResourceResponses[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.migrateResourceResponses: object expected"); + message.migrateResourceResponses[i] = $root.google.cloud.aiplatform.v1.MigrateResourceResponse.fromObject(object.migrateResourceResponses[i]); + } + } return message; }; /** - * Creates a plain object from a SearchMigratableResourcesRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchMigrateResourcesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @static - * @param {google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} message SearchMigratableResourcesRequest + * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} message BatchMigrateResourcesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchMigratableResourcesRequest.toObject = function toObject(message, options) { + BatchMigrateResourcesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; + if (options.arrays || options.defaults) + object.migrateResourceResponses = []; + if (message.migrateResourceResponses && message.migrateResourceResponses.length) { + object.migrateResourceResponses = []; + for (var j = 0; j < message.migrateResourceResponses.length; ++j) + object.migrateResourceResponses[j] = $root.google.cloud.aiplatform.v1.MigrateResourceResponse.toObject(message.migrateResourceResponses[j], options); } - 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; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; return object; }; /** - * Converts this SearchMigratableResourcesRequest to JSON. + * Converts this BatchMigrateResourcesResponse to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @instance * @returns {Object.} JSON object */ - SearchMigratableResourcesRequest.prototype.toJSON = function toJSON() { + BatchMigrateResourcesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SearchMigratableResourcesRequest + * Gets the default type url for BatchMigrateResourcesResponse * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SearchMigratableResourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchMigrateResourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.SearchMigratableResourcesRequest"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.BatchMigrateResourcesResponse"; }; - return SearchMigratableResourcesRequest; + return BatchMigrateResourcesResponse; })(); - v1.SearchMigratableResourcesResponse = (function() { + v1.MigrateResourceResponse = (function() { /** - * Properties of a SearchMigratableResourcesResponse. + * Properties of a MigrateResourceResponse. * @memberof google.cloud.aiplatform.v1 - * @interface ISearchMigratableResourcesResponse - * @property {Array.|null} [migratableResources] SearchMigratableResourcesResponse migratableResources - * @property {string|null} [nextPageToken] SearchMigratableResourcesResponse nextPageToken + * @interface IMigrateResourceResponse + * @property {string|null} [dataset] MigrateResourceResponse dataset + * @property {string|null} [model] MigrateResourceResponse model + * @property {google.cloud.aiplatform.v1.IMigratableResource|null} [migratableResource] MigrateResourceResponse migratableResource */ /** - * Constructs a new SearchMigratableResourcesResponse. + * Constructs a new MigrateResourceResponse. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a SearchMigratableResourcesResponse. - * @implements ISearchMigratableResourcesResponse + * @classdesc Represents a MigrateResourceResponse. + * @implements IMigrateResourceResponse * @constructor - * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesResponse=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.IMigrateResourceResponse=} [properties] Properties to set */ - function SearchMigratableResourcesResponse(properties) { - this.migratableResources = []; + function MigrateResourceResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118914,340 +123328,117 @@ } /** - * SearchMigratableResourcesResponse migratableResources. - * @member {Array.} migratableResources - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse + * MigrateResourceResponse dataset. + * @member {string|null|undefined} dataset + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @instance */ - SearchMigratableResourcesResponse.prototype.migratableResources = $util.emptyArray; + MigrateResourceResponse.prototype.dataset = null; /** - * SearchMigratableResourcesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse + * MigrateResourceResponse model. + * @member {string|null|undefined} model + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @instance */ - SearchMigratableResourcesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new SearchMigratableResourcesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse - * @static - * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesResponse=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} SearchMigratableResourcesResponse instance - */ - SearchMigratableResourcesResponse.create = function create(properties) { - return new SearchMigratableResourcesResponse(properties); - }; - - /** - * Encodes the specified SearchMigratableResourcesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse - * @static - * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesResponse} message SearchMigratableResourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchMigratableResourcesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.migratableResources != null && message.migratableResources.length) - for (var i = 0; i < message.migratableResources.length; ++i) - $root.google.cloud.aiplatform.v1.MigratableResource.encode(message.migratableResources[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 SearchMigratableResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse - * @static - * @param {google.cloud.aiplatform.v1.ISearchMigratableResourcesResponse} message SearchMigratableResourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchMigratableResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchMigratableResourcesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse - * @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.SearchMigratableResourcesResponse} SearchMigratableResourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchMigratableResourcesResponse.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.SearchMigratableResourcesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.migratableResources && message.migratableResources.length)) - message.migratableResources = []; - message.migratableResources.push($root.google.cloud.aiplatform.v1.MigratableResource.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchMigratableResourcesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} SearchMigratableResourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchMigratableResourcesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchMigratableResourcesResponse message. - * @function verify - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchMigratableResourcesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.migratableResources != null && message.hasOwnProperty("migratableResources")) { - if (!Array.isArray(message.migratableResources)) - return "migratableResources: array expected"; - for (var i = 0; i < message.migratableResources.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.MigratableResource.verify(message.migratableResources[i]); - if (error) - return "migratableResources." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a SearchMigratableResourcesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} SearchMigratableResourcesResponse - */ - SearchMigratableResourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse) - return object; - var message = new $root.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse(); - if (object.migratableResources) { - if (!Array.isArray(object.migratableResources)) - throw TypeError(".google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.migratableResources: array expected"); - message.migratableResources = []; - for (var i = 0; i < object.migratableResources.length; ++i) { - if (typeof object.migratableResources[i] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.migratableResources: object expected"); - message.migratableResources[i] = $root.google.cloud.aiplatform.v1.MigratableResource.fromObject(object.migratableResources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a SearchMigratableResourcesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse - * @static - * @param {google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} message SearchMigratableResourcesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchMigratableResourcesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.migratableResources = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.migratableResources && message.migratableResources.length) { - object.migratableResources = []; - for (var j = 0; j < message.migratableResources.length; ++j) - object.migratableResources[j] = $root.google.cloud.aiplatform.v1.MigratableResource.toObject(message.migratableResources[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + MigrateResourceResponse.prototype.model = null; /** - * Converts this SearchMigratableResourcesResponse to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse + * MigrateResourceResponse migratableResource. + * @member {google.cloud.aiplatform.v1.IMigratableResource|null|undefined} migratableResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @instance - * @returns {Object.} JSON object - */ - SearchMigratableResourcesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchMigratableResourcesResponse - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.SearchMigratableResourcesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchMigratableResourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.SearchMigratableResourcesResponse"; - }; - - return SearchMigratableResourcesResponse; - })(); - - v1.BatchMigrateResourcesRequest = (function() { - - /** - * Properties of a BatchMigrateResourcesRequest. - * @memberof google.cloud.aiplatform.v1 - * @interface IBatchMigrateResourcesRequest - * @property {string|null} [parent] BatchMigrateResourcesRequest parent - * @property {Array.|null} [migrateResourceRequests] BatchMigrateResourcesRequest migrateResourceRequests - */ - - /** - * Constructs a new BatchMigrateResourcesRequest. - * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a BatchMigrateResourcesRequest. - * @implements IBatchMigrateResourcesRequest - * @constructor - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest=} [properties] Properties to set */ - function BatchMigrateResourcesRequest(properties) { - this.migrateResourceRequests = []; - 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]]; - } + MigrateResourceResponse.prototype.migratableResource = null; - /** - * BatchMigrateResourcesRequest parent. - * @member {string} parent - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest - * @instance - */ - BatchMigrateResourcesRequest.prototype.parent = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * BatchMigrateResourcesRequest migrateResourceRequests. - * @member {Array.} migrateResourceRequests - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * MigrateResourceResponse migratedResource. + * @member {"dataset"|"model"|undefined} migratedResource + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @instance */ - BatchMigrateResourcesRequest.prototype.migrateResourceRequests = $util.emptyArray; + Object.defineProperty(MigrateResourceResponse.prototype, "migratedResource", { + get: $util.oneOfGetter($oneOfFields = ["dataset", "model"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new BatchMigrateResourcesRequest instance using the specified properties. + * Creates a new MigrateResourceResponse instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @static - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} BatchMigrateResourcesRequest instance + * @param {google.cloud.aiplatform.v1.IMigrateResourceResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MigrateResourceResponse} MigrateResourceResponse instance */ - BatchMigrateResourcesRequest.create = function create(properties) { - return new BatchMigrateResourcesRequest(properties); + MigrateResourceResponse.create = function create(properties) { + return new MigrateResourceResponse(properties); }; /** - * Encodes the specified BatchMigrateResourcesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.verify|verify} messages. + * Encodes the specified MigrateResourceResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @static - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest} message BatchMigrateResourcesRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.IMigrateResourceResponse} message MigrateResourceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchMigrateResourcesRequest.encode = function encode(message, writer) { + MigrateResourceResponse.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.migrateResourceRequests != null && message.migrateResourceRequests.length) - for (var i = 0; i < message.migrateResourceRequests.length; ++i) - $root.google.cloud.aiplatform.v1.MigrateResourceRequest.encode(message.migrateResourceRequests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.model); + if (message.migratableResource != null && Object.hasOwnProperty.call(message, "migratableResource")) + $root.google.cloud.aiplatform.v1.MigratableResource.encode(message.migratableResource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchMigrateResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.verify|verify} messages. + * Encodes the specified MigrateResourceResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @static - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesRequest} message BatchMigrateResourcesRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.IMigrateResourceResponse} message MigrateResourceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchMigrateResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + MigrateResourceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchMigrateResourcesRequest message from the specified reader or buffer. + * Decodes a MigrateResourceResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @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.BatchMigrateResourcesRequest} BatchMigrateResourcesRequest + * @returns {google.cloud.aiplatform.v1.MigrateResourceResponse} MigrateResourceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchMigrateResourcesRequest.decode = function decode(reader, length) { + MigrateResourceResponse.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.BatchMigrateResourcesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MigrateResourceResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.dataset = reader.string(); break; } case 2: { - if (!(message.migrateResourceRequests && message.migrateResourceRequests.length)) - message.migrateResourceRequests = []; - message.migrateResourceRequests.push($root.google.cloud.aiplatform.v1.MigrateResourceRequest.decode(reader, reader.uint32())); + message.model = reader.string(); + break; + } + case 3: { + message.migratableResource = $root.google.cloud.aiplatform.v1.MigratableResource.decode(reader, reader.uint32()); break; } default: @@ -119259,151 +123450,156 @@ }; /** - * Decodes a BatchMigrateResourcesRequest message from the specified reader or buffer, length delimited. + * Decodes a MigrateResourceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} BatchMigrateResourcesRequest + * @returns {google.cloud.aiplatform.v1.MigrateResourceResponse} MigrateResourceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchMigrateResourcesRequest.decodeDelimited = function decodeDelimited(reader) { + MigrateResourceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchMigrateResourcesRequest message. + * Verifies a MigrateResourceResponse message. * @function verify - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchMigrateResourcesRequest.verify = function verify(message) { + MigrateResourceResponse.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.migrateResourceRequests != null && message.hasOwnProperty("migrateResourceRequests")) { - if (!Array.isArray(message.migrateResourceRequests)) - return "migrateResourceRequests: array expected"; - for (var i = 0; i < message.migrateResourceRequests.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.verify(message.migrateResourceRequests[i]); - if (error) - return "migrateResourceRequests." + error; - } + var properties = {}; + if (message.dataset != null && message.hasOwnProperty("dataset")) { + properties.migratedResource = 1; + if (!$util.isString(message.dataset)) + return "dataset: string expected"; + } + if (message.model != null && message.hasOwnProperty("model")) { + if (properties.migratedResource === 1) + return "migratedResource: multiple values"; + properties.migratedResource = 1; + if (!$util.isString(message.model)) + return "model: string expected"; + } + if (message.migratableResource != null && message.hasOwnProperty("migratableResource")) { + var error = $root.google.cloud.aiplatform.v1.MigratableResource.verify(message.migratableResource); + if (error) + return "migratableResource." + error; } return null; }; /** - * Creates a BatchMigrateResourcesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MigrateResourceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} BatchMigrateResourcesRequest + * @returns {google.cloud.aiplatform.v1.MigrateResourceResponse} MigrateResourceResponse */ - BatchMigrateResourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest) + MigrateResourceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceResponse) return object; - var message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.migrateResourceRequests) { - if (!Array.isArray(object.migrateResourceRequests)) - throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.migrateResourceRequests: array expected"); - message.migrateResourceRequests = []; - for (var i = 0; i < object.migrateResourceRequests.length; ++i) { - if (typeof object.migrateResourceRequests[i] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.migrateResourceRequests: object expected"); - message.migrateResourceRequests[i] = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.fromObject(object.migrateResourceRequests[i]); - } + var message = new $root.google.cloud.aiplatform.v1.MigrateResourceResponse(); + if (object.dataset != null) + message.dataset = String(object.dataset); + if (object.model != null) + message.model = String(object.model); + if (object.migratableResource != null) { + if (typeof object.migratableResource !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceResponse.migratableResource: object expected"); + message.migratableResource = $root.google.cloud.aiplatform.v1.MigratableResource.fromObject(object.migratableResource); } return message; }; /** - * Creates a plain object from a BatchMigrateResourcesRequest message. Also converts values to other types if specified. + * Creates a plain object from a MigrateResourceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @static - * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} message BatchMigrateResourcesRequest + * @param {google.cloud.aiplatform.v1.MigrateResourceResponse} message MigrateResourceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchMigrateResourcesRequest.toObject = function toObject(message, options) { + MigrateResourceResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.migrateResourceRequests = []; if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.migrateResourceRequests && message.migrateResourceRequests.length) { - object.migrateResourceRequests = []; - for (var j = 0; j < message.migrateResourceRequests.length; ++j) - object.migrateResourceRequests[j] = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.toObject(message.migrateResourceRequests[j], options); + object.migratableResource = null; + if (message.dataset != null && message.hasOwnProperty("dataset")) { + object.dataset = message.dataset; + if (options.oneofs) + object.migratedResource = "dataset"; + } + if (message.model != null && message.hasOwnProperty("model")) { + object.model = message.model; + if (options.oneofs) + object.migratedResource = "model"; } + if (message.migratableResource != null && message.hasOwnProperty("migratableResource")) + object.migratableResource = $root.google.cloud.aiplatform.v1.MigratableResource.toObject(message.migratableResource, options); return object; }; /** - * Converts this BatchMigrateResourcesRequest to JSON. + * Converts this MigrateResourceResponse to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @instance * @returns {Object.} JSON object */ - BatchMigrateResourcesRequest.prototype.toJSON = function toJSON() { + MigrateResourceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BatchMigrateResourcesRequest + * Gets the default type url for MigrateResourceResponse * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BatchMigrateResourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrateResourceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.BatchMigrateResourcesRequest"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceResponse"; }; - return BatchMigrateResourcesRequest; + return MigrateResourceResponse; })(); - v1.MigrateResourceRequest = (function() { + v1.BatchMigrateResourcesOperationMetadata = (function() { /** - * Properties of a MigrateResourceRequest. + * Properties of a BatchMigrateResourcesOperationMetadata. * @memberof google.cloud.aiplatform.v1 - * @interface IMigrateResourceRequest - * @property {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig|null} [migrateMlEngineModelVersionConfig] MigrateResourceRequest migrateMlEngineModelVersionConfig - * @property {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig|null} [migrateAutomlModelConfig] MigrateResourceRequest migrateAutomlModelConfig - * @property {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig|null} [migrateAutomlDatasetConfig] MigrateResourceRequest migrateAutomlDatasetConfig - * @property {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig|null} [migrateDataLabelingDatasetConfig] MigrateResourceRequest migrateDataLabelingDatasetConfig + * @interface IBatchMigrateResourcesOperationMetadata + * @property {google.cloud.aiplatform.v1.IGenericOperationMetadata|null} [genericMetadata] BatchMigrateResourcesOperationMetadata genericMetadata + * @property {Array.|null} [partialResults] BatchMigrateResourcesOperationMetadata partialResults */ /** - * Constructs a new MigrateResourceRequest. + * Constructs a new BatchMigrateResourcesOperationMetadata. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a MigrateResourceRequest. - * @implements IMigrateResourceRequest + * @classdesc Represents a BatchMigrateResourcesOperationMetadata. + * @implements IBatchMigrateResourcesOperationMetadata * @constructor - * @param {google.cloud.aiplatform.v1.IMigrateResourceRequest=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesOperationMetadata=} [properties] Properties to set */ - function MigrateResourceRequest(properties) { + function BatchMigrateResourcesOperationMetadata(properties) { + this.partialResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119411,131 +123607,92 @@ } /** - * MigrateResourceRequest migrateMlEngineModelVersionConfig. - * @member {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig|null|undefined} migrateMlEngineModelVersionConfig - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @instance - */ - MigrateResourceRequest.prototype.migrateMlEngineModelVersionConfig = null; - - /** - * MigrateResourceRequest migrateAutomlModelConfig. - * @member {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig|null|undefined} migrateAutomlModelConfig - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @instance - */ - MigrateResourceRequest.prototype.migrateAutomlModelConfig = null; - - /** - * MigrateResourceRequest migrateAutomlDatasetConfig. - * @member {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig|null|undefined} migrateAutomlDatasetConfig - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @instance - */ - MigrateResourceRequest.prototype.migrateAutomlDatasetConfig = null; - - /** - * MigrateResourceRequest migrateDataLabelingDatasetConfig. - * @member {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig|null|undefined} migrateDataLabelingDatasetConfig - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * BatchMigrateResourcesOperationMetadata genericMetadata. + * @member {google.cloud.aiplatform.v1.IGenericOperationMetadata|null|undefined} genericMetadata + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @instance */ - MigrateResourceRequest.prototype.migrateDataLabelingDatasetConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + BatchMigrateResourcesOperationMetadata.prototype.genericMetadata = null; /** - * MigrateResourceRequest request. - * @member {"migrateMlEngineModelVersionConfig"|"migrateAutomlModelConfig"|"migrateAutomlDatasetConfig"|"migrateDataLabelingDatasetConfig"|undefined} request - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * BatchMigrateResourcesOperationMetadata partialResults. + * @member {Array.} partialResults + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @instance */ - Object.defineProperty(MigrateResourceRequest.prototype, "request", { - get: $util.oneOfGetter($oneOfFields = ["migrateMlEngineModelVersionConfig", "migrateAutomlModelConfig", "migrateAutomlDatasetConfig", "migrateDataLabelingDatasetConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchMigrateResourcesOperationMetadata.prototype.partialResults = $util.emptyArray; /** - * Creates a new MigrateResourceRequest instance using the specified properties. + * Creates a new BatchMigrateResourcesOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @static - * @param {google.cloud.aiplatform.v1.IMigrateResourceRequest=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest} MigrateResourceRequest instance + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} BatchMigrateResourcesOperationMetadata instance */ - MigrateResourceRequest.create = function create(properties) { - return new MigrateResourceRequest(properties); + BatchMigrateResourcesOperationMetadata.create = function create(properties) { + return new BatchMigrateResourcesOperationMetadata(properties); }; /** - * Encodes the specified MigrateResourceRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.verify|verify} messages. + * Encodes the specified BatchMigrateResourcesOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @static - * @param {google.cloud.aiplatform.v1.IMigrateResourceRequest} message MigrateResourceRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesOperationMetadata} message BatchMigrateResourcesOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateResourceRequest.encode = function encode(message, writer) { + BatchMigrateResourcesOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.migrateMlEngineModelVersionConfig != null && Object.hasOwnProperty.call(message, "migrateMlEngineModelVersionConfig")) - $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.encode(message.migrateMlEngineModelVersionConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.migrateAutomlModelConfig != null && Object.hasOwnProperty.call(message, "migrateAutomlModelConfig")) - $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.encode(message.migrateAutomlModelConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.migrateAutomlDatasetConfig != null && Object.hasOwnProperty.call(message, "migrateAutomlDatasetConfig")) - $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.encode(message.migrateAutomlDatasetConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.migrateDataLabelingDatasetConfig != null && Object.hasOwnProperty.call(message, "migrateDataLabelingDatasetConfig")) - $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.encode(message.migrateDataLabelingDatasetConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.genericMetadata != null && Object.hasOwnProperty.call(message, "genericMetadata")) + $root.google.cloud.aiplatform.v1.GenericOperationMetadata.encode(message.genericMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.partialResults != null && message.partialResults.length) + for (var i = 0; i < message.partialResults.length; ++i) + $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.encode(message.partialResults[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified MigrateResourceRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.verify|verify} messages. + * Encodes the specified BatchMigrateResourcesOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @static - * @param {google.cloud.aiplatform.v1.IMigrateResourceRequest} message MigrateResourceRequest message or plain object to encode + * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesOperationMetadata} message BatchMigrateResourcesOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateResourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchMigrateResourcesOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrateResourceRequest message from the specified reader or buffer. + * Decodes a BatchMigrateResourcesOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @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.MigrateResourceRequest} MigrateResourceRequest + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} BatchMigrateResourcesOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateResourceRequest.decode = function decode(reader, length) { + BatchMigrateResourcesOperationMetadata.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.MigrateResourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.migrateMlEngineModelVersionConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.decode(reader, reader.uint32()); + message.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.decode(reader, reader.uint32()); break; } case 2: { - message.migrateAutomlModelConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.migrateAutomlDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.decode(reader, reader.uint32()); - break; - } - case 4: { - message.migrateDataLabelingDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.decode(reader, reader.uint32()); + if (!(message.partialResults && message.partialResults.length)) + message.partialResults = []; + message.partialResults.push($root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.decode(reader, reader.uint32())); break; } default: @@ -119547,191 +123704,153 @@ }; /** - * Decodes a MigrateResourceRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchMigrateResourcesOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest} MigrateResourceRequest + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} BatchMigrateResourcesOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateResourceRequest.decodeDelimited = function decodeDelimited(reader) { + BatchMigrateResourcesOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrateResourceRequest message. + * Verifies a BatchMigrateResourcesOperationMetadata message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrateResourceRequest.verify = function verify(message) { + BatchMigrateResourcesOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.migrateMlEngineModelVersionConfig != null && message.hasOwnProperty("migrateMlEngineModelVersionConfig")) { - properties.request = 1; - { - var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.verify(message.migrateMlEngineModelVersionConfig); - if (error) - return "migrateMlEngineModelVersionConfig." + error; - } - } - if (message.migrateAutomlModelConfig != null && message.hasOwnProperty("migrateAutomlModelConfig")) { - if (properties.request === 1) - return "request: multiple values"; - properties.request = 1; - { - var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.verify(message.migrateAutomlModelConfig); - if (error) - return "migrateAutomlModelConfig." + error; - } - } - if (message.migrateAutomlDatasetConfig != null && message.hasOwnProperty("migrateAutomlDatasetConfig")) { - if (properties.request === 1) - return "request: multiple values"; - properties.request = 1; - { - var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.verify(message.migrateAutomlDatasetConfig); - if (error) - return "migrateAutomlDatasetConfig." + error; - } + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) { + var error = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.verify(message.genericMetadata); + if (error) + return "genericMetadata." + error; } - if (message.migrateDataLabelingDatasetConfig != null && message.hasOwnProperty("migrateDataLabelingDatasetConfig")) { - if (properties.request === 1) - return "request: multiple values"; - properties.request = 1; - { - var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.verify(message.migrateDataLabelingDatasetConfig); + if (message.partialResults != null && message.hasOwnProperty("partialResults")) { + if (!Array.isArray(message.partialResults)) + return "partialResults: array expected"; + for (var i = 0; i < message.partialResults.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.verify(message.partialResults[i]); if (error) - return "migrateDataLabelingDatasetConfig." + error; + return "partialResults." + error; } } return null; }; /** - * Creates a MigrateResourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchMigrateResourcesOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest} MigrateResourceRequest + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} BatchMigrateResourcesOperationMetadata */ - MigrateResourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest) + BatchMigrateResourcesOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata) return object; - var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest(); - if (object.migrateMlEngineModelVersionConfig != null) { - if (typeof object.migrateMlEngineModelVersionConfig !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.migrateMlEngineModelVersionConfig: object expected"); - message.migrateMlEngineModelVersionConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.fromObject(object.migrateMlEngineModelVersionConfig); - } - if (object.migrateAutomlModelConfig != null) { - if (typeof object.migrateAutomlModelConfig !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.migrateAutomlModelConfig: object expected"); - message.migrateAutomlModelConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.fromObject(object.migrateAutomlModelConfig); - } - if (object.migrateAutomlDatasetConfig != null) { - if (typeof object.migrateAutomlDatasetConfig !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.migrateAutomlDatasetConfig: object expected"); - message.migrateAutomlDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.fromObject(object.migrateAutomlDatasetConfig); + var message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata(); + if (object.genericMetadata != null) { + if (typeof object.genericMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.genericMetadata: object expected"); + message.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.fromObject(object.genericMetadata); } - if (object.migrateDataLabelingDatasetConfig != null) { - if (typeof object.migrateDataLabelingDatasetConfig !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.migrateDataLabelingDatasetConfig: object expected"); - message.migrateDataLabelingDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.fromObject(object.migrateDataLabelingDatasetConfig); + if (object.partialResults) { + if (!Array.isArray(object.partialResults)) + throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.partialResults: array expected"); + message.partialResults = []; + for (var i = 0; i < object.partialResults.length; ++i) { + if (typeof object.partialResults[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.partialResults: object expected"); + message.partialResults[i] = $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.fromObject(object.partialResults[i]); + } } return message; }; /** - * Creates a plain object from a MigrateResourceRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchMigrateResourcesOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest} message MigrateResourceRequest + * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} message BatchMigrateResourcesOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrateResourceRequest.toObject = function toObject(message, options) { + BatchMigrateResourcesOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.migrateMlEngineModelVersionConfig != null && message.hasOwnProperty("migrateMlEngineModelVersionConfig")) { - object.migrateMlEngineModelVersionConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.toObject(message.migrateMlEngineModelVersionConfig, options); - if (options.oneofs) - object.request = "migrateMlEngineModelVersionConfig"; - } - if (message.migrateAutomlModelConfig != null && message.hasOwnProperty("migrateAutomlModelConfig")) { - object.migrateAutomlModelConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.toObject(message.migrateAutomlModelConfig, options); - if (options.oneofs) - object.request = "migrateAutomlModelConfig"; - } - if (message.migrateAutomlDatasetConfig != null && message.hasOwnProperty("migrateAutomlDatasetConfig")) { - object.migrateAutomlDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.toObject(message.migrateAutomlDatasetConfig, options); - if (options.oneofs) - object.request = "migrateAutomlDatasetConfig"; - } - if (message.migrateDataLabelingDatasetConfig != null && message.hasOwnProperty("migrateDataLabelingDatasetConfig")) { - object.migrateDataLabelingDatasetConfig = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.toObject(message.migrateDataLabelingDatasetConfig, options); - if (options.oneofs) - object.request = "migrateDataLabelingDatasetConfig"; + if (options.arrays || options.defaults) + object.partialResults = []; + if (options.defaults) + object.genericMetadata = null; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) + object.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.toObject(message.genericMetadata, options); + if (message.partialResults && message.partialResults.length) { + object.partialResults = []; + for (var j = 0; j < message.partialResults.length; ++j) + object.partialResults[j] = $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.toObject(message.partialResults[j], options); } return object; }; /** - * Converts this MigrateResourceRequest to JSON. + * Converts this BatchMigrateResourcesOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @instance * @returns {Object.} JSON object */ - MigrateResourceRequest.prototype.toJSON = function toJSON() { + BatchMigrateResourcesOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrateResourceRequest + * Gets the default type url for BatchMigrateResourcesOperationMetadata * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrateResourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchMigrateResourcesOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata"; }; - MigrateResourceRequest.MigrateMlEngineModelVersionConfig = (function() { + BatchMigrateResourcesOperationMetadata.PartialResult = (function() { /** - * Properties of a MigrateMlEngineModelVersionConfig. - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @interface IMigrateMlEngineModelVersionConfig - * @property {string|null} [endpoint] MigrateMlEngineModelVersionConfig endpoint - * @property {string|null} [modelVersion] MigrateMlEngineModelVersionConfig modelVersion - * @property {string|null} [modelDisplayName] MigrateMlEngineModelVersionConfig modelDisplayName + * Properties of a PartialResult. + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + * @interface IPartialResult + * @property {google.rpc.IStatus|null} [error] PartialResult error + * @property {string|null} [model] PartialResult model + * @property {string|null} [dataset] PartialResult dataset + * @property {google.cloud.aiplatform.v1.IMigrateResourceRequest|null} [request] PartialResult request */ /** - * Constructs a new MigrateMlEngineModelVersionConfig. - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @classdesc Represents a MigrateMlEngineModelVersionConfig. - * @implements IMigrateMlEngineModelVersionConfig + * Constructs a new PartialResult. + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + * @classdesc Represents a PartialResult. + * @implements IPartialResult * @constructor - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.IPartialResult=} [properties] Properties to set */ - function MigrateMlEngineModelVersionConfig(properties) { + function PartialResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119739,103 +123858,131 @@ } /** - * MigrateMlEngineModelVersionConfig endpoint. - * @member {string} endpoint - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * PartialResult error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @instance */ - MigrateMlEngineModelVersionConfig.prototype.endpoint = ""; + PartialResult.prototype.error = null; /** - * MigrateMlEngineModelVersionConfig modelVersion. - * @member {string} modelVersion - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * PartialResult model. + * @member {string|null|undefined} model + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @instance */ - MigrateMlEngineModelVersionConfig.prototype.modelVersion = ""; + PartialResult.prototype.model = null; /** - * MigrateMlEngineModelVersionConfig modelDisplayName. - * @member {string} modelDisplayName - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * PartialResult dataset. + * @member {string|null|undefined} dataset + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @instance */ - MigrateMlEngineModelVersionConfig.prototype.modelDisplayName = ""; + PartialResult.prototype.dataset = null; /** - * Creates a new MigrateMlEngineModelVersionConfig instance using the specified properties. + * PartialResult request. + * @member {google.cloud.aiplatform.v1.IMigrateResourceRequest|null|undefined} request + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + * @instance + */ + PartialResult.prototype.request = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PartialResult result. + * @member {"error"|"model"|"dataset"|undefined} result + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + * @instance + */ + Object.defineProperty(PartialResult.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "model", "dataset"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PartialResult instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} MigrateMlEngineModelVersionConfig instance + * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.IPartialResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} PartialResult instance */ - MigrateMlEngineModelVersionConfig.create = function create(properties) { - return new MigrateMlEngineModelVersionConfig(properties); + PartialResult.create = function create(properties) { + return new PartialResult(properties); }; /** - * Encodes the specified MigrateMlEngineModelVersionConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.verify|verify} messages. + * Encodes the specified PartialResult message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig} message MigrateMlEngineModelVersionConfig message or plain object to encode + * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.IPartialResult} message PartialResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateMlEngineModelVersionConfig.encode = function encode(message, writer) { + PartialResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.endpoint); - if (message.modelVersion != null && Object.hasOwnProperty.call(message, "modelVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.modelVersion); - if (message.modelDisplayName != null && Object.hasOwnProperty.call(message, "modelDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.modelDisplayName); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.aiplatform.v1.MigrateResourceRequest.encode(message.request, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.model); + if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataset); return writer; }; /** - * Encodes the specified MigrateMlEngineModelVersionConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.verify|verify} messages. + * Encodes the specified PartialResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateMlEngineModelVersionConfig} message MigrateMlEngineModelVersionConfig message or plain object to encode + * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.IPartialResult} message PartialResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateMlEngineModelVersionConfig.encodeDelimited = function encodeDelimited(message, writer) { + PartialResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrateMlEngineModelVersionConfig message from the specified reader or buffer. + * Decodes a PartialResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @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.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} MigrateMlEngineModelVersionConfig + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} PartialResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateMlEngineModelVersionConfig.decode = function decode(reader, length) { + PartialResult.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.MigrateResourceRequest.MigrateMlEngineModelVersionConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.endpoint = reader.string(); - break; - } case 2: { - message.modelVersion = reader.string(); + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); break; } case 3: { - message.modelDisplayName = reader.string(); + message.model = reader.string(); + break; + } + case 4: { + message.dataset = reader.string(); + break; + } + case 1: { + message.request = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.decode(reader, reader.uint32()); break; } default: @@ -119847,140 +123994,668 @@ }; /** - * Decodes a MigrateMlEngineModelVersionConfig message from the specified reader or buffer, length delimited. + * Decodes a PartialResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} MigrateMlEngineModelVersionConfig + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} PartialResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateMlEngineModelVersionConfig.decodeDelimited = function decodeDelimited(reader) { + PartialResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrateMlEngineModelVersionConfig message. + * Verifies a PartialResult message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrateMlEngineModelVersionConfig.verify = function verify(message) { + PartialResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - if (!$util.isString(message.endpoint)) - return "endpoint: string expected"; - if (message.modelVersion != null && message.hasOwnProperty("modelVersion")) - if (!$util.isString(message.modelVersion)) - return "modelVersion: string expected"; - if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) - if (!$util.isString(message.modelDisplayName)) - return "modelDisplayName: string expected"; + var properties = {}; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.model != null && message.hasOwnProperty("model")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + if (!$util.isString(message.model)) + return "model: string expected"; + } + if (message.dataset != null && message.hasOwnProperty("dataset")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + if (!$util.isString(message.dataset)) + return "dataset: string expected"; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.verify(message.request); + if (error) + return "request." + error; + } return null; }; /** - * Creates a MigrateMlEngineModelVersionConfig message from a plain object. Also converts values to their respective internal types. + * Creates a PartialResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} MigrateMlEngineModelVersionConfig + * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} PartialResult */ - MigrateMlEngineModelVersionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig) + PartialResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult) return object; - var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig(); - if (object.endpoint != null) - message.endpoint = String(object.endpoint); - if (object.modelVersion != null) - message.modelVersion = String(object.modelVersion); - if (object.modelDisplayName != null) - message.modelDisplayName = String(object.modelDisplayName); + var message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult(); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.model != null) + message.model = String(object.model); + if (object.dataset != null) + message.dataset = String(object.dataset); + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.request: object expected"); + message.request = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.fromObject(object.request); + } return message; }; /** - * Creates a plain object from a MigrateMlEngineModelVersionConfig message. Also converts values to other types if specified. + * Creates a plain object from a PartialResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} message MigrateMlEngineModelVersionConfig + * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} message PartialResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrateMlEngineModelVersionConfig.toObject = function toObject(message, options) { + PartialResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.endpoint = ""; - object.modelVersion = ""; - object.modelDisplayName = ""; + if (options.defaults) + object.request = null; + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.toObject(message.request, options); + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.model != null && message.hasOwnProperty("model")) { + object.model = message.model; + if (options.oneofs) + object.result = "model"; + } + if (message.dataset != null && message.hasOwnProperty("dataset")) { + object.dataset = message.dataset; + if (options.oneofs) + object.result = "dataset"; + } + return object; + }; + + /** + * Converts this PartialResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + * @instance + * @returns {Object.} JSON object + */ + PartialResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartialResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartialResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult"; + }; + + return PartialResult; + })(); + + return BatchMigrateResourcesOperationMetadata; + })(); + + v1.ModelEvaluation = (function() { + + /** + * Properties of a ModelEvaluation. + * @memberof google.cloud.aiplatform.v1 + * @interface IModelEvaluation + * @property {string|null} [name] ModelEvaluation name + * @property {string|null} [displayName] ModelEvaluation displayName + * @property {string|null} [metricsSchemaUri] ModelEvaluation metricsSchemaUri + * @property {google.protobuf.IValue|null} [metrics] ModelEvaluation metrics + * @property {google.protobuf.ITimestamp|null} [createTime] ModelEvaluation createTime + * @property {Array.|null} [sliceDimensions] ModelEvaluation sliceDimensions + * @property {string|null} [dataItemSchemaUri] ModelEvaluation dataItemSchemaUri + * @property {string|null} [annotationSchemaUri] ModelEvaluation annotationSchemaUri + * @property {google.cloud.aiplatform.v1.IModelExplanation|null} [modelExplanation] ModelEvaluation modelExplanation + * @property {Array.|null} [explanationSpecs] ModelEvaluation explanationSpecs + * @property {google.protobuf.IValue|null} [metadata] ModelEvaluation metadata + */ + + /** + * Constructs a new ModelEvaluation. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a ModelEvaluation. + * @implements IModelEvaluation + * @constructor + * @param {google.cloud.aiplatform.v1.IModelEvaluation=} [properties] Properties to set + */ + function ModelEvaluation(properties) { + this.sliceDimensions = []; + this.explanationSpecs = []; + 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]]; + } + + /** + * ModelEvaluation name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.name = ""; + + /** + * ModelEvaluation displayName. + * @member {string} displayName + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.displayName = ""; + + /** + * ModelEvaluation metricsSchemaUri. + * @member {string} metricsSchemaUri + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.metricsSchemaUri = ""; + + /** + * ModelEvaluation metrics. + * @member {google.protobuf.IValue|null|undefined} metrics + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.metrics = null; + + /** + * ModelEvaluation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.createTime = null; + + /** + * ModelEvaluation sliceDimensions. + * @member {Array.} sliceDimensions + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.sliceDimensions = $util.emptyArray; + + /** + * ModelEvaluation dataItemSchemaUri. + * @member {string} dataItemSchemaUri + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.dataItemSchemaUri = ""; + + /** + * ModelEvaluation annotationSchemaUri. + * @member {string} annotationSchemaUri + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.annotationSchemaUri = ""; + + /** + * ModelEvaluation modelExplanation. + * @member {google.cloud.aiplatform.v1.IModelExplanation|null|undefined} modelExplanation + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.modelExplanation = null; + + /** + * ModelEvaluation explanationSpecs. + * @member {Array.} explanationSpecs + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.explanationSpecs = $util.emptyArray; + + /** + * ModelEvaluation metadata. + * @member {google.protobuf.IValue|null|undefined} metadata + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + */ + ModelEvaluation.prototype.metadata = null; + + /** + * Creates a new ModelEvaluation instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @static + * @param {google.cloud.aiplatform.v1.IModelEvaluation=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluation} ModelEvaluation instance + */ + ModelEvaluation.create = function create(properties) { + return new ModelEvaluation(properties); + }; + + /** + * Encodes the specified ModelEvaluation message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluation.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @static + * @param {google.cloud.aiplatform.v1.IModelEvaluation} message ModelEvaluation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModelEvaluation.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.metricsSchemaUri != null && Object.hasOwnProperty.call(message, "metricsSchemaUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metricsSchemaUri); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.protobuf.Value.encode(message.metrics, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sliceDimensions != null && message.sliceDimensions.length) + for (var i = 0; i < message.sliceDimensions.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.sliceDimensions[i]); + if (message.dataItemSchemaUri != null && Object.hasOwnProperty.call(message, "dataItemSchemaUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.dataItemSchemaUri); + if (message.annotationSchemaUri != null && Object.hasOwnProperty.call(message, "annotationSchemaUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.annotationSchemaUri); + if (message.modelExplanation != null && Object.hasOwnProperty.call(message, "modelExplanation")) + $root.google.cloud.aiplatform.v1.ModelExplanation.encode(message.modelExplanation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.explanationSpecs != null && message.explanationSpecs.length) + for (var i = 0; i < message.explanationSpecs.length; ++i) + $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.encode(message.explanationSpecs[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.displayName); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Value.encode(message.metadata, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ModelEvaluation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @static + * @param {google.cloud.aiplatform.v1.IModelEvaluation} message ModelEvaluation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModelEvaluation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModelEvaluation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @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.ModelEvaluation} ModelEvaluation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModelEvaluation.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.ModelEvaluation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 10: { + message.displayName = reader.string(); + break; + } + case 2: { + message.metricsSchemaUri = reader.string(); + break; + } + case 3: { + message.metrics = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.sliceDimensions && message.sliceDimensions.length)) + message.sliceDimensions = []; + message.sliceDimensions.push(reader.string()); + break; + } + case 6: { + message.dataItemSchemaUri = reader.string(); + break; + } + case 7: { + message.annotationSchemaUri = reader.string(); + break; + } + case 8: { + message.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.explanationSpecs && message.explanationSpecs.length)) + message.explanationSpecs = []; + message.explanationSpecs.push($root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.decode(reader, reader.uint32())); + break; + } + case 11: { + message.metadata = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModelEvaluation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ModelEvaluation} ModelEvaluation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModelEvaluation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModelEvaluation message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModelEvaluation.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.metricsSchemaUri != null && message.hasOwnProperty("metricsSchemaUri")) + if (!$util.isString(message.metricsSchemaUri)) + return "metricsSchemaUri: string expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.protobuf.Value.verify(message.metrics); + if (error) + return "metrics." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.sliceDimensions != null && message.hasOwnProperty("sliceDimensions")) { + if (!Array.isArray(message.sliceDimensions)) + return "sliceDimensions: array expected"; + for (var i = 0; i < message.sliceDimensions.length; ++i) + if (!$util.isString(message.sliceDimensions[i])) + return "sliceDimensions: string[] expected"; + } + if (message.dataItemSchemaUri != null && message.hasOwnProperty("dataItemSchemaUri")) + if (!$util.isString(message.dataItemSchemaUri)) + return "dataItemSchemaUri: string expected"; + if (message.annotationSchemaUri != null && message.hasOwnProperty("annotationSchemaUri")) + if (!$util.isString(message.annotationSchemaUri)) + return "annotationSchemaUri: string expected"; + if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) { + var error = $root.google.cloud.aiplatform.v1.ModelExplanation.verify(message.modelExplanation); + if (error) + return "modelExplanation." + error; + } + if (message.explanationSpecs != null && message.hasOwnProperty("explanationSpecs")) { + if (!Array.isArray(message.explanationSpecs)) + return "explanationSpecs: array expected"; + for (var i = 0; i < message.explanationSpecs.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.verify(message.explanationSpecs[i]); + if (error) + return "explanationSpecs." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Value.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a ModelEvaluation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ModelEvaluation} ModelEvaluation + */ + ModelEvaluation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluation) + return object; + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluation(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.metricsSchemaUri != null) + message.metricsSchemaUri = String(object.metricsSchemaUri); + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.metrics: object expected"); + message.metrics = $root.google.protobuf.Value.fromObject(object.metrics); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.sliceDimensions) { + if (!Array.isArray(object.sliceDimensions)) + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.sliceDimensions: array expected"); + message.sliceDimensions = []; + for (var i = 0; i < object.sliceDimensions.length; ++i) + message.sliceDimensions[i] = String(object.sliceDimensions[i]); + } + if (object.dataItemSchemaUri != null) + message.dataItemSchemaUri = String(object.dataItemSchemaUri); + if (object.annotationSchemaUri != null) + message.annotationSchemaUri = String(object.annotationSchemaUri); + if (object.modelExplanation != null) { + if (typeof object.modelExplanation !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.modelExplanation: object expected"); + message.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.fromObject(object.modelExplanation); + } + if (object.explanationSpecs) { + if (!Array.isArray(object.explanationSpecs)) + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.explanationSpecs: array expected"); + message.explanationSpecs = []; + for (var i = 0; i < object.explanationSpecs.length; ++i) { + if (typeof object.explanationSpecs[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.explanationSpecs: object expected"); + message.explanationSpecs[i] = $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.fromObject(object.explanationSpecs[i]); } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - object.endpoint = message.endpoint; - if (message.modelVersion != null && message.hasOwnProperty("modelVersion")) - object.modelVersion = message.modelVersion; - if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) - object.modelDisplayName = message.modelDisplayName; - return object; - }; + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.metadata: object expected"); + message.metadata = $root.google.protobuf.Value.fromObject(object.metadata); + } + return message; + }; - /** - * Converts this MigrateMlEngineModelVersionConfig to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig - * @instance - * @returns {Object.} JSON object - */ - MigrateMlEngineModelVersionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ModelEvaluation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluation} message ModelEvaluation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModelEvaluation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.sliceDimensions = []; + object.explanationSpecs = []; + } + if (options.defaults) { + object.name = ""; + object.metricsSchemaUri = ""; + object.metrics = null; + object.createTime = null; + object.dataItemSchemaUri = ""; + object.annotationSchemaUri = ""; + object.modelExplanation = null; + object.displayName = ""; + object.metadata = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metricsSchemaUri != null && message.hasOwnProperty("metricsSchemaUri")) + object.metricsSchemaUri = message.metricsSchemaUri; + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.protobuf.Value.toObject(message.metrics, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.sliceDimensions && message.sliceDimensions.length) { + object.sliceDimensions = []; + for (var j = 0; j < message.sliceDimensions.length; ++j) + object.sliceDimensions[j] = message.sliceDimensions[j]; + } + if (message.dataItemSchemaUri != null && message.hasOwnProperty("dataItemSchemaUri")) + object.dataItemSchemaUri = message.dataItemSchemaUri; + if (message.annotationSchemaUri != null && message.hasOwnProperty("annotationSchemaUri")) + object.annotationSchemaUri = message.annotationSchemaUri; + if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) + object.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.toObject(message.modelExplanation, options); + if (message.explanationSpecs && message.explanationSpecs.length) { + object.explanationSpecs = []; + for (var j = 0; j < message.explanationSpecs.length; ++j) + object.explanationSpecs[j] = $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.toObject(message.explanationSpecs[j], options); + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Value.toObject(message.metadata, options); + return object; + }; - /** - * Gets the default type url for MigrateMlEngineModelVersionConfig - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrateMlEngineModelVersionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig"; - }; + /** + * Converts this ModelEvaluation to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @instance + * @returns {Object.} JSON object + */ + ModelEvaluation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MigrateMlEngineModelVersionConfig; - })(); + /** + * Gets the default type url for ModelEvaluation + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ModelEvaluation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluation"; + }; - MigrateResourceRequest.MigrateAutomlModelConfig = (function() { + ModelEvaluation.ModelEvaluationExplanationSpec = (function() { /** - * Properties of a MigrateAutomlModelConfig. - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @interface IMigrateAutomlModelConfig - * @property {string|null} [model] MigrateAutomlModelConfig model - * @property {string|null} [modelDisplayName] MigrateAutomlModelConfig modelDisplayName + * Properties of a ModelEvaluationExplanationSpec. + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @interface IModelEvaluationExplanationSpec + * @property {string|null} [explanationType] ModelEvaluationExplanationSpec explanationType + * @property {google.cloud.aiplatform.v1.IExplanationSpec|null} [explanationSpec] ModelEvaluationExplanationSpec explanationSpec */ /** - * Constructs a new MigrateAutomlModelConfig. - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @classdesc Represents a MigrateAutomlModelConfig. - * @implements IMigrateAutomlModelConfig + * Constructs a new ModelEvaluationExplanationSpec. + * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @classdesc Represents a ModelEvaluationExplanationSpec. + * @implements IModelEvaluationExplanationSpec * @constructor - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.ModelEvaluation.IModelEvaluationExplanationSpec=} [properties] Properties to set */ - function MigrateAutomlModelConfig(properties) { + function ModelEvaluationExplanationSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119988,89 +124663,89 @@ } /** - * MigrateAutomlModelConfig model. - * @member {string} model - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * ModelEvaluationExplanationSpec explanationType. + * @member {string} explanationType + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @instance */ - MigrateAutomlModelConfig.prototype.model = ""; + ModelEvaluationExplanationSpec.prototype.explanationType = ""; /** - * MigrateAutomlModelConfig modelDisplayName. - * @member {string} modelDisplayName - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * ModelEvaluationExplanationSpec explanationSpec. + * @member {google.cloud.aiplatform.v1.IExplanationSpec|null|undefined} explanationSpec + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @instance */ - MigrateAutomlModelConfig.prototype.modelDisplayName = ""; + ModelEvaluationExplanationSpec.prototype.explanationSpec = null; /** - * Creates a new MigrateAutomlModelConfig instance using the specified properties. + * Creates a new ModelEvaluationExplanationSpec instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} MigrateAutomlModelConfig instance + * @param {google.cloud.aiplatform.v1.ModelEvaluation.IModelEvaluationExplanationSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec} ModelEvaluationExplanationSpec instance */ - MigrateAutomlModelConfig.create = function create(properties) { - return new MigrateAutomlModelConfig(properties); + ModelEvaluationExplanationSpec.create = function create(properties) { + return new ModelEvaluationExplanationSpec(properties); }; /** - * Encodes the specified MigrateAutomlModelConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.verify|verify} messages. + * Encodes the specified ModelEvaluationExplanationSpec message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig} message MigrateAutomlModelConfig message or plain object to encode + * @param {google.cloud.aiplatform.v1.ModelEvaluation.IModelEvaluationExplanationSpec} message ModelEvaluationExplanationSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateAutomlModelConfig.encode = function encode(message, writer) { + ModelEvaluationExplanationSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.model != null && Object.hasOwnProperty.call(message, "model")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); - if (message.modelDisplayName != null && Object.hasOwnProperty.call(message, "modelDisplayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.modelDisplayName); + if (message.explanationType != null && Object.hasOwnProperty.call(message, "explanationType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.explanationType); + if (message.explanationSpec != null && Object.hasOwnProperty.call(message, "explanationSpec")) + $root.google.cloud.aiplatform.v1.ExplanationSpec.encode(message.explanationSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified MigrateAutomlModelConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.verify|verify} messages. + * Encodes the specified ModelEvaluationExplanationSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlModelConfig} message MigrateAutomlModelConfig message or plain object to encode + * @param {google.cloud.aiplatform.v1.ModelEvaluation.IModelEvaluationExplanationSpec} message ModelEvaluationExplanationSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateAutomlModelConfig.encodeDelimited = function encodeDelimited(message, writer) { + ModelEvaluationExplanationSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrateAutomlModelConfig message from the specified reader or buffer. + * Decodes a ModelEvaluationExplanationSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @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.MigrateResourceRequest.MigrateAutomlModelConfig} MigrateAutomlModelConfig + * @returns {google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec} ModelEvaluationExplanationSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateAutomlModelConfig.decode = function decode(reader, length) { + ModelEvaluationExplanationSpec.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.MigrateResourceRequest.MigrateAutomlModelConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.model = reader.string(); + message.explanationType = reader.string(); break; } case 2: { - message.modelDisplayName = reader.string(); + message.explanationSpec = $root.google.cloud.aiplatform.v1.ExplanationSpec.decode(reader, reader.uint32()); break; } default: @@ -120082,361 +124757,477 @@ }; /** - * Decodes a MigrateAutomlModelConfig message from the specified reader or buffer, length delimited. + * Decodes a ModelEvaluationExplanationSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} MigrateAutomlModelConfig + * @returns {google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec} ModelEvaluationExplanationSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateAutomlModelConfig.decodeDelimited = function decodeDelimited(reader) { + ModelEvaluationExplanationSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrateAutomlModelConfig message. + * Verifies a ModelEvaluationExplanationSpec message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrateAutomlModelConfig.verify = function verify(message) { + ModelEvaluationExplanationSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.model != null && message.hasOwnProperty("model")) - if (!$util.isString(message.model)) - return "model: string expected"; - if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) - if (!$util.isString(message.modelDisplayName)) - return "modelDisplayName: string expected"; + if (message.explanationType != null && message.hasOwnProperty("explanationType")) + if (!$util.isString(message.explanationType)) + return "explanationType: string expected"; + if (message.explanationSpec != null && message.hasOwnProperty("explanationSpec")) { + var error = $root.google.cloud.aiplatform.v1.ExplanationSpec.verify(message.explanationSpec); + if (error) + return "explanationSpec." + error; + } return null; }; /** - * Creates a MigrateAutomlModelConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ModelEvaluationExplanationSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} MigrateAutomlModelConfig + * @returns {google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec} ModelEvaluationExplanationSpec */ - MigrateAutomlModelConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + ModelEvaluationExplanationSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec) return object; - var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig(); - if (object.model != null) - message.model = String(object.model); - if (object.modelDisplayName != null) - message.modelDisplayName = String(object.modelDisplayName); + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec(); + if (object.explanationType != null) + message.explanationType = String(object.explanationType); + if (object.explanationSpec != null) { + if (typeof object.explanationSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.explanationSpec: object expected"); + message.explanationSpec = $root.google.cloud.aiplatform.v1.ExplanationSpec.fromObject(object.explanationSpec); + } return message; }; /** - * Creates a plain object from a MigrateAutomlModelConfig message. Also converts values to other types if specified. + * Creates a plain object from a ModelEvaluationExplanationSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} message MigrateAutomlModelConfig + * @param {google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec} message ModelEvaluationExplanationSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrateAutomlModelConfig.toObject = function toObject(message, options) { + ModelEvaluationExplanationSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.model = ""; - object.modelDisplayName = ""; + object.explanationType = ""; + object.explanationSpec = null; } - if (message.model != null && message.hasOwnProperty("model")) - object.model = message.model; - if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) - object.modelDisplayName = message.modelDisplayName; + if (message.explanationType != null && message.hasOwnProperty("explanationType")) + object.explanationType = message.explanationType; + if (message.explanationSpec != null && message.hasOwnProperty("explanationSpec")) + object.explanationSpec = $root.google.cloud.aiplatform.v1.ExplanationSpec.toObject(message.explanationSpec, options); return object; }; /** - * Converts this MigrateAutomlModelConfig to JSON. + * Converts this ModelEvaluationExplanationSpec to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @instance * @returns {Object.} JSON object */ - MigrateAutomlModelConfig.prototype.toJSON = function toJSON() { + ModelEvaluationExplanationSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrateAutomlModelConfig + * Gets the default type url for ModelEvaluationExplanationSpec * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrateAutomlModelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ModelEvaluationExplanationSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec"; }; - return MigrateAutomlModelConfig; + return ModelEvaluationExplanationSpec; })(); - MigrateResourceRequest.MigrateAutomlDatasetConfig = (function() { + return ModelEvaluation; + })(); - /** - * Properties of a MigrateAutomlDatasetConfig. - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @interface IMigrateAutomlDatasetConfig - * @property {string|null} [dataset] MigrateAutomlDatasetConfig dataset - * @property {string|null} [datasetDisplayName] MigrateAutomlDatasetConfig datasetDisplayName - */ + v1.ModelEvaluationSlice = (function() { - /** - * Constructs a new MigrateAutomlDatasetConfig. - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @classdesc Represents a MigrateAutomlDatasetConfig. - * @implements IMigrateAutomlDatasetConfig - * @constructor - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig=} [properties] Properties to set - */ - function MigrateAutomlDatasetConfig(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]]; - } + /** + * Properties of a ModelEvaluationSlice. + * @memberof google.cloud.aiplatform.v1 + * @interface IModelEvaluationSlice + * @property {string|null} [name] ModelEvaluationSlice name + * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice|null} [slice] ModelEvaluationSlice slice + * @property {string|null} [metricsSchemaUri] ModelEvaluationSlice metricsSchemaUri + * @property {google.protobuf.IValue|null} [metrics] ModelEvaluationSlice metrics + * @property {google.protobuf.ITimestamp|null} [createTime] ModelEvaluationSlice createTime + * @property {google.cloud.aiplatform.v1.IModelExplanation|null} [modelExplanation] ModelEvaluationSlice modelExplanation + */ - /** - * MigrateAutomlDatasetConfig dataset. - * @member {string} dataset - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @instance - */ - MigrateAutomlDatasetConfig.prototype.dataset = ""; + /** + * Constructs a new ModelEvaluationSlice. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a ModelEvaluationSlice. + * @implements IModelEvaluationSlice + * @constructor + * @param {google.cloud.aiplatform.v1.IModelEvaluationSlice=} [properties] Properties to set + */ + function ModelEvaluationSlice(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]]; + } - /** - * MigrateAutomlDatasetConfig datasetDisplayName. - * @member {string} datasetDisplayName - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @instance - */ - MigrateAutomlDatasetConfig.prototype.datasetDisplayName = ""; + /** + * ModelEvaluationSlice name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @instance + */ + ModelEvaluationSlice.prototype.name = ""; - /** - * Creates a new MigrateAutomlDatasetConfig instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} MigrateAutomlDatasetConfig instance - */ - MigrateAutomlDatasetConfig.create = function create(properties) { - return new MigrateAutomlDatasetConfig(properties); - }; + /** + * ModelEvaluationSlice slice. + * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice|null|undefined} slice + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @instance + */ + ModelEvaluationSlice.prototype.slice = null; - /** - * Encodes the specified MigrateAutomlDatasetConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig} message MigrateAutomlDatasetConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrateAutomlDatasetConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); - if (message.datasetDisplayName != null && Object.hasOwnProperty.call(message, "datasetDisplayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetDisplayName); - return writer; - }; + /** + * ModelEvaluationSlice metricsSchemaUri. + * @member {string} metricsSchemaUri + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @instance + */ + ModelEvaluationSlice.prototype.metricsSchemaUri = ""; - /** - * Encodes the specified MigrateAutomlDatasetConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateAutomlDatasetConfig} message MigrateAutomlDatasetConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrateAutomlDatasetConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ModelEvaluationSlice metrics. + * @member {google.protobuf.IValue|null|undefined} metrics + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @instance + */ + ModelEvaluationSlice.prototype.metrics = null; - /** - * Decodes a MigrateAutomlDatasetConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @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.MigrateResourceRequest.MigrateAutomlDatasetConfig} MigrateAutomlDatasetConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrateAutomlDatasetConfig.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.MigrateResourceRequest.MigrateAutomlDatasetConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataset = reader.string(); - break; - } - case 2: { - message.datasetDisplayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * ModelEvaluationSlice createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @instance + */ + ModelEvaluationSlice.prototype.createTime = null; + + /** + * ModelEvaluationSlice modelExplanation. + * @member {google.cloud.aiplatform.v1.IModelExplanation|null|undefined} modelExplanation + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @instance + */ + ModelEvaluationSlice.prototype.modelExplanation = null; + + /** + * Creates a new ModelEvaluationSlice instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @static + * @param {google.cloud.aiplatform.v1.IModelEvaluationSlice=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice} ModelEvaluationSlice instance + */ + ModelEvaluationSlice.create = function create(properties) { + return new ModelEvaluationSlice(properties); + }; + + /** + * Encodes the specified ModelEvaluationSlice message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @static + * @param {google.cloud.aiplatform.v1.IModelEvaluationSlice} message ModelEvaluationSlice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModelEvaluationSlice.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.slice != null && Object.hasOwnProperty.call(message, "slice")) + $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.encode(message.slice, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricsSchemaUri != null && Object.hasOwnProperty.call(message, "metricsSchemaUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.metricsSchemaUri); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.protobuf.Value.encode(message.metrics, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.modelExplanation != null && Object.hasOwnProperty.call(message, "modelExplanation")) + $root.google.cloud.aiplatform.v1.ModelExplanation.encode(message.modelExplanation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ModelEvaluationSlice message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @static + * @param {google.cloud.aiplatform.v1.IModelEvaluationSlice} message ModelEvaluationSlice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModelEvaluationSlice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModelEvaluationSlice message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @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.ModelEvaluationSlice} ModelEvaluationSlice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModelEvaluationSlice.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.ModelEvaluationSlice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.slice = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.decode(reader, reader.uint32()); + break; + } + case 3: { + message.metricsSchemaUri = reader.string(); + break; + } + case 4: { + message.metrics = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a MigrateAutomlDatasetConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} MigrateAutomlDatasetConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrateAutomlDatasetConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a MigrateAutomlDatasetConfig message. - * @function verify - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MigrateAutomlDatasetConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataset != null && message.hasOwnProperty("dataset")) - if (!$util.isString(message.dataset)) - return "dataset: string expected"; - if (message.datasetDisplayName != null && message.hasOwnProperty("datasetDisplayName")) - if (!$util.isString(message.datasetDisplayName)) - return "datasetDisplayName: string expected"; - return null; - }; + /** + * Decodes a ModelEvaluationSlice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice} ModelEvaluationSlice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModelEvaluationSlice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a MigrateAutomlDatasetConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} MigrateAutomlDatasetConfig - */ - MigrateAutomlDatasetConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) - return object; - var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig(); - if (object.dataset != null) - message.dataset = String(object.dataset); - if (object.datasetDisplayName != null) - message.datasetDisplayName = String(object.datasetDisplayName); - return message; - }; + /** + * Verifies a ModelEvaluationSlice message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModelEvaluationSlice.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.slice != null && message.hasOwnProperty("slice")) { + var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.verify(message.slice); + if (error) + return "slice." + error; + } + if (message.metricsSchemaUri != null && message.hasOwnProperty("metricsSchemaUri")) + if (!$util.isString(message.metricsSchemaUri)) + return "metricsSchemaUri: string expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.protobuf.Value.verify(message.metrics); + if (error) + return "metrics." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) { + var error = $root.google.cloud.aiplatform.v1.ModelExplanation.verify(message.modelExplanation); + if (error) + return "modelExplanation." + error; + } + return null; + }; - /** - * Creates a plain object from a MigrateAutomlDatasetConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} message MigrateAutomlDatasetConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrateAutomlDatasetConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataset = ""; - object.datasetDisplayName = ""; - } - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = message.dataset; - if (message.datasetDisplayName != null && message.hasOwnProperty("datasetDisplayName")) - object.datasetDisplayName = message.datasetDisplayName; + /** + * Creates a ModelEvaluationSlice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice} ModelEvaluationSlice + */ + ModelEvaluationSlice.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice) return object; - }; + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice(); + if (object.name != null) + message.name = String(object.name); + if (object.slice != null) { + if (typeof object.slice !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.slice: object expected"); + message.slice = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.fromObject(object.slice); + } + if (object.metricsSchemaUri != null) + message.metricsSchemaUri = String(object.metricsSchemaUri); + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics: object expected"); + message.metrics = $root.google.protobuf.Value.fromObject(object.metrics); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.modelExplanation != null) { + if (typeof object.modelExplanation !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.modelExplanation: object expected"); + message.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.fromObject(object.modelExplanation); + } + return message; + }; - /** - * Converts this MigrateAutomlDatasetConfig to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @instance - * @returns {Object.} JSON object - */ - MigrateAutomlDatasetConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ModelEvaluationSlice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice} message ModelEvaluationSlice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModelEvaluationSlice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.slice = null; + object.metricsSchemaUri = ""; + object.metrics = null; + object.createTime = null; + object.modelExplanation = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.slice != null && message.hasOwnProperty("slice")) + object.slice = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.toObject(message.slice, options); + if (message.metricsSchemaUri != null && message.hasOwnProperty("metricsSchemaUri")) + object.metricsSchemaUri = message.metricsSchemaUri; + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.protobuf.Value.toObject(message.metrics, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) + object.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.toObject(message.modelExplanation, options); + return object; + }; - /** - * Gets the default type url for MigrateAutomlDatasetConfig - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrateAutomlDatasetConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig"; - }; + /** + * Converts this ModelEvaluationSlice to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @instance + * @returns {Object.} JSON object + */ + ModelEvaluationSlice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MigrateAutomlDatasetConfig; - })(); + /** + * Gets the default type url for ModelEvaluationSlice + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ModelEvaluationSlice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice"; + }; - MigrateResourceRequest.MigrateDataLabelingDatasetConfig = (function() { + ModelEvaluationSlice.Slice = (function() { /** - * Properties of a MigrateDataLabelingDatasetConfig. - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @interface IMigrateDataLabelingDatasetConfig - * @property {string|null} [dataset] MigrateDataLabelingDatasetConfig dataset - * @property {string|null} [datasetDisplayName] MigrateDataLabelingDatasetConfig datasetDisplayName - * @property {Array.|null} [migrateDataLabelingAnnotatedDatasetConfigs] MigrateDataLabelingDatasetConfig migrateDataLabelingAnnotatedDatasetConfigs + * Properties of a Slice. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @interface ISlice + * @property {string|null} [dimension] Slice dimension + * @property {string|null} [value] Slice value + * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec|null} [sliceSpec] Slice sliceSpec */ /** - * Constructs a new MigrateDataLabelingDatasetConfig. - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest - * @classdesc Represents a MigrateDataLabelingDatasetConfig. - * @implements IMigrateDataLabelingDatasetConfig + * Constructs a new Slice. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @classdesc Represents a Slice. + * @implements ISlice * @constructor - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice=} [properties] Properties to set */ - function MigrateDataLabelingDatasetConfig(properties) { - this.migrateDataLabelingAnnotatedDatasetConfigs = []; + function Slice(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -120444,106 +125235,103 @@ } /** - * MigrateDataLabelingDatasetConfig dataset. - * @member {string} dataset - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * Slice dimension. + * @member {string} dimension + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @instance */ - MigrateDataLabelingDatasetConfig.prototype.dataset = ""; + Slice.prototype.dimension = ""; /** - * MigrateDataLabelingDatasetConfig datasetDisplayName. - * @member {string} datasetDisplayName - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * Slice value. + * @member {string} value + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @instance */ - MigrateDataLabelingDatasetConfig.prototype.datasetDisplayName = ""; + Slice.prototype.value = ""; /** - * MigrateDataLabelingDatasetConfig migrateDataLabelingAnnotatedDatasetConfigs. - * @member {Array.} migrateDataLabelingAnnotatedDatasetConfigs - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * Slice sliceSpec. + * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec|null|undefined} sliceSpec + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @instance */ - MigrateDataLabelingDatasetConfig.prototype.migrateDataLabelingAnnotatedDatasetConfigs = $util.emptyArray; + Slice.prototype.sliceSpec = null; /** - * Creates a new MigrateDataLabelingDatasetConfig instance using the specified properties. + * Creates a new Slice instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} MigrateDataLabelingDatasetConfig instance + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} Slice instance */ - MigrateDataLabelingDatasetConfig.create = function create(properties) { - return new MigrateDataLabelingDatasetConfig(properties); + Slice.create = function create(properties) { + return new Slice(properties); }; /** - * Encodes the specified MigrateDataLabelingDatasetConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.verify|verify} messages. + * Encodes the specified Slice message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig} message MigrateDataLabelingDatasetConfig message or plain object to encode + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice} message Slice message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateDataLabelingDatasetConfig.encode = function encode(message, writer) { + Slice.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); - if (message.datasetDisplayName != null && Object.hasOwnProperty.call(message, "datasetDisplayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetDisplayName); - if (message.migrateDataLabelingAnnotatedDatasetConfigs != null && message.migrateDataLabelingAnnotatedDatasetConfigs.length) - for (var i = 0; i < message.migrateDataLabelingAnnotatedDatasetConfigs.length; ++i) - $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.encode(message.migrateDataLabelingAnnotatedDatasetConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimension); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.sliceSpec != null && Object.hasOwnProperty.call(message, "sliceSpec")) + $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.encode(message.sliceSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified MigrateDataLabelingDatasetConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.verify|verify} messages. + * Encodes the specified Slice message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.IMigrateDataLabelingDatasetConfig} message MigrateDataLabelingDatasetConfig message or plain object to encode + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice} message Slice message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateDataLabelingDatasetConfig.encodeDelimited = function encodeDelimited(message, writer) { + Slice.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrateDataLabelingDatasetConfig message from the specified reader or buffer. + * Decodes a Slice message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @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.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} MigrateDataLabelingDatasetConfig + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} Slice * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateDataLabelingDatasetConfig.decode = function decode(reader, length) { + Slice.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.MigrateResourceRequest.MigrateDataLabelingDatasetConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataset = reader.string(); + message.dimension = reader.string(); break; } case 2: { - message.datasetDisplayName = reader.string(); + message.value = reader.string(); break; } case 3: { - if (!(message.migrateDataLabelingAnnotatedDatasetConfigs && message.migrateDataLabelingAnnotatedDatasetConfigs.length)) - message.migrateDataLabelingAnnotatedDatasetConfigs = []; - message.migrateDataLabelingAnnotatedDatasetConfigs.push($root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.decode(reader, reader.uint32())); + message.sliceSpec = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.decode(reader, reader.uint32()); break; } default: @@ -120555,154 +125343,142 @@ }; /** - * Decodes a MigrateDataLabelingDatasetConfig message from the specified reader or buffer, length delimited. + * Decodes a Slice message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} MigrateDataLabelingDatasetConfig + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} Slice * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateDataLabelingDatasetConfig.decodeDelimited = function decodeDelimited(reader) { + Slice.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrateDataLabelingDatasetConfig message. + * Verifies a Slice message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrateDataLabelingDatasetConfig.verify = function verify(message) { + Slice.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataset != null && message.hasOwnProperty("dataset")) - if (!$util.isString(message.dataset)) - return "dataset: string expected"; - if (message.datasetDisplayName != null && message.hasOwnProperty("datasetDisplayName")) - if (!$util.isString(message.datasetDisplayName)) - return "datasetDisplayName: string expected"; - if (message.migrateDataLabelingAnnotatedDatasetConfigs != null && message.hasOwnProperty("migrateDataLabelingAnnotatedDatasetConfigs")) { - if (!Array.isArray(message.migrateDataLabelingAnnotatedDatasetConfigs)) - return "migrateDataLabelingAnnotatedDatasetConfigs: array expected"; - for (var i = 0; i < message.migrateDataLabelingAnnotatedDatasetConfigs.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.verify(message.migrateDataLabelingAnnotatedDatasetConfigs[i]); - if (error) - return "migrateDataLabelingAnnotatedDatasetConfigs." + error; - } + if (message.dimension != null && message.hasOwnProperty("dimension")) + if (!$util.isString(message.dimension)) + return "dimension: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.sliceSpec != null && message.hasOwnProperty("sliceSpec")) { + var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify(message.sliceSpec); + if (error) + return "sliceSpec." + error; } return null; }; /** - * Creates a MigrateDataLabelingDatasetConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Slice message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} MigrateDataLabelingDatasetConfig - */ - MigrateDataLabelingDatasetConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig) - return object; - var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig(); - if (object.dataset != null) - message.dataset = String(object.dataset); - if (object.datasetDisplayName != null) - message.datasetDisplayName = String(object.datasetDisplayName); - if (object.migrateDataLabelingAnnotatedDatasetConfigs) { - if (!Array.isArray(object.migrateDataLabelingAnnotatedDatasetConfigs)) - throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.migrateDataLabelingAnnotatedDatasetConfigs: array expected"); - message.migrateDataLabelingAnnotatedDatasetConfigs = []; - for (var i = 0; i < object.migrateDataLabelingAnnotatedDatasetConfigs.length; ++i) { - if (typeof object.migrateDataLabelingAnnotatedDatasetConfigs[i] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.migrateDataLabelingAnnotatedDatasetConfigs: object expected"); - message.migrateDataLabelingAnnotatedDatasetConfigs[i] = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.fromObject(object.migrateDataLabelingAnnotatedDatasetConfigs[i]); - } + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} Slice + */ + Slice.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice) + return object; + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice(); + if (object.dimension != null) + message.dimension = String(object.dimension); + if (object.value != null) + message.value = String(object.value); + if (object.sliceSpec != null) { + if (typeof object.sliceSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.sliceSpec: object expected"); + message.sliceSpec = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.fromObject(object.sliceSpec); } return message; }; /** - * Creates a plain object from a MigrateDataLabelingDatasetConfig message. Also converts values to other types if specified. + * Creates a plain object from a Slice message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} message MigrateDataLabelingDatasetConfig + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} message Slice * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrateDataLabelingDatasetConfig.toObject = function toObject(message, options) { + Slice.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.migrateDataLabelingAnnotatedDatasetConfigs = []; if (options.defaults) { - object.dataset = ""; - object.datasetDisplayName = ""; - } - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = message.dataset; - if (message.datasetDisplayName != null && message.hasOwnProperty("datasetDisplayName")) - object.datasetDisplayName = message.datasetDisplayName; - if (message.migrateDataLabelingAnnotatedDatasetConfigs && message.migrateDataLabelingAnnotatedDatasetConfigs.length) { - object.migrateDataLabelingAnnotatedDatasetConfigs = []; - for (var j = 0; j < message.migrateDataLabelingAnnotatedDatasetConfigs.length; ++j) - object.migrateDataLabelingAnnotatedDatasetConfigs[j] = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.toObject(message.migrateDataLabelingAnnotatedDatasetConfigs[j], options); + object.dimension = ""; + object.value = ""; + object.sliceSpec = null; } + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = message.dimension; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.sliceSpec != null && message.hasOwnProperty("sliceSpec")) + object.sliceSpec = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.toObject(message.sliceSpec, options); return object; }; /** - * Converts this MigrateDataLabelingDatasetConfig to JSON. + * Converts this Slice to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @instance * @returns {Object.} JSON object */ - MigrateDataLabelingDatasetConfig.prototype.toJSON = function toJSON() { + Slice.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrateDataLabelingDatasetConfig + * Gets the default type url for Slice * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrateDataLabelingDatasetConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Slice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice"; }; - MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig = (function() { + Slice.SliceSpec = (function() { /** - * Properties of a MigrateDataLabelingAnnotatedDatasetConfig. - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig - * @interface IMigrateDataLabelingAnnotatedDatasetConfig - * @property {string|null} [annotatedDataset] MigrateDataLabelingAnnotatedDatasetConfig annotatedDataset + * Properties of a SliceSpec. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @interface ISliceSpec + * @property {Object.|null} [configs] SliceSpec configs */ /** - * Constructs a new MigrateDataLabelingAnnotatedDatasetConfig. - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig - * @classdesc Represents a MigrateDataLabelingAnnotatedDatasetConfig. - * @implements IMigrateDataLabelingAnnotatedDatasetConfig + * Constructs a new SliceSpec. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @classdesc Represents a SliceSpec. + * @implements ISliceSpec * @constructor - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.IMigrateDataLabelingAnnotatedDatasetConfig=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec=} [properties] Properties to set */ - function MigrateDataLabelingAnnotatedDatasetConfig(properties) { + function SliceSpec(properties) { + this.configs = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -120710,75 +125486,97 @@ } /** - * MigrateDataLabelingAnnotatedDatasetConfig annotatedDataset. - * @member {string} annotatedDataset - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * SliceSpec configs. + * @member {Object.} configs + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @instance */ - MigrateDataLabelingAnnotatedDatasetConfig.prototype.annotatedDataset = ""; + SliceSpec.prototype.configs = $util.emptyObject; /** - * Creates a new MigrateDataLabelingAnnotatedDatasetConfig instance using the specified properties. + * Creates a new SliceSpec instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.IMigrateDataLabelingAnnotatedDatasetConfig=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} MigrateDataLabelingAnnotatedDatasetConfig instance + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec instance */ - MigrateDataLabelingAnnotatedDatasetConfig.create = function create(properties) { - return new MigrateDataLabelingAnnotatedDatasetConfig(properties); + SliceSpec.create = function create(properties) { + return new SliceSpec(properties); }; /** - * Encodes the specified MigrateDataLabelingAnnotatedDatasetConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.verify|verify} messages. + * Encodes the specified SliceSpec message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.IMigrateDataLabelingAnnotatedDatasetConfig} message MigrateDataLabelingAnnotatedDatasetConfig message or plain object to encode + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec} message SliceSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateDataLabelingAnnotatedDatasetConfig.encode = function encode(message, writer) { + SliceSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotatedDataset != null && Object.hasOwnProperty.call(message, "annotatedDataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotatedDataset); + if (message.configs != null && Object.hasOwnProperty.call(message, "configs")) + for (var keys = Object.keys(message.configs), 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.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.encode(message.configs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified MigrateDataLabelingAnnotatedDatasetConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.verify|verify} messages. + * Encodes the specified SliceSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.IMigrateDataLabelingAnnotatedDatasetConfig} message MigrateDataLabelingAnnotatedDatasetConfig message or plain object to encode + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec} message SliceSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateDataLabelingAnnotatedDatasetConfig.encodeDelimited = function encodeDelimited(message, writer) { + SliceSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrateDataLabelingAnnotatedDatasetConfig message from the specified reader or buffer. + * Decodes a SliceSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @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.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} MigrateDataLabelingAnnotatedDatasetConfig + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateDataLabelingAnnotatedDatasetConfig.decode = function decode(reader, length) { + SliceSpec.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.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.annotatedDataset = reader.string(); + if (message.configs === $util.emptyObject) + message.configs = {}; + 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.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.configs[key] = value; break; } default: @@ -120790,354 +125588,1009 @@ }; /** - * Decodes a MigrateDataLabelingAnnotatedDatasetConfig message from the specified reader or buffer, length delimited. + * Decodes a SliceSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} MigrateDataLabelingAnnotatedDatasetConfig + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateDataLabelingAnnotatedDatasetConfig.decodeDelimited = function decodeDelimited(reader) { + SliceSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrateDataLabelingAnnotatedDatasetConfig message. + * Verifies a SliceSpec message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrateDataLabelingAnnotatedDatasetConfig.verify = function verify(message) { + SliceSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotatedDataset != null && message.hasOwnProperty("annotatedDataset")) - if (!$util.isString(message.annotatedDataset)) - return "annotatedDataset: string expected"; + if (message.configs != null && message.hasOwnProperty("configs")) { + if (!$util.isObject(message.configs)) + return "configs: object expected"; + var key = Object.keys(message.configs); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify(message.configs[key[i]]); + if (error) + return "configs." + error; + } + } return null; }; /** - * Creates a MigrateDataLabelingAnnotatedDatasetConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SliceSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} MigrateDataLabelingAnnotatedDatasetConfig + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec */ - MigrateDataLabelingAnnotatedDatasetConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig) + SliceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec) return object; - var message = new $root.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig(); - if (object.annotatedDataset != null) - message.annotatedDataset = String(object.annotatedDataset); + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec(); + if (object.configs) { + if (typeof object.configs !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.configs: object expected"); + message.configs = {}; + for (var keys = Object.keys(object.configs), i = 0; i < keys.length; ++i) { + if (typeof object.configs[keys[i]] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.configs: object expected"); + message.configs[keys[i]] = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.fromObject(object.configs[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a MigrateDataLabelingAnnotatedDatasetConfig message. Also converts values to other types if specified. + * Creates a plain object from a SliceSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} message MigrateDataLabelingAnnotatedDatasetConfig + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} message SliceSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrateDataLabelingAnnotatedDatasetConfig.toObject = function toObject(message, options) { + SliceSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.annotatedDataset = ""; - if (message.annotatedDataset != null && message.hasOwnProperty("annotatedDataset")) - object.annotatedDataset = message.annotatedDataset; + if (options.objects || options.defaults) + object.configs = {}; + var keys2; + if (message.configs && (keys2 = Object.keys(message.configs)).length) { + object.configs = {}; + for (var j = 0; j < keys2.length; ++j) + object.configs[keys2[j]] = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.toObject(message.configs[keys2[j]], options); + } return object; }; /** - * Converts this MigrateDataLabelingAnnotatedDatasetConfig to JSON. + * Converts this SliceSpec to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @instance * @returns {Object.} JSON object */ - MigrateDataLabelingAnnotatedDatasetConfig.prototype.toJSON = function toJSON() { + SliceSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrateDataLabelingAnnotatedDatasetConfig + * Gets the default type url for SliceSpec * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrateDataLabelingAnnotatedDatasetConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SliceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec"; }; - return MigrateDataLabelingAnnotatedDatasetConfig; + SliceSpec.SliceConfig = (function() { + + /** + * Properties of a SliceConfig. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @interface ISliceConfig + * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null} [value] SliceConfig value + * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null} [range] SliceConfig range + * @property {google.protobuf.IBoolValue|null} [allValues] SliceConfig allValues + */ + + /** + * Constructs a new SliceConfig. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @classdesc Represents a SliceConfig. + * @implements ISliceConfig + * @constructor + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig=} [properties] Properties to set + */ + function SliceConfig(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]]; + } + + /** + * SliceConfig value. + * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null|undefined} value + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + SliceConfig.prototype.value = null; + + /** + * SliceConfig range. + * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null|undefined} range + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + SliceConfig.prototype.range = null; + + /** + * SliceConfig allValues. + * @member {google.protobuf.IBoolValue|null|undefined} allValues + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + SliceConfig.prototype.allValues = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SliceConfig kind. + * @member {"value"|"range"|"allValues"|undefined} kind + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + Object.defineProperty(SliceConfig.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["value", "range", "allValues"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SliceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig instance + */ + SliceConfig.create = function create(properties) { + return new SliceConfig(properties); + }; + + /** + * Encodes the specified SliceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig} message SliceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SliceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.encode(message.value, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.range != null && Object.hasOwnProperty.call(message, "range")) + $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.encode(message.range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allValues != null && Object.hasOwnProperty.call(message, "allValues")) + $root.google.protobuf.BoolValue.encode(message.allValues, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SliceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig} message SliceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SliceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SliceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @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.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SliceConfig.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.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.decode(reader, reader.uint32()); + break; + } + case 2: { + message.range = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allValues = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SliceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SliceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SliceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SliceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.kind = 1; + { + var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify(message.value); + if (error) + return "value." + error; + } + } + if (message.range != null && message.hasOwnProperty("range")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify(message.range); + if (error) + return "range." + error; + } + } + if (message.allValues != null && message.hasOwnProperty("allValues")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.BoolValue.verify(message.allValues); + if (error) + return "allValues." + error; + } + } + return null; + }; + + /** + * Creates a SliceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig + */ + SliceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig(); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.value: object expected"); + message.value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.fromObject(object.value); + } + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.range: object expected"); + message.range = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.fromObject(object.range); + } + if (object.allValues != null) { + if (typeof object.allValues !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.allValues: object expected"); + message.allValues = $root.google.protobuf.BoolValue.fromObject(object.allValues); + } + return message; + }; + + /** + * Creates a plain object from a SliceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} message SliceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SliceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.toObject(message.value, options); + if (options.oneofs) + object.kind = "value"; + } + if (message.range != null && message.hasOwnProperty("range")) { + object.range = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.toObject(message.range, options); + if (options.oneofs) + object.kind = "range"; + } + if (message.allValues != null && message.hasOwnProperty("allValues")) { + object.allValues = $root.google.protobuf.BoolValue.toObject(message.allValues, options); + if (options.oneofs) + object.kind = "allValues"; + } + return object; + }; + + /** + * Converts this SliceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + * @returns {Object.} JSON object + */ + SliceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SliceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SliceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig"; + }; + + return SliceConfig; + })(); + + SliceSpec.Range = (function() { + + /** + * Properties of a Range. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @interface IRange + * @property {number|null} [low] Range low + * @property {number|null} [high] Range high + */ + + /** + * Constructs a new Range. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange=} [properties] Properties to set + */ + function Range(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]]; + } + + /** + * Range low. + * @member {number} low + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @instance + */ + Range.prototype.low = 0; + + /** + * Range high. + * @member {number} high + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @instance + */ + Range.prototype.high = 0; + + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.low != null && Object.hasOwnProperty.call(message, "low")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.low); + if (message.high != null && Object.hasOwnProperty.call(message, "high")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.high); + return writer; + }; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @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.ModelEvaluationSlice.Slice.SliceSpec.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.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.ModelEvaluationSlice.Slice.SliceSpec.Range(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.low = reader.float(); + break; + } + case 2: { + message.high = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Range message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Range.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.low != null && message.hasOwnProperty("low")) + if (typeof message.low !== "number") + return "low: number expected"; + if (message.high != null && message.hasOwnProperty("high")) + if (typeof message.high !== "number") + return "high: number expected"; + return null; + }; + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range + */ + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range) + return object; + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range(); + if (object.low != null) + message.low = Number(object.low); + if (object.high != null) + message.high = Number(object.high); + return message; + }; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} message Range + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Range.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.low = 0; + object.high = 0; + } + if (message.low != null && message.hasOwnProperty("low")) + object.low = options.json && !isFinite(message.low) ? String(message.low) : message.low; + if (message.high != null && message.hasOwnProperty("high")) + object.high = options.json && !isFinite(message.high) ? String(message.high) : message.high; + return object; + }; + + /** + * Converts this Range to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Range + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Range.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range"; + }; + + return Range; + })(); + + SliceSpec.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @interface IValue + * @property {string|null} [stringValue] Value stringValue + * @property {number|null} [floatValue] Value floatValue + */ + + /** + * Constructs a new Value. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue=} [properties] Properties to set + */ + function Value(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]]; + } + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value floatValue. + * @member {number|null|undefined} floatValue + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @instance + */ + Value.prototype.floatValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"stringValue"|"floatValue"|undefined} kind + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["stringValue", "floatValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue); + if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.floatValue); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @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.ModelEvaluationSlice.Slice.SliceSpec.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.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.ModelEvaluationSlice.Slice.SliceSpec.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stringValue = reader.string(); + break; + } + case 2: { + message.floatValue = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.floatValue !== "number") + return "floatValue: number expected"; + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value) + return object; + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.floatValue != null) + message.floatValue = Number(object.floatValue); + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + object.floatValue = options.json && !isFinite(message.floatValue) ? String(message.floatValue) : message.floatValue; + if (options.oneofs) + object.kind = "floatValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value"; + }; + + return Value; + })(); + + return SliceSpec; })(); - return MigrateDataLabelingDatasetConfig; + return Slice; })(); - return MigrateResourceRequest; - })(); - - v1.BatchMigrateResourcesResponse = (function() { + return ModelEvaluationSlice; + })(); - /** - * Properties of a BatchMigrateResourcesResponse. - * @memberof google.cloud.aiplatform.v1 - * @interface IBatchMigrateResourcesResponse - * @property {Array.|null} [migrateResourceResponses] BatchMigrateResourcesResponse migrateResourceResponses - */ + v1.ModelGardenService = (function() { /** - * Constructs a new BatchMigrateResourcesResponse. + * Constructs a new ModelGardenService service. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a BatchMigrateResourcesResponse. - * @implements IBatchMigrateResourcesResponse + * @classdesc Represents a ModelGardenService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesResponse=} [properties] Properties to set + * @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 BatchMigrateResourcesResponse(properties) { - this.migrateResourceResponses = []; - 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]]; + function ModelGardenService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * BatchMigrateResourcesResponse migrateResourceResponses. - * @member {Array.} migrateResourceResponses - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse - * @instance - */ - BatchMigrateResourcesResponse.prototype.migrateResourceResponses = $util.emptyArray; + (ModelGardenService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ModelGardenService; /** - * Creates a new BatchMigrateResourcesResponse instance using the specified properties. + * Creates new ModelGardenService service using the specified rpc implementation. * @function create - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse - * @static - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesResponse=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} BatchMigrateResourcesResponse instance - */ - BatchMigrateResourcesResponse.create = function create(properties) { - return new BatchMigrateResourcesResponse(properties); - }; - - /** - * Encodes the specified BatchMigrateResourcesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse - * @static - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesResponse} message BatchMigrateResourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchMigrateResourcesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.migrateResourceResponses != null && message.migrateResourceResponses.length) - for (var i = 0; i < message.migrateResourceResponses.length; ++i) - $root.google.cloud.aiplatform.v1.MigrateResourceResponse.encode(message.migrateResourceResponses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BatchMigrateResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse - * @static - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesResponse} message BatchMigrateResourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchMigrateResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchMigrateResourcesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse - * @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.BatchMigrateResourcesResponse} BatchMigrateResourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchMigrateResourcesResponse.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.BatchMigrateResourcesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.migrateResourceResponses && message.migrateResourceResponses.length)) - message.migrateResourceResponses = []; - message.migrateResourceResponses.push($root.google.cloud.aiplatform.v1.MigrateResourceResponse.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchMigrateResourcesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} BatchMigrateResourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchMigrateResourcesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchMigrateResourcesResponse message. - * @function verify - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse + * @memberof google.cloud.aiplatform.v1.ModelGardenService * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * @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 {ModelGardenService} RPC service. Useful where requests and/or responses are streamed. */ - BatchMigrateResourcesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.migrateResourceResponses != null && message.hasOwnProperty("migrateResourceResponses")) { - if (!Array.isArray(message.migrateResourceResponses)) - return "migrateResourceResponses: array expected"; - for (var i = 0; i < message.migrateResourceResponses.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.MigrateResourceResponse.verify(message.migrateResourceResponses[i]); - if (error) - return "migrateResourceResponses." + error; - } - } - return null; + ModelGardenService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Creates a BatchMigrateResourcesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} BatchMigrateResourcesResponse + * Callback as used by {@link google.cloud.aiplatform.v1.ModelGardenService|getPublisherModel}. + * @memberof google.cloud.aiplatform.v1.ModelGardenService + * @typedef GetPublisherModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.PublisherModel} [response] PublisherModel */ - BatchMigrateResourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse) - return object; - var message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse(); - if (object.migrateResourceResponses) { - if (!Array.isArray(object.migrateResourceResponses)) - throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.migrateResourceResponses: array expected"); - message.migrateResourceResponses = []; - for (var i = 0; i < object.migrateResourceResponses.length; ++i) { - if (typeof object.migrateResourceResponses[i] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.migrateResourceResponses: object expected"); - message.migrateResourceResponses[i] = $root.google.cloud.aiplatform.v1.MigrateResourceResponse.fromObject(object.migrateResourceResponses[i]); - } - } - return message; - }; /** - * Creates a plain object from a BatchMigrateResourcesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse - * @static - * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} message BatchMigrateResourcesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls GetPublisherModel. + * @function getPublisherModel + * @memberof google.cloud.aiplatform.v1.ModelGardenService + * @instance + * @param {google.cloud.aiplatform.v1.IGetPublisherModelRequest} request GetPublisherModelRequest message or plain object + * @param {google.cloud.aiplatform.v1.ModelGardenService.GetPublisherModelCallback} callback Node-style callback called with the error, if any, and PublisherModel + * @returns {undefined} + * @variation 1 */ - BatchMigrateResourcesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.migrateResourceResponses = []; - if (message.migrateResourceResponses && message.migrateResourceResponses.length) { - object.migrateResourceResponses = []; - for (var j = 0; j < message.migrateResourceResponses.length; ++j) - object.migrateResourceResponses[j] = $root.google.cloud.aiplatform.v1.MigrateResourceResponse.toObject(message.migrateResourceResponses[j], options); - } - return object; - }; + Object.defineProperty(ModelGardenService.prototype.getPublisherModel = function getPublisherModel(request, callback) { + return this.rpcCall(getPublisherModel, $root.google.cloud.aiplatform.v1.GetPublisherModelRequest, $root.google.cloud.aiplatform.v1.PublisherModel, request, callback); + }, "name", { value: "GetPublisherModel" }); /** - * Converts this BatchMigrateResourcesResponse to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse + * Calls GetPublisherModel. + * @function getPublisherModel + * @memberof google.cloud.aiplatform.v1.ModelGardenService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.aiplatform.v1.IGetPublisherModelRequest} request GetPublisherModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - BatchMigrateResourcesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for BatchMigrateResourcesResponse - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchMigrateResourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.BatchMigrateResourcesResponse"; - }; + return ModelGardenService; + })(); - return BatchMigrateResourcesResponse; + /** + * PublisherModelView enum. + * @name google.cloud.aiplatform.v1.PublisherModelView + * @enum {number} + * @property {number} PUBLISHER_MODEL_VIEW_UNSPECIFIED=0 PUBLISHER_MODEL_VIEW_UNSPECIFIED value + * @property {number} PUBLISHER_MODEL_VIEW_BASIC=1 PUBLISHER_MODEL_VIEW_BASIC value + * @property {number} PUBLISHER_MODEL_VIEW_FULL=2 PUBLISHER_MODEL_VIEW_FULL value + * @property {number} PUBLISHER_MODEL_VERSION_VIEW_BASIC=3 PUBLISHER_MODEL_VERSION_VIEW_BASIC value + */ + v1.PublisherModelView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PUBLISHER_MODEL_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "PUBLISHER_MODEL_VIEW_BASIC"] = 1; + values[valuesById[2] = "PUBLISHER_MODEL_VIEW_FULL"] = 2; + values[valuesById[3] = "PUBLISHER_MODEL_VERSION_VIEW_BASIC"] = 3; + return values; })(); - v1.MigrateResourceResponse = (function() { + v1.GetPublisherModelRequest = (function() { /** - * Properties of a MigrateResourceResponse. + * Properties of a GetPublisherModelRequest. * @memberof google.cloud.aiplatform.v1 - * @interface IMigrateResourceResponse - * @property {string|null} [dataset] MigrateResourceResponse dataset - * @property {string|null} [model] MigrateResourceResponse model - * @property {google.cloud.aiplatform.v1.IMigratableResource|null} [migratableResource] MigrateResourceResponse migratableResource + * @interface IGetPublisherModelRequest + * @property {string|null} [name] GetPublisherModelRequest name + * @property {string|null} [languageCode] GetPublisherModelRequest languageCode + * @property {google.cloud.aiplatform.v1.PublisherModelView|null} [view] GetPublisherModelRequest view */ /** - * Constructs a new MigrateResourceResponse. + * Constructs a new GetPublisherModelRequest. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a MigrateResourceResponse. - * @implements IMigrateResourceResponse + * @classdesc Represents a GetPublisherModelRequest. + * @implements IGetPublisherModelRequest * @constructor - * @param {google.cloud.aiplatform.v1.IMigrateResourceResponse=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.IGetPublisherModelRequest=} [properties] Properties to set */ - function MigrateResourceResponse(properties) { + function GetPublisherModelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -121145,117 +126598,103 @@ } /** - * MigrateResourceResponse dataset. - * @member {string|null|undefined} dataset - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse - * @instance - */ - MigrateResourceResponse.prototype.dataset = null; - - /** - * MigrateResourceResponse model. - * @member {string|null|undefined} model - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse + * GetPublisherModelRequest name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest * @instance */ - MigrateResourceResponse.prototype.model = null; + GetPublisherModelRequest.prototype.name = ""; /** - * MigrateResourceResponse migratableResource. - * @member {google.cloud.aiplatform.v1.IMigratableResource|null|undefined} migratableResource - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse + * GetPublisherModelRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest * @instance */ - MigrateResourceResponse.prototype.migratableResource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GetPublisherModelRequest.prototype.languageCode = ""; /** - * MigrateResourceResponse migratedResource. - * @member {"dataset"|"model"|undefined} migratedResource - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse + * GetPublisherModelRequest view. + * @member {google.cloud.aiplatform.v1.PublisherModelView} view + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest * @instance */ - Object.defineProperty(MigrateResourceResponse.prototype, "migratedResource", { - get: $util.oneOfGetter($oneOfFields = ["dataset", "model"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetPublisherModelRequest.prototype.view = 0; /** - * Creates a new MigrateResourceResponse instance using the specified properties. + * Creates a new GetPublisherModelRequest instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest * @static - * @param {google.cloud.aiplatform.v1.IMigrateResourceResponse=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.MigrateResourceResponse} MigrateResourceResponse instance + * @param {google.cloud.aiplatform.v1.IGetPublisherModelRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.GetPublisherModelRequest} GetPublisherModelRequest instance */ - MigrateResourceResponse.create = function create(properties) { - return new MigrateResourceResponse(properties); + GetPublisherModelRequest.create = function create(properties) { + return new GetPublisherModelRequest(properties); }; /** - * Encodes the specified MigrateResourceResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceResponse.verify|verify} messages. + * Encodes the specified GetPublisherModelRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.GetPublisherModelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest * @static - * @param {google.cloud.aiplatform.v1.IMigrateResourceResponse} message MigrateResourceResponse message or plain object to encode + * @param {google.cloud.aiplatform.v1.IGetPublisherModelRequest} message GetPublisherModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateResourceResponse.encode = function encode(message, writer) { + GetPublisherModelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); - if (message.model != null && Object.hasOwnProperty.call(message, "model")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.model); - if (message.migratableResource != null && Object.hasOwnProperty.call(message, "migratableResource")) - $root.google.cloud.aiplatform.v1.MigratableResource.encode(message.migratableResource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.view); return writer; }; /** - * Encodes the specified MigrateResourceResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MigrateResourceResponse.verify|verify} messages. + * Encodes the specified GetPublisherModelRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.GetPublisherModelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest * @static - * @param {google.cloud.aiplatform.v1.IMigrateResourceResponse} message MigrateResourceResponse message or plain object to encode + * @param {google.cloud.aiplatform.v1.IGetPublisherModelRequest} message GetPublisherModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrateResourceResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetPublisherModelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrateResourceResponse message from the specified reader or buffer. + * Decodes a GetPublisherModelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest * @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.MigrateResourceResponse} MigrateResourceResponse + * @returns {google.cloud.aiplatform.v1.GetPublisherModelRequest} GetPublisherModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateResourceResponse.decode = function decode(reader, length) { + GetPublisherModelRequest.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.MigrateResourceResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.GetPublisherModelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataset = reader.string(); + message.name = reader.string(); break; } case 2: { - message.model = reader.string(); + message.languageCode = reader.string(); break; } case 3: { - message.migratableResource = $root.google.cloud.aiplatform.v1.MigratableResource.decode(reader, reader.uint32()); + message.view = reader.int32(); break; } default: @@ -121267,733 +126706,176 @@ }; /** - * Decodes a MigrateResourceResponse message from the specified reader or buffer, length delimited. + * Decodes a GetPublisherModelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.MigrateResourceResponse} MigrateResourceResponse + * @returns {google.cloud.aiplatform.v1.GetPublisherModelRequest} GetPublisherModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrateResourceResponse.decodeDelimited = function decodeDelimited(reader) { + GetPublisherModelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrateResourceResponse message. + * Verifies a GetPublisherModelRequest message. * @function verify - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrateResourceResponse.verify = function verify(message) { + GetPublisherModelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.dataset != null && message.hasOwnProperty("dataset")) { - properties.migratedResource = 1; - if (!$util.isString(message.dataset)) - return "dataset: string expected"; - } - if (message.model != null && message.hasOwnProperty("model")) { - if (properties.migratedResource === 1) - return "migratedResource: multiple values"; - properties.migratedResource = 1; - if (!$util.isString(message.model)) - return "model: string expected"; - } - if (message.migratableResource != null && message.hasOwnProperty("migratableResource")) { - var error = $root.google.cloud.aiplatform.v1.MigratableResource.verify(message.migratableResource); - if (error) - return "migratableResource." + error; - } - return null; - }; - - /** - * Creates a MigrateResourceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.MigrateResourceResponse} MigrateResourceResponse - */ - MigrateResourceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.MigrateResourceResponse) - return object; - var message = new $root.google.cloud.aiplatform.v1.MigrateResourceResponse(); - if (object.dataset != null) - message.dataset = String(object.dataset); - if (object.model != null) - message.model = String(object.model); - if (object.migratableResource != null) { - if (typeof object.migratableResource !== "object") - throw TypeError(".google.cloud.aiplatform.v1.MigrateResourceResponse.migratableResource: object expected"); - message.migratableResource = $root.google.cloud.aiplatform.v1.MigratableResource.fromObject(object.migratableResource); - } - return message; - }; - - /** - * Creates a plain object from a MigrateResourceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse - * @static - * @param {google.cloud.aiplatform.v1.MigrateResourceResponse} message MigrateResourceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrateResourceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.migratableResource = null; - if (message.dataset != null && message.hasOwnProperty("dataset")) { - object.dataset = message.dataset; - if (options.oneofs) - object.migratedResource = "dataset"; - } - if (message.model != null && message.hasOwnProperty("model")) { - object.model = message.model; - if (options.oneofs) - object.migratedResource = "model"; - } - if (message.migratableResource != null && message.hasOwnProperty("migratableResource")) - object.migratableResource = $root.google.cloud.aiplatform.v1.MigratableResource.toObject(message.migratableResource, options); - return object; - }; - - /** - * Converts this MigrateResourceResponse to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse - * @instance - * @returns {Object.} JSON object - */ - MigrateResourceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrateResourceResponse - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.MigrateResourceResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrateResourceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.MigrateResourceResponse"; - }; - - return MigrateResourceResponse; - })(); - - v1.BatchMigrateResourcesOperationMetadata = (function() { - - /** - * Properties of a BatchMigrateResourcesOperationMetadata. - * @memberof google.cloud.aiplatform.v1 - * @interface IBatchMigrateResourcesOperationMetadata - * @property {google.cloud.aiplatform.v1.IGenericOperationMetadata|null} [genericMetadata] BatchMigrateResourcesOperationMetadata genericMetadata - * @property {Array.|null} [partialResults] BatchMigrateResourcesOperationMetadata partialResults - */ - - /** - * Constructs a new BatchMigrateResourcesOperationMetadata. - * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a BatchMigrateResourcesOperationMetadata. - * @implements IBatchMigrateResourcesOperationMetadata - * @constructor - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesOperationMetadata=} [properties] Properties to set - */ - function BatchMigrateResourcesOperationMetadata(properties) { - this.partialResults = []; - 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]]; - } - - /** - * BatchMigrateResourcesOperationMetadata genericMetadata. - * @member {google.cloud.aiplatform.v1.IGenericOperationMetadata|null|undefined} genericMetadata - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @instance - */ - BatchMigrateResourcesOperationMetadata.prototype.genericMetadata = null; - - /** - * BatchMigrateResourcesOperationMetadata partialResults. - * @member {Array.} partialResults - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @instance - */ - BatchMigrateResourcesOperationMetadata.prototype.partialResults = $util.emptyArray; - - /** - * Creates a new BatchMigrateResourcesOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @static - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} BatchMigrateResourcesOperationMetadata instance - */ - BatchMigrateResourcesOperationMetadata.create = function create(properties) { - return new BatchMigrateResourcesOperationMetadata(properties); - }; - - /** - * Encodes the specified BatchMigrateResourcesOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @static - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesOperationMetadata} message BatchMigrateResourcesOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchMigrateResourcesOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.genericMetadata != null && Object.hasOwnProperty.call(message, "genericMetadata")) - $root.google.cloud.aiplatform.v1.GenericOperationMetadata.encode(message.genericMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.partialResults != null && message.partialResults.length) - for (var i = 0; i < message.partialResults.length; ++i) - $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.encode(message.partialResults[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BatchMigrateResourcesOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @static - * @param {google.cloud.aiplatform.v1.IBatchMigrateResourcesOperationMetadata} message BatchMigrateResourcesOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchMigrateResourcesOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchMigrateResourcesOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @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.BatchMigrateResourcesOperationMetadata} BatchMigrateResourcesOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchMigrateResourcesOperationMetadata.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.BatchMigrateResourcesOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.partialResults && message.partialResults.length)) - message.partialResults = []; - message.partialResults.push($root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.decode(reader, reader.uint32())); - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { default: - reader.skipType(tag & 7); + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 3: break; } - } - return message; - }; - - /** - * Decodes a BatchMigrateResourcesOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} BatchMigrateResourcesOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchMigrateResourcesOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchMigrateResourcesOperationMetadata message. - * @function verify - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchMigrateResourcesOperationMetadata.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.v1.GenericOperationMetadata.verify(message.genericMetadata); - if (error) - return "genericMetadata." + error; - } - if (message.partialResults != null && message.hasOwnProperty("partialResults")) { - if (!Array.isArray(message.partialResults)) - return "partialResults: array expected"; - for (var i = 0; i < message.partialResults.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.verify(message.partialResults[i]); - if (error) - return "partialResults." + error; - } - } return null; }; /** - * Creates a BatchMigrateResourcesOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetPublisherModelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} BatchMigrateResourcesOperationMetadata + * @returns {google.cloud.aiplatform.v1.GetPublisherModelRequest} GetPublisherModelRequest */ - BatchMigrateResourcesOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata) + GetPublisherModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.GetPublisherModelRequest) return object; - var message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata(); - if (object.genericMetadata != null) { - if (typeof object.genericMetadata !== "object") - throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.genericMetadata: object expected"); - message.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.fromObject(object.genericMetadata); - } - if (object.partialResults) { - if (!Array.isArray(object.partialResults)) - throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.partialResults: array expected"); - message.partialResults = []; - for (var i = 0; i < object.partialResults.length; ++i) { - if (typeof object.partialResults[i] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.partialResults: object expected"); - message.partialResults[i] = $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.fromObject(object.partialResults[i]); + var message = new $root.google.cloud.aiplatform.v1.GetPublisherModelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; } + break; + case "PUBLISHER_MODEL_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "PUBLISHER_MODEL_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "PUBLISHER_MODEL_VIEW_FULL": + case 2: + message.view = 2; + break; + case "PUBLISHER_MODEL_VERSION_VIEW_BASIC": + case 3: + message.view = 3; + break; } return message; }; /** - * Creates a plain object from a BatchMigrateResourcesOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @static - * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} message BatchMigrateResourcesOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchMigrateResourcesOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.partialResults = []; - if (options.defaults) - object.genericMetadata = null; - if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) - object.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.toObject(message.genericMetadata, options); - if (message.partialResults && message.partialResults.length) { - object.partialResults = []; - for (var j = 0; j < message.partialResults.length; ++j) - object.partialResults[j] = $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.toObject(message.partialResults[j], options); - } - return object; - }; - - /** - * Converts this BatchMigrateResourcesOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - BatchMigrateResourcesOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BatchMigrateResourcesOperationMetadata - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchMigrateResourcesOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata"; - }; - - BatchMigrateResourcesOperationMetadata.PartialResult = (function() { - - /** - * Properties of a PartialResult. - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @interface IPartialResult - * @property {google.rpc.IStatus|null} [error] PartialResult error - * @property {string|null} [model] PartialResult model - * @property {string|null} [dataset] PartialResult dataset - * @property {google.cloud.aiplatform.v1.IMigrateResourceRequest|null} [request] PartialResult request - */ - - /** - * Constructs a new PartialResult. - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata - * @classdesc Represents a PartialResult. - * @implements IPartialResult - * @constructor - * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.IPartialResult=} [properties] Properties to set - */ - function PartialResult(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]]; - } - - /** - * PartialResult error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @instance - */ - PartialResult.prototype.error = null; - - /** - * PartialResult model. - * @member {string|null|undefined} model - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @instance - */ - PartialResult.prototype.model = null; - - /** - * PartialResult dataset. - * @member {string|null|undefined} dataset - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @instance - */ - PartialResult.prototype.dataset = null; - - /** - * PartialResult request. - * @member {google.cloud.aiplatform.v1.IMigrateResourceRequest|null|undefined} request - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @instance - */ - PartialResult.prototype.request = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PartialResult result. - * @member {"error"|"model"|"dataset"|undefined} result - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @instance - */ - Object.defineProperty(PartialResult.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "model", "dataset"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PartialResult instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @static - * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.IPartialResult=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} PartialResult instance - */ - PartialResult.create = function create(properties) { - return new PartialResult(properties); - }; - - /** - * Encodes the specified PartialResult message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @static - * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.IPartialResult} message PartialResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartialResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.request != null && Object.hasOwnProperty.call(message, "request")) - $root.google.cloud.aiplatform.v1.MigrateResourceRequest.encode(message.request, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.model != null && Object.hasOwnProperty.call(message, "model")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.model); - if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataset); - return writer; - }; - - /** - * Encodes the specified PartialResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @static - * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.IPartialResult} message PartialResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartialResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PartialResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @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.BatchMigrateResourcesOperationMetadata.PartialResult} PartialResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartialResult.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.BatchMigrateResourcesOperationMetadata.PartialResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 3: { - message.model = reader.string(); - break; - } - case 4: { - message.dataset = reader.string(); - break; - } - case 1: { - message.request = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PartialResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} PartialResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartialResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PartialResult message. - * @function verify - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PartialResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.error != null && message.hasOwnProperty("error")) { - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.model != null && message.hasOwnProperty("model")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - if (!$util.isString(message.model)) - return "model: string expected"; - } - if (message.dataset != null && message.hasOwnProperty("dataset")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - if (!$util.isString(message.dataset)) - return "dataset: string expected"; - } - if (message.request != null && message.hasOwnProperty("request")) { - var error = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.verify(message.request); - if (error) - return "request." + error; - } - return null; - }; - - /** - * Creates a PartialResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} PartialResult - */ - PartialResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult) - return object; - var message = new $root.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.model != null) - message.model = String(object.model); - if (object.dataset != null) - message.dataset = String(object.dataset); - if (object.request != null) { - if (typeof object.request !== "object") - throw TypeError(".google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.request: object expected"); - message.request = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.fromObject(object.request); - } - return message; - }; - - /** - * Creates a plain object from a PartialResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @static - * @param {google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} message PartialResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PartialResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.request = null; - if (message.request != null && message.hasOwnProperty("request")) - object.request = $root.google.cloud.aiplatform.v1.MigrateResourceRequest.toObject(message.request, options); - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - if (message.model != null && message.hasOwnProperty("model")) { - object.model = message.model; - if (options.oneofs) - object.result = "model"; - } - if (message.dataset != null && message.hasOwnProperty("dataset")) { - object.dataset = message.dataset; - if (options.oneofs) - object.result = "dataset"; - } - return object; - }; - - /** - * Converts this PartialResult to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @instance - * @returns {Object.} JSON object - */ - PartialResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + * Creates a plain object from a GetPublisherModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest + * @static + * @param {google.cloud.aiplatform.v1.GetPublisherModelRequest} message GetPublisherModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPublisherModelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + object.view = options.enums === String ? "PUBLISHER_MODEL_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.aiplatform.v1.PublisherModelView[message.view] === undefined ? message.view : $root.google.cloud.aiplatform.v1.PublisherModelView[message.view] : message.view; + return object; + }; - /** - * Gets the default type url for PartialResult - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PartialResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult"; - }; + /** + * Converts this GetPublisherModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest + * @instance + * @returns {Object.} JSON object + */ + GetPublisherModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return PartialResult; - })(); + /** + * Gets the default type url for GetPublisherModelRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.GetPublisherModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPublisherModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.GetPublisherModelRequest"; + }; - return BatchMigrateResourcesOperationMetadata; + return GetPublisherModelRequest; })(); - v1.ModelEvaluation = (function() { + v1.PublisherModel = (function() { /** - * Properties of a ModelEvaluation. + * Properties of a PublisherModel. * @memberof google.cloud.aiplatform.v1 - * @interface IModelEvaluation - * @property {string|null} [name] ModelEvaluation name - * @property {string|null} [displayName] ModelEvaluation displayName - * @property {string|null} [metricsSchemaUri] ModelEvaluation metricsSchemaUri - * @property {google.protobuf.IValue|null} [metrics] ModelEvaluation metrics - * @property {google.protobuf.ITimestamp|null} [createTime] ModelEvaluation createTime - * @property {Array.|null} [sliceDimensions] ModelEvaluation sliceDimensions - * @property {string|null} [dataItemSchemaUri] ModelEvaluation dataItemSchemaUri - * @property {string|null} [annotationSchemaUri] ModelEvaluation annotationSchemaUri - * @property {google.cloud.aiplatform.v1.IModelExplanation|null} [modelExplanation] ModelEvaluation modelExplanation - * @property {Array.|null} [explanationSpecs] ModelEvaluation explanationSpecs - * @property {google.protobuf.IValue|null} [metadata] ModelEvaluation metadata + * @interface IPublisherModel + * @property {string|null} [name] PublisherModel name + * @property {string|null} [versionId] PublisherModel versionId + * @property {google.cloud.aiplatform.v1.PublisherModel.OpenSourceCategory|null} [openSourceCategory] PublisherModel openSourceCategory + * @property {google.cloud.aiplatform.v1.PublisherModel.ICallToAction|null} [supportedActions] PublisherModel supportedActions + * @property {Array.|null} [frameworks] PublisherModel frameworks + * @property {google.cloud.aiplatform.v1.PublisherModel.LaunchStage|null} [launchStage] PublisherModel launchStage + * @property {string|null} [publisherModelTemplate] PublisherModel publisherModelTemplate + * @property {google.cloud.aiplatform.v1.IPredictSchemata|null} [predictSchemata] PublisherModel predictSchemata */ /** - * Constructs a new ModelEvaluation. + * Constructs a new PublisherModel. * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a ModelEvaluation. - * @implements IModelEvaluation + * @classdesc Represents a PublisherModel. + * @implements IPublisherModel * @constructor - * @param {google.cloud.aiplatform.v1.IModelEvaluation=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.IPublisherModel=} [properties] Properties to set */ - function ModelEvaluation(properties) { - this.sliceDimensions = []; - this.explanationSpecs = []; + function PublisherModel(properties) { + this.frameworks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122001,172 +126883,141 @@ } /** - * ModelEvaluation name. + * PublisherModel name. * @member {string} name - * @memberof google.cloud.aiplatform.v1.ModelEvaluation - * @instance - */ - ModelEvaluation.prototype.name = ""; - - /** - * ModelEvaluation displayName. - * @member {string} displayName - * @memberof google.cloud.aiplatform.v1.ModelEvaluation - * @instance - */ - ModelEvaluation.prototype.displayName = ""; - - /** - * ModelEvaluation metricsSchemaUri. - * @member {string} metricsSchemaUri - * @memberof google.cloud.aiplatform.v1.ModelEvaluation - * @instance - */ - ModelEvaluation.prototype.metricsSchemaUri = ""; - - /** - * ModelEvaluation metrics. - * @member {google.protobuf.IValue|null|undefined} metrics - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @instance */ - ModelEvaluation.prototype.metrics = null; + PublisherModel.prototype.name = ""; /** - * ModelEvaluation createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * PublisherModel versionId. + * @member {string} versionId + * @memberof google.cloud.aiplatform.v1.PublisherModel * @instance */ - ModelEvaluation.prototype.createTime = null; + PublisherModel.prototype.versionId = ""; /** - * ModelEvaluation sliceDimensions. - * @member {Array.} sliceDimensions - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * PublisherModel openSourceCategory. + * @member {google.cloud.aiplatform.v1.PublisherModel.OpenSourceCategory} openSourceCategory + * @memberof google.cloud.aiplatform.v1.PublisherModel * @instance */ - ModelEvaluation.prototype.sliceDimensions = $util.emptyArray; + PublisherModel.prototype.openSourceCategory = 0; /** - * ModelEvaluation dataItemSchemaUri. - * @member {string} dataItemSchemaUri - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * PublisherModel supportedActions. + * @member {google.cloud.aiplatform.v1.PublisherModel.ICallToAction|null|undefined} supportedActions + * @memberof google.cloud.aiplatform.v1.PublisherModel * @instance */ - ModelEvaluation.prototype.dataItemSchemaUri = ""; + PublisherModel.prototype.supportedActions = null; /** - * ModelEvaluation annotationSchemaUri. - * @member {string} annotationSchemaUri - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * PublisherModel frameworks. + * @member {Array.} frameworks + * @memberof google.cloud.aiplatform.v1.PublisherModel * @instance */ - ModelEvaluation.prototype.annotationSchemaUri = ""; + PublisherModel.prototype.frameworks = $util.emptyArray; /** - * ModelEvaluation modelExplanation. - * @member {google.cloud.aiplatform.v1.IModelExplanation|null|undefined} modelExplanation - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * PublisherModel launchStage. + * @member {google.cloud.aiplatform.v1.PublisherModel.LaunchStage} launchStage + * @memberof google.cloud.aiplatform.v1.PublisherModel * @instance */ - ModelEvaluation.prototype.modelExplanation = null; + PublisherModel.prototype.launchStage = 0; /** - * ModelEvaluation explanationSpecs. - * @member {Array.} explanationSpecs - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * PublisherModel publisherModelTemplate. + * @member {string} publisherModelTemplate + * @memberof google.cloud.aiplatform.v1.PublisherModel * @instance */ - ModelEvaluation.prototype.explanationSpecs = $util.emptyArray; + PublisherModel.prototype.publisherModelTemplate = ""; /** - * ModelEvaluation metadata. - * @member {google.protobuf.IValue|null|undefined} metadata - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * PublisherModel predictSchemata. + * @member {google.cloud.aiplatform.v1.IPredictSchemata|null|undefined} predictSchemata + * @memberof google.cloud.aiplatform.v1.PublisherModel * @instance */ - ModelEvaluation.prototype.metadata = null; + PublisherModel.prototype.predictSchemata = null; /** - * Creates a new ModelEvaluation instance using the specified properties. + * Creates a new PublisherModel instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @static - * @param {google.cloud.aiplatform.v1.IModelEvaluation=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ModelEvaluation} ModelEvaluation instance + * @param {google.cloud.aiplatform.v1.IPublisherModel=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.PublisherModel} PublisherModel instance */ - ModelEvaluation.create = function create(properties) { - return new ModelEvaluation(properties); + PublisherModel.create = function create(properties) { + return new PublisherModel(properties); }; /** - * Encodes the specified ModelEvaluation message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluation.verify|verify} messages. + * Encodes the specified PublisherModel message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @static - * @param {google.cloud.aiplatform.v1.IModelEvaluation} message ModelEvaluation message or plain object to encode + * @param {google.cloud.aiplatform.v1.IPublisherModel} message PublisherModel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelEvaluation.encode = function encode(message, writer) { + PublisherModel.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.metricsSchemaUri != null && Object.hasOwnProperty.call(message, "metricsSchemaUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metricsSchemaUri); - if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) - $root.google.protobuf.Value.encode(message.metrics, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sliceDimensions != null && message.sliceDimensions.length) - for (var i = 0; i < message.sliceDimensions.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.sliceDimensions[i]); - if (message.dataItemSchemaUri != null && Object.hasOwnProperty.call(message, "dataItemSchemaUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.dataItemSchemaUri); - if (message.annotationSchemaUri != null && Object.hasOwnProperty.call(message, "annotationSchemaUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.annotationSchemaUri); - if (message.modelExplanation != null && Object.hasOwnProperty.call(message, "modelExplanation")) - $root.google.cloud.aiplatform.v1.ModelExplanation.encode(message.modelExplanation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.explanationSpecs != null && message.explanationSpecs.length) - for (var i = 0; i < message.explanationSpecs.length; ++i) - $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.encode(message.explanationSpecs[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.displayName); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Value.encode(message.metadata, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.versionId); + if (message.openSourceCategory != null && Object.hasOwnProperty.call(message, "openSourceCategory")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.openSourceCategory); + if (message.supportedActions != null && Object.hasOwnProperty.call(message, "supportedActions")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.encode(message.supportedActions, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.frameworks != null && message.frameworks.length) + for (var i = 0; i < message.frameworks.length; ++i) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.frameworks[i]); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 29, wireType 0 =*/232).int32(message.launchStage); + if (message.publisherModelTemplate != null && Object.hasOwnProperty.call(message, "publisherModelTemplate")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.publisherModelTemplate); + if (message.predictSchemata != null && Object.hasOwnProperty.call(message, "predictSchemata")) + $root.google.cloud.aiplatform.v1.PredictSchemata.encode(message.predictSchemata, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); return writer; }; /** - * Encodes the specified ModelEvaluation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluation.verify|verify} messages. + * Encodes the specified PublisherModel message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @static - * @param {google.cloud.aiplatform.v1.IModelEvaluation} message ModelEvaluation message or plain object to encode + * @param {google.cloud.aiplatform.v1.IPublisherModel} message PublisherModel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelEvaluation.encodeDelimited = function encodeDelimited(message, writer) { + PublisherModel.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ModelEvaluation message from the specified reader or buffer. + * Decodes a PublisherModel message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @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.ModelEvaluation} ModelEvaluation + * @returns {google.cloud.aiplatform.v1.PublisherModel} PublisherModel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelEvaluation.decode = function decode(reader, length) { + PublisherModel.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.ModelEvaluation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.PublisherModel(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -122174,48 +127025,34 @@ message.name = reader.string(); break; } - case 10: { - message.displayName = reader.string(); - break; - } case 2: { - message.metricsSchemaUri = reader.string(); - break; - } - case 3: { - message.metrics = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.versionId = reader.string(); break; } - case 5: { - if (!(message.sliceDimensions && message.sliceDimensions.length)) - message.sliceDimensions = []; - message.sliceDimensions.push(reader.string()); + case 7: { + message.openSourceCategory = reader.int32(); break; } - case 6: { - message.dataItemSchemaUri = reader.string(); + case 19: { + message.supportedActions = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.decode(reader, reader.uint32()); break; } - case 7: { - message.annotationSchemaUri = reader.string(); + case 23: { + if (!(message.frameworks && message.frameworks.length)) + message.frameworks = []; + message.frameworks.push(reader.string()); break; } - case 8: { - message.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.decode(reader, reader.uint32()); + case 29: { + message.launchStage = reader.int32(); break; } - case 9: { - if (!(message.explanationSpecs && message.explanationSpecs.length)) - message.explanationSpecs = []; - message.explanationSpecs.push($root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.decode(reader, reader.uint32())); + case 30: { + message.publisherModelTemplate = reader.string(); break; } - case 11: { - message.metadata = $root.google.protobuf.Value.decode(reader, reader.uint32()); + case 31: { + message.predictSchemata = $root.google.cloud.aiplatform.v1.PredictSchemata.decode(reader, reader.uint32()); break; } default: @@ -122227,252 +127064,273 @@ }; /** - * Decodes a ModelEvaluation message from the specified reader or buffer, length delimited. + * Decodes a PublisherModel message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ModelEvaluation} ModelEvaluation + * @returns {google.cloud.aiplatform.v1.PublisherModel} PublisherModel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelEvaluation.decodeDelimited = function decodeDelimited(reader) { + PublisherModel.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ModelEvaluation message. + * Verifies a PublisherModel message. * @function verify - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ModelEvaluation.verify = function verify(message) { + PublisherModel.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.metricsSchemaUri != null && message.hasOwnProperty("metricsSchemaUri")) - if (!$util.isString(message.metricsSchemaUri)) - return "metricsSchemaUri: string expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - var error = $root.google.protobuf.Value.verify(message.metrics); - if (error) - return "metrics." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (!$util.isString(message.versionId)) + return "versionId: string expected"; + if (message.openSourceCategory != null && message.hasOwnProperty("openSourceCategory")) + switch (message.openSourceCategory) { + default: + return "openSourceCategory: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.supportedActions != null && message.hasOwnProperty("supportedActions")) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.verify(message.supportedActions); if (error) - return "createTime." + error; - } - if (message.sliceDimensions != null && message.hasOwnProperty("sliceDimensions")) { - if (!Array.isArray(message.sliceDimensions)) - return "sliceDimensions: array expected"; - for (var i = 0; i < message.sliceDimensions.length; ++i) - if (!$util.isString(message.sliceDimensions[i])) - return "sliceDimensions: string[] expected"; + return "supportedActions." + error; } - if (message.dataItemSchemaUri != null && message.hasOwnProperty("dataItemSchemaUri")) - if (!$util.isString(message.dataItemSchemaUri)) - return "dataItemSchemaUri: string expected"; - if (message.annotationSchemaUri != null && message.hasOwnProperty("annotationSchemaUri")) - if (!$util.isString(message.annotationSchemaUri)) - return "annotationSchemaUri: string expected"; - if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) { - var error = $root.google.cloud.aiplatform.v1.ModelExplanation.verify(message.modelExplanation); - if (error) - return "modelExplanation." + error; + if (message.frameworks != null && message.hasOwnProperty("frameworks")) { + if (!Array.isArray(message.frameworks)) + return "frameworks: array expected"; + for (var i = 0; i < message.frameworks.length; ++i) + if (!$util.isString(message.frameworks[i])) + return "frameworks: string[] expected"; } - if (message.explanationSpecs != null && message.hasOwnProperty("explanationSpecs")) { - if (!Array.isArray(message.explanationSpecs)) - return "explanationSpecs: array expected"; - for (var i = 0; i < message.explanationSpecs.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.verify(message.explanationSpecs[i]); - if (error) - return "explanationSpecs." + error; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Value.verify(message.metadata); + if (message.publisherModelTemplate != null && message.hasOwnProperty("publisherModelTemplate")) + if (!$util.isString(message.publisherModelTemplate)) + return "publisherModelTemplate: string expected"; + if (message.predictSchemata != null && message.hasOwnProperty("predictSchemata")) { + var error = $root.google.cloud.aiplatform.v1.PredictSchemata.verify(message.predictSchemata); if (error) - return "metadata." + error; + return "predictSchemata." + error; } return null; }; /** - * Creates a ModelEvaluation message from a plain object. Also converts values to their respective internal types. + * Creates a PublisherModel message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ModelEvaluation} ModelEvaluation + * @returns {google.cloud.aiplatform.v1.PublisherModel} PublisherModel */ - ModelEvaluation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluation) + PublisherModel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.PublisherModel) return object; - var message = new $root.google.cloud.aiplatform.v1.ModelEvaluation(); + var message = new $root.google.cloud.aiplatform.v1.PublisherModel(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.metricsSchemaUri != null) - message.metricsSchemaUri = String(object.metricsSchemaUri); - if (object.metrics != null) { - if (typeof object.metrics !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.metrics: object expected"); - message.metrics = $root.google.protobuf.Value.fromObject(object.metrics); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + if (object.versionId != null) + message.versionId = String(object.versionId); + switch (object.openSourceCategory) { + default: + if (typeof object.openSourceCategory === "number") { + message.openSourceCategory = object.openSourceCategory; + break; + } + break; + case "OPEN_SOURCE_CATEGORY_UNSPECIFIED": + case 0: + message.openSourceCategory = 0; + break; + case "PROPRIETARY": + case 1: + message.openSourceCategory = 1; + break; + case "GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT": + case 2: + message.openSourceCategory = 2; + break; + case "THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT": + case 3: + message.openSourceCategory = 3; + break; + case "GOOGLE_OWNED_OSS": + case 4: + message.openSourceCategory = 4; + break; + case "THIRD_PARTY_OWNED_OSS": + case 5: + message.openSourceCategory = 5; + break; } - if (object.sliceDimensions) { - if (!Array.isArray(object.sliceDimensions)) - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.sliceDimensions: array expected"); - message.sliceDimensions = []; - for (var i = 0; i < object.sliceDimensions.length; ++i) - message.sliceDimensions[i] = String(object.sliceDimensions[i]); + if (object.supportedActions != null) { + if (typeof object.supportedActions !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.supportedActions: object expected"); + message.supportedActions = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.fromObject(object.supportedActions); } - if (object.dataItemSchemaUri != null) - message.dataItemSchemaUri = String(object.dataItemSchemaUri); - if (object.annotationSchemaUri != null) - message.annotationSchemaUri = String(object.annotationSchemaUri); - if (object.modelExplanation != null) { - if (typeof object.modelExplanation !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.modelExplanation: object expected"); - message.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.fromObject(object.modelExplanation); + if (object.frameworks) { + if (!Array.isArray(object.frameworks)) + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.frameworks: array expected"); + message.frameworks = []; + for (var i = 0; i < object.frameworks.length; ++i) + message.frameworks[i] = String(object.frameworks[i]); } - if (object.explanationSpecs) { - if (!Array.isArray(object.explanationSpecs)) - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.explanationSpecs: array expected"); - message.explanationSpecs = []; - for (var i = 0; i < object.explanationSpecs.length; ++i) { - if (typeof object.explanationSpecs[i] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.explanationSpecs: object expected"); - message.explanationSpecs[i] = $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.fromObject(object.explanationSpecs[i]); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "EXPERIMENTAL": + case 1: + message.launchStage = 1; + break; + case "PRIVATE_PREVIEW": + case 2: + message.launchStage = 2; + break; + case "PUBLIC_PREVIEW": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.metadata: object expected"); - message.metadata = $root.google.protobuf.Value.fromObject(object.metadata); + if (object.publisherModelTemplate != null) + message.publisherModelTemplate = String(object.publisherModelTemplate); + if (object.predictSchemata != null) { + if (typeof object.predictSchemata !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.predictSchemata: object expected"); + message.predictSchemata = $root.google.cloud.aiplatform.v1.PredictSchemata.fromObject(object.predictSchemata); } return message; }; /** - * Creates a plain object from a ModelEvaluation message. Also converts values to other types if specified. + * Creates a plain object from a PublisherModel message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluation} message ModelEvaluation + * @param {google.cloud.aiplatform.v1.PublisherModel} message PublisherModel * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelEvaluation.toObject = function toObject(message, options) { + PublisherModel.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.sliceDimensions = []; - object.explanationSpecs = []; - } + if (options.arrays || options.defaults) + object.frameworks = []; if (options.defaults) { object.name = ""; - object.metricsSchemaUri = ""; - object.metrics = null; - object.createTime = null; - object.dataItemSchemaUri = ""; - object.annotationSchemaUri = ""; - object.modelExplanation = null; - object.displayName = ""; - object.metadata = null; + object.versionId = ""; + object.openSourceCategory = options.enums === String ? "OPEN_SOURCE_CATEGORY_UNSPECIFIED" : 0; + object.supportedActions = null; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.publisherModelTemplate = ""; + object.predictSchemata = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.metricsSchemaUri != null && message.hasOwnProperty("metricsSchemaUri")) - object.metricsSchemaUri = message.metricsSchemaUri; - if (message.metrics != null && message.hasOwnProperty("metrics")) - object.metrics = $root.google.protobuf.Value.toObject(message.metrics, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.sliceDimensions && message.sliceDimensions.length) { - object.sliceDimensions = []; - for (var j = 0; j < message.sliceDimensions.length; ++j) - object.sliceDimensions[j] = message.sliceDimensions[j]; - } - if (message.dataItemSchemaUri != null && message.hasOwnProperty("dataItemSchemaUri")) - object.dataItemSchemaUri = message.dataItemSchemaUri; - if (message.annotationSchemaUri != null && message.hasOwnProperty("annotationSchemaUri")) - object.annotationSchemaUri = message.annotationSchemaUri; - if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) - object.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.toObject(message.modelExplanation, options); - if (message.explanationSpecs && message.explanationSpecs.length) { - object.explanationSpecs = []; - for (var j = 0; j < message.explanationSpecs.length; ++j) - object.explanationSpecs[j] = $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.toObject(message.explanationSpecs[j], options); + if (message.versionId != null && message.hasOwnProperty("versionId")) + object.versionId = message.versionId; + if (message.openSourceCategory != null && message.hasOwnProperty("openSourceCategory")) + object.openSourceCategory = options.enums === String ? $root.google.cloud.aiplatform.v1.PublisherModel.OpenSourceCategory[message.openSourceCategory] === undefined ? message.openSourceCategory : $root.google.cloud.aiplatform.v1.PublisherModel.OpenSourceCategory[message.openSourceCategory] : message.openSourceCategory; + if (message.supportedActions != null && message.hasOwnProperty("supportedActions")) + object.supportedActions = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.toObject(message.supportedActions, options); + if (message.frameworks && message.frameworks.length) { + object.frameworks = []; + for (var j = 0; j < message.frameworks.length; ++j) + object.frameworks[j] = message.frameworks[j]; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Value.toObject(message.metadata, options); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.cloud.aiplatform.v1.PublisherModel.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.cloud.aiplatform.v1.PublisherModel.LaunchStage[message.launchStage] : message.launchStage; + if (message.publisherModelTemplate != null && message.hasOwnProperty("publisherModelTemplate")) + object.publisherModelTemplate = message.publisherModelTemplate; + if (message.predictSchemata != null && message.hasOwnProperty("predictSchemata")) + object.predictSchemata = $root.google.cloud.aiplatform.v1.PredictSchemata.toObject(message.predictSchemata, options); return object; }; /** - * Converts this ModelEvaluation to JSON. + * Converts this PublisherModel to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @instance * @returns {Object.} JSON object */ - ModelEvaluation.prototype.toJSON = function toJSON() { + PublisherModel.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ModelEvaluation + * Gets the default type url for PublisherModel * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ModelEvaluation + * @memberof google.cloud.aiplatform.v1.PublisherModel * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ModelEvaluation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PublisherModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluation"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.PublisherModel"; }; - ModelEvaluation.ModelEvaluationExplanationSpec = (function() { + PublisherModel.ResourceReference = (function() { /** - * Properties of a ModelEvaluationExplanationSpec. - * @memberof google.cloud.aiplatform.v1.ModelEvaluation - * @interface IModelEvaluationExplanationSpec - * @property {string|null} [explanationType] ModelEvaluationExplanationSpec explanationType - * @property {google.cloud.aiplatform.v1.IExplanationSpec|null} [explanationSpec] ModelEvaluationExplanationSpec explanationSpec + * Properties of a ResourceReference. + * @memberof google.cloud.aiplatform.v1.PublisherModel + * @interface IResourceReference + * @property {string|null} [uri] ResourceReference uri + * @property {string|null} [resourceName] ResourceReference resourceName */ /** - * Constructs a new ModelEvaluationExplanationSpec. - * @memberof google.cloud.aiplatform.v1.ModelEvaluation - * @classdesc Represents a ModelEvaluationExplanationSpec. - * @implements IModelEvaluationExplanationSpec + * Constructs a new ResourceReference. + * @memberof google.cloud.aiplatform.v1.PublisherModel + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.cloud.aiplatform.v1.ModelEvaluation.IModelEvaluationExplanationSpec=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.PublisherModel.IResourceReference=} [properties] Properties to set */ - function ModelEvaluationExplanationSpec(properties) { + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122480,89 +127338,103 @@ } /** - * ModelEvaluationExplanationSpec explanationType. - * @member {string} explanationType - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * ResourceReference uri. + * @member {string|null|undefined} uri + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @instance */ - ModelEvaluationExplanationSpec.prototype.explanationType = ""; + ResourceReference.prototype.uri = null; /** - * ModelEvaluationExplanationSpec explanationSpec. - * @member {google.cloud.aiplatform.v1.IExplanationSpec|null|undefined} explanationSpec - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * ResourceReference resourceName. + * @member {string|null|undefined} resourceName + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @instance */ - ModelEvaluationExplanationSpec.prototype.explanationSpec = null; + ResourceReference.prototype.resourceName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new ModelEvaluationExplanationSpec instance using the specified properties. + * ResourceReference reference. + * @member {"uri"|"resourceName"|undefined} reference + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference + * @instance + */ + Object.defineProperty(ResourceReference.prototype, "reference", { + get: $util.oneOfGetter($oneOfFields = ["uri", "resourceName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluation.IModelEvaluationExplanationSpec=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec} ModelEvaluationExplanationSpec instance + * @param {google.cloud.aiplatform.v1.PublisherModel.IResourceReference=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.PublisherModel.ResourceReference} ResourceReference instance */ - ModelEvaluationExplanationSpec.create = function create(properties) { - return new ModelEvaluationExplanationSpec(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified ModelEvaluationExplanationSpec message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluation.IModelEvaluationExplanationSpec} message ModelEvaluationExplanationSpec message or plain object to encode + * @param {google.cloud.aiplatform.v1.PublisherModel.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelEvaluationExplanationSpec.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.explanationType != null && Object.hasOwnProperty.call(message, "explanationType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.explanationType); - if (message.explanationSpec != null && Object.hasOwnProperty.call(message, "explanationSpec")) - $root.google.cloud.aiplatform.v1.ExplanationSpec.encode(message.explanationSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceName); return writer; }; /** - * Encodes the specified ModelEvaluationExplanationSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluation.IModelEvaluationExplanationSpec} message ModelEvaluationExplanationSpec message or plain object to encode + * @param {google.cloud.aiplatform.v1.PublisherModel.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelEvaluationExplanationSpec.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ModelEvaluationExplanationSpec message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @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.ModelEvaluation.ModelEvaluationExplanationSpec} ModelEvaluationExplanationSpec + * @returns {google.cloud.aiplatform.v1.PublisherModel.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelEvaluationExplanationSpec.decode = function decode(reader, length) { + ResourceReference.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.ModelEvaluation.ModelEvaluationExplanationSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.PublisherModel.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.explanationType = reader.string(); + message.uri = reader.string(); break; } case 2: { - message.explanationSpec = $root.google.cloud.aiplatform.v1.ExplanationSpec.decode(reader, reader.uint32()); + message.resourceName = reader.string(); break; } default: @@ -122574,477 +127446,375 @@ }; /** - * Decodes a ModelEvaluationExplanationSpec message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec} ModelEvaluationExplanationSpec + * @returns {google.cloud.aiplatform.v1.PublisherModel.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelEvaluationExplanationSpec.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ModelEvaluationExplanationSpec message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ModelEvaluationExplanationSpec.verify = function verify(message) { + ResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.explanationType != null && message.hasOwnProperty("explanationType")) - if (!$util.isString(message.explanationType)) - return "explanationType: string expected"; - if (message.explanationSpec != null && message.hasOwnProperty("explanationSpec")) { - var error = $root.google.cloud.aiplatform.v1.ExplanationSpec.verify(message.explanationSpec); - if (error) - return "explanationSpec." + error; + var properties = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + properties.reference = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.resourceName != null && message.hasOwnProperty("resourceName")) { + if (properties.reference === 1) + return "reference: multiple values"; + properties.reference = 1; + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; } return null; }; /** - * Creates a ModelEvaluationExplanationSpec message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec} ModelEvaluationExplanationSpec + * @returns {google.cloud.aiplatform.v1.PublisherModel.ResourceReference} ResourceReference */ - ModelEvaluationExplanationSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.PublisherModel.ResourceReference) return object; - var message = new $root.google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec(); - if (object.explanationType != null) - message.explanationType = String(object.explanationType); - if (object.explanationSpec != null) { - if (typeof object.explanationSpec !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec.explanationSpec: object expected"); - message.explanationSpec = $root.google.cloud.aiplatform.v1.ExplanationSpec.fromObject(object.explanationSpec); - } + var message = new $root.google.cloud.aiplatform.v1.PublisherModel.ResourceReference(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); return message; }; /** - * Creates a plain object from a ModelEvaluationExplanationSpec message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec} message ModelEvaluationExplanationSpec + * @param {google.cloud.aiplatform.v1.PublisherModel.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelEvaluationExplanationSpec.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.explanationType = ""; - object.explanationSpec = null; + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.reference = "uri"; + } + if (message.resourceName != null && message.hasOwnProperty("resourceName")) { + object.resourceName = message.resourceName; + if (options.oneofs) + object.reference = "resourceName"; } - if (message.explanationType != null && message.hasOwnProperty("explanationType")) - object.explanationType = message.explanationType; - if (message.explanationSpec != null && message.hasOwnProperty("explanationSpec")) - object.explanationSpec = $root.google.cloud.aiplatform.v1.ExplanationSpec.toObject(message.explanationSpec, options); return object; }; /** - * Converts this ModelEvaluationExplanationSpec to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @instance * @returns {Object.} JSON object */ - ModelEvaluationExplanationSpec.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ModelEvaluationExplanationSpec + * Gets the default type url for ResourceReference * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.ResourceReference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ModelEvaluationExplanationSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.PublisherModel.ResourceReference"; }; - return ModelEvaluationExplanationSpec; + return ResourceReference; })(); - return ModelEvaluation; - })(); - - v1.ModelEvaluationSlice = (function() { - - /** - * Properties of a ModelEvaluationSlice. - * @memberof google.cloud.aiplatform.v1 - * @interface IModelEvaluationSlice - * @property {string|null} [name] ModelEvaluationSlice name - * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice|null} [slice] ModelEvaluationSlice slice - * @property {string|null} [metricsSchemaUri] ModelEvaluationSlice metricsSchemaUri - * @property {google.protobuf.IValue|null} [metrics] ModelEvaluationSlice metrics - * @property {google.protobuf.ITimestamp|null} [createTime] ModelEvaluationSlice createTime - * @property {google.cloud.aiplatform.v1.IModelExplanation|null} [modelExplanation] ModelEvaluationSlice modelExplanation - */ - - /** - * Constructs a new ModelEvaluationSlice. - * @memberof google.cloud.aiplatform.v1 - * @classdesc Represents a ModelEvaluationSlice. - * @implements IModelEvaluationSlice - * @constructor - * @param {google.cloud.aiplatform.v1.IModelEvaluationSlice=} [properties] Properties to set - */ - function ModelEvaluationSlice(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]]; - } - - /** - * ModelEvaluationSlice name. - * @member {string} name - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @instance - */ - ModelEvaluationSlice.prototype.name = ""; - - /** - * ModelEvaluationSlice slice. - * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice|null|undefined} slice - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @instance - */ - ModelEvaluationSlice.prototype.slice = null; + PublisherModel.Documentation = (function() { - /** - * ModelEvaluationSlice metricsSchemaUri. - * @member {string} metricsSchemaUri - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @instance - */ - ModelEvaluationSlice.prototype.metricsSchemaUri = ""; + /** + * Properties of a Documentation. + * @memberof google.cloud.aiplatform.v1.PublisherModel + * @interface IDocumentation + * @property {string|null} [title] Documentation title + * @property {string|null} [content] Documentation content + */ - /** - * ModelEvaluationSlice metrics. - * @member {google.protobuf.IValue|null|undefined} metrics - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @instance - */ - ModelEvaluationSlice.prototype.metrics = null; + /** + * Constructs a new Documentation. + * @memberof google.cloud.aiplatform.v1.PublisherModel + * @classdesc Represents a Documentation. + * @implements IDocumentation + * @constructor + * @param {google.cloud.aiplatform.v1.PublisherModel.IDocumentation=} [properties] Properties to set + */ + function Documentation(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]]; + } - /** - * ModelEvaluationSlice createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @instance - */ - ModelEvaluationSlice.prototype.createTime = null; + /** + * Documentation title. + * @member {string} title + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @instance + */ + Documentation.prototype.title = ""; - /** - * ModelEvaluationSlice modelExplanation. - * @member {google.cloud.aiplatform.v1.IModelExplanation|null|undefined} modelExplanation - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @instance - */ - ModelEvaluationSlice.prototype.modelExplanation = null; + /** + * Documentation content. + * @member {string} content + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @instance + */ + Documentation.prototype.content = ""; - /** - * Creates a new ModelEvaluationSlice instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @static - * @param {google.cloud.aiplatform.v1.IModelEvaluationSlice=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice} ModelEvaluationSlice instance - */ - ModelEvaluationSlice.create = function create(properties) { - return new ModelEvaluationSlice(properties); - }; + /** + * Creates a new Documentation instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.IDocumentation=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.PublisherModel.Documentation} Documentation instance + */ + Documentation.create = function create(properties) { + return new Documentation(properties); + }; - /** - * Encodes the specified ModelEvaluationSlice message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @static - * @param {google.cloud.aiplatform.v1.IModelEvaluationSlice} message ModelEvaluationSlice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModelEvaluationSlice.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.slice != null && Object.hasOwnProperty.call(message, "slice")) - $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.encode(message.slice, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metricsSchemaUri != null && Object.hasOwnProperty.call(message, "metricsSchemaUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.metricsSchemaUri); - if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) - $root.google.protobuf.Value.encode(message.metrics, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.modelExplanation != null && Object.hasOwnProperty.call(message, "modelExplanation")) - $root.google.cloud.aiplatform.v1.ModelExplanation.encode(message.modelExplanation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Documentation message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.Documentation.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + return writer; + }; - /** - * Encodes the specified ModelEvaluationSlice message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @static - * @param {google.cloud.aiplatform.v1.IModelEvaluationSlice} message ModelEvaluationSlice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModelEvaluationSlice.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.Documentation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ModelEvaluationSlice message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @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.ModelEvaluationSlice} ModelEvaluationSlice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModelEvaluationSlice.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.ModelEvaluationSlice(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.slice = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.decode(reader, reader.uint32()); - break; - } - case 3: { - message.metricsSchemaUri = reader.string(); - break; - } - case 4: { - message.metrics = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.decode(reader, reader.uint32()); + /** + * Decodes a Documentation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @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.PublisherModel.Documentation} Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documentation.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.PublisherModel.Documentation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.title = reader.string(); + break; + } + case 2: { + message.content = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a ModelEvaluationSlice message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice} ModelEvaluationSlice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModelEvaluationSlice.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a ModelEvaluationSlice message. - * @function verify - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModelEvaluationSlice.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.slice != null && message.hasOwnProperty("slice")) { - var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.verify(message.slice); - if (error) - return "slice." + error; - } - if (message.metricsSchemaUri != null && message.hasOwnProperty("metricsSchemaUri")) - if (!$util.isString(message.metricsSchemaUri)) - return "metricsSchemaUri: string expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - var error = $root.google.protobuf.Value.verify(message.metrics); - if (error) - return "metrics." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) { - var error = $root.google.cloud.aiplatform.v1.ModelExplanation.verify(message.modelExplanation); - if (error) - return "modelExplanation." + error; - } - return null; - }; + /** + * Decodes a Documentation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.PublisherModel.Documentation} Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documentation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ModelEvaluationSlice message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice} ModelEvaluationSlice - */ - ModelEvaluationSlice.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice) + /** + * Verifies a Documentation message. + * @function verify + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Documentation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + return null; + }; + + /** + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.PublisherModel.Documentation} Documentation + */ + Documentation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.PublisherModel.Documentation) + return object; + var message = new $root.google.cloud.aiplatform.v1.PublisherModel.Documentation(); + if (object.title != null) + message.title = String(object.title); + if (object.content != null) + message.content = String(object.content); + return message; + }; + + /** + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.Documentation} message Documentation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Documentation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.content = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; return object; - var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice(); - if (object.name != null) - message.name = String(object.name); - if (object.slice != null) { - if (typeof object.slice !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.slice: object expected"); - message.slice = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.fromObject(object.slice); - } - if (object.metricsSchemaUri != null) - message.metricsSchemaUri = String(object.metricsSchemaUri); - if (object.metrics != null) { - if (typeof object.metrics !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics: object expected"); - message.metrics = $root.google.protobuf.Value.fromObject(object.metrics); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.modelExplanation != null) { - if (typeof object.modelExplanation !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.modelExplanation: object expected"); - message.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.fromObject(object.modelExplanation); - } - return message; - }; + }; - /** - * Creates a plain object from a ModelEvaluationSlice message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice} message ModelEvaluationSlice - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModelEvaluationSlice.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.slice = null; - object.metricsSchemaUri = ""; - object.metrics = null; - object.createTime = null; - object.modelExplanation = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.slice != null && message.hasOwnProperty("slice")) - object.slice = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.toObject(message.slice, options); - if (message.metricsSchemaUri != null && message.hasOwnProperty("metricsSchemaUri")) - object.metricsSchemaUri = message.metricsSchemaUri; - if (message.metrics != null && message.hasOwnProperty("metrics")) - object.metrics = $root.google.protobuf.Value.toObject(message.metrics, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) - object.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.toObject(message.modelExplanation, options); - return object; - }; + /** + * Converts this Documentation to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @instance + * @returns {Object.} JSON object + */ + Documentation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ModelEvaluationSlice to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @instance - * @returns {Object.} JSON object - */ - ModelEvaluationSlice.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Documentation + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.PublisherModel.Documentation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Documentation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.PublisherModel.Documentation"; + }; - /** - * Gets the default type url for ModelEvaluationSlice - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ModelEvaluationSlice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice"; - }; + return Documentation; + })(); - ModelEvaluationSlice.Slice = (function() { + PublisherModel.CallToAction = (function() { /** - * Properties of a Slice. - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @interface ISlice - * @property {string|null} [dimension] Slice dimension - * @property {string|null} [value] Slice value - * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec|null} [sliceSpec] Slice sliceSpec + * Properties of a CallToAction. + * @memberof google.cloud.aiplatform.v1.PublisherModel + * @interface ICallToAction + * @property {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi|null} [viewRestApi] CallToAction viewRestApi + * @property {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openNotebook] CallToAction openNotebook + * @property {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [createApplication] CallToAction createApplication + * @property {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openFineTuningPipeline] CallToAction openFineTuningPipeline + * @property {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openPromptTuningPipeline] CallToAction openPromptTuningPipeline + * @property {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openGenie] CallToAction openGenie + * @property {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy|null} [deploy] CallToAction deploy + * @property {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openGenerationAiStudio] CallToAction openGenerationAiStudio + * @property {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [requestAccess] CallToAction requestAccess */ /** - * Constructs a new Slice. - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice - * @classdesc Represents a Slice. - * @implements ISlice + * Constructs a new CallToAction. + * @memberof google.cloud.aiplatform.v1.PublisherModel + * @classdesc Represents a CallToAction. + * @implements ICallToAction * @constructor - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.PublisherModel.ICallToAction=} [properties] Properties to set */ - function Slice(properties) { + function CallToAction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -123052,103 +127822,187 @@ } /** - * Slice dimension. - * @member {string} dimension - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * CallToAction viewRestApi. + * @member {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi|null|undefined} viewRestApi + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @instance */ - Slice.prototype.dimension = ""; + CallToAction.prototype.viewRestApi = null; /** - * Slice value. - * @member {string} value - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * CallToAction openNotebook. + * @member {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} openNotebook + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @instance */ - Slice.prototype.value = ""; + CallToAction.prototype.openNotebook = null; /** - * Slice sliceSpec. - * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec|null|undefined} sliceSpec - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * CallToAction createApplication. + * @member {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} createApplication + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @instance */ - Slice.prototype.sliceSpec = null; + CallToAction.prototype.createApplication = null; /** - * Creates a new Slice instance using the specified properties. + * CallToAction openFineTuningPipeline. + * @member {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} openFineTuningPipeline + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.openFineTuningPipeline = null; + + /** + * CallToAction openPromptTuningPipeline. + * @member {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} openPromptTuningPipeline + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.openPromptTuningPipeline = null; + + /** + * CallToAction openGenie. + * @member {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} openGenie + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.openGenie = null; + + /** + * CallToAction deploy. + * @member {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy|null|undefined} deploy + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.deploy = null; + + /** + * CallToAction openGenerationAiStudio. + * @member {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} openGenerationAiStudio + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.openGenerationAiStudio = null; + + /** + * CallToAction requestAccess. + * @member {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} requestAccess + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.requestAccess = null; + + /** + * Creates a new CallToAction instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} Slice instance + * @param {google.cloud.aiplatform.v1.PublisherModel.ICallToAction=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction} CallToAction instance */ - Slice.create = function create(properties) { - return new Slice(properties); + CallToAction.create = function create(properties) { + return new CallToAction(properties); }; /** - * Encodes the specified Slice message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.verify|verify} messages. + * Encodes the specified CallToAction message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice} message Slice message or plain object to encode + * @param {google.cloud.aiplatform.v1.PublisherModel.ICallToAction} message CallToAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Slice.encode = function encode(message, writer) { + CallToAction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimension); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.sliceSpec != null && Object.hasOwnProperty.call(message, "sliceSpec")) - $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.encode(message.sliceSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.viewRestApi != null && Object.hasOwnProperty.call(message, "viewRestApi")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.encode(message.viewRestApi, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.openNotebook != null && Object.hasOwnProperty.call(message, "openNotebook")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openNotebook, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createApplication != null && Object.hasOwnProperty.call(message, "createApplication")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.createApplication, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.openFineTuningPipeline != null && Object.hasOwnProperty.call(message, "openFineTuningPipeline")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openFineTuningPipeline, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.openPromptTuningPipeline != null && Object.hasOwnProperty.call(message, "openPromptTuningPipeline")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openPromptTuningPipeline, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.openGenie != null && Object.hasOwnProperty.call(message, "openGenie")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openGenie, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.deploy != null && Object.hasOwnProperty.call(message, "deploy")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.encode(message.deploy, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.openGenerationAiStudio != null && Object.hasOwnProperty.call(message, "openGenerationAiStudio")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openGenerationAiStudio, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.requestAccess != null && Object.hasOwnProperty.call(message, "requestAccess")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.requestAccess, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified Slice message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.verify|verify} messages. + * Encodes the specified CallToAction message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.ISlice} message Slice message or plain object to encode + * @param {google.cloud.aiplatform.v1.PublisherModel.ICallToAction} message CallToAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Slice.encodeDelimited = function encodeDelimited(message, writer) { + CallToAction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Slice message from the specified reader or buffer. + * Decodes a CallToAction message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @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.ModelEvaluationSlice.Slice} Slice + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction} CallToAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Slice.decode = function decode(reader, length) { + CallToAction.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.ModelEvaluationSlice.Slice(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dimension = reader.string(); + message.viewRestApi = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.decode(reader, reader.uint32()); break; } case 2: { - message.value = reader.string(); + message.openNotebook = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); break; } case 3: { - message.sliceSpec = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.decode(reader, reader.uint32()); + message.createApplication = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + case 4: { + message.openFineTuningPipeline = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + case 5: { + message.openPromptTuningPipeline = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + case 6: { + message.openGenie = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + case 7: { + message.deploy = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.decode(reader, reader.uint32()); + break; + } + case 8: { + message.openGenerationAiStudio = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + case 9: { + message.requestAccess = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); break; } default: @@ -123160,142 +128014,231 @@ }; /** - * Decodes a Slice message from the specified reader or buffer, length delimited. + * Decodes a CallToAction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} Slice + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction} CallToAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Slice.decodeDelimited = function decodeDelimited(reader) { + CallToAction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Slice message. + * Verifies a CallToAction message. * @function verify - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Slice.verify = function verify(message) { + CallToAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dimension != null && message.hasOwnProperty("dimension")) - if (!$util.isString(message.dimension)) - return "dimension: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.sliceSpec != null && message.hasOwnProperty("sliceSpec")) { - var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify(message.sliceSpec); + if (message.viewRestApi != null && message.hasOwnProperty("viewRestApi")) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.verify(message.viewRestApi); if (error) - return "sliceSpec." + error; + return "viewRestApi." + error; + } + if (message.openNotebook != null && message.hasOwnProperty("openNotebook")) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.openNotebook); + if (error) + return "openNotebook." + error; + } + if (message.createApplication != null && message.hasOwnProperty("createApplication")) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.createApplication); + if (error) + return "createApplication." + error; + } + if (message.openFineTuningPipeline != null && message.hasOwnProperty("openFineTuningPipeline")) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.openFineTuningPipeline); + if (error) + return "openFineTuningPipeline." + error; + } + if (message.openPromptTuningPipeline != null && message.hasOwnProperty("openPromptTuningPipeline")) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.openPromptTuningPipeline); + if (error) + return "openPromptTuningPipeline." + error; + } + if (message.openGenie != null && message.hasOwnProperty("openGenie")) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.openGenie); + if (error) + return "openGenie." + error; + } + if (message.deploy != null && message.hasOwnProperty("deploy")) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.verify(message.deploy); + if (error) + return "deploy." + error; + } + if (message.openGenerationAiStudio != null && message.hasOwnProperty("openGenerationAiStudio")) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.openGenerationAiStudio); + if (error) + return "openGenerationAiStudio." + error; + } + if (message.requestAccess != null && message.hasOwnProperty("requestAccess")) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.requestAccess); + if (error) + return "requestAccess." + error; } return null; }; /** - * Creates a Slice message from a plain object. Also converts values to their respective internal types. + * Creates a CallToAction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} Slice + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction} CallToAction */ - Slice.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice) + CallToAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction) return object; - var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice(); - if (object.dimension != null) - message.dimension = String(object.dimension); - if (object.value != null) - message.value = String(object.value); - if (object.sliceSpec != null) { - if (typeof object.sliceSpec !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.sliceSpec: object expected"); - message.sliceSpec = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.fromObject(object.sliceSpec); + var message = new $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction(); + if (object.viewRestApi != null) { + if (typeof object.viewRestApi !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.viewRestApi: object expected"); + message.viewRestApi = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.fromObject(object.viewRestApi); + } + if (object.openNotebook != null) { + if (typeof object.openNotebook !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.openNotebook: object expected"); + message.openNotebook = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openNotebook); + } + if (object.createApplication != null) { + if (typeof object.createApplication !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.createApplication: object expected"); + message.createApplication = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.createApplication); + } + if (object.openFineTuningPipeline != null) { + if (typeof object.openFineTuningPipeline !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.openFineTuningPipeline: object expected"); + message.openFineTuningPipeline = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openFineTuningPipeline); + } + if (object.openPromptTuningPipeline != null) { + if (typeof object.openPromptTuningPipeline !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.openPromptTuningPipeline: object expected"); + message.openPromptTuningPipeline = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openPromptTuningPipeline); + } + if (object.openGenie != null) { + if (typeof object.openGenie !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.openGenie: object expected"); + message.openGenie = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openGenie); + } + if (object.deploy != null) { + if (typeof object.deploy !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.deploy: object expected"); + message.deploy = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.fromObject(object.deploy); + } + if (object.openGenerationAiStudio != null) { + if (typeof object.openGenerationAiStudio !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.openGenerationAiStudio: object expected"); + message.openGenerationAiStudio = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openGenerationAiStudio); + } + if (object.requestAccess != null) { + if (typeof object.requestAccess !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.requestAccess: object expected"); + message.requestAccess = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.requestAccess); } return message; }; /** - * Creates a plain object from a Slice message. Also converts values to other types if specified. + * Creates a plain object from a CallToAction message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} message Slice + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction} message CallToAction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Slice.toObject = function toObject(message, options) { + CallToAction.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dimension = ""; - object.value = ""; - object.sliceSpec = null; + object.viewRestApi = null; + object.openNotebook = null; + object.createApplication = null; + object.openFineTuningPipeline = null; + object.openPromptTuningPipeline = null; + object.openGenie = null; + object.deploy = null; + object.openGenerationAiStudio = null; + object.requestAccess = null; } - if (message.dimension != null && message.hasOwnProperty("dimension")) - object.dimension = message.dimension; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.sliceSpec != null && message.hasOwnProperty("sliceSpec")) - object.sliceSpec = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.toObject(message.sliceSpec, options); + if (message.viewRestApi != null && message.hasOwnProperty("viewRestApi")) + object.viewRestApi = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.toObject(message.viewRestApi, options); + if (message.openNotebook != null && message.hasOwnProperty("openNotebook")) + object.openNotebook = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openNotebook, options); + if (message.createApplication != null && message.hasOwnProperty("createApplication")) + object.createApplication = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.createApplication, options); + if (message.openFineTuningPipeline != null && message.hasOwnProperty("openFineTuningPipeline")) + object.openFineTuningPipeline = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openFineTuningPipeline, options); + if (message.openPromptTuningPipeline != null && message.hasOwnProperty("openPromptTuningPipeline")) + object.openPromptTuningPipeline = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openPromptTuningPipeline, options); + if (message.openGenie != null && message.hasOwnProperty("openGenie")) + object.openGenie = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openGenie, options); + if (message.deploy != null && message.hasOwnProperty("deploy")) + object.deploy = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.toObject(message.deploy, options); + if (message.openGenerationAiStudio != null && message.hasOwnProperty("openGenerationAiStudio")) + object.openGenerationAiStudio = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openGenerationAiStudio, options); + if (message.requestAccess != null && message.hasOwnProperty("requestAccess")) + object.requestAccess = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.requestAccess, options); return object; }; /** - * Converts this Slice to JSON. + * Converts this CallToAction to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @instance * @returns {Object.} JSON object */ - Slice.prototype.toJSON = function toJSON() { + CallToAction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Slice + * Gets the default type url for CallToAction * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Slice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CallToAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.PublisherModel.CallToAction"; }; - Slice.SliceSpec = (function() { + CallToAction.RegionalResourceReferences = (function() { /** - * Properties of a SliceSpec. - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice - * @interface ISliceSpec - * @property {Object.|null} [configs] SliceSpec configs + * Properties of a RegionalResourceReferences. + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @interface IRegionalResourceReferences + * @property {Object.|null} [references] RegionalResourceReferences references + * @property {string|null} [title] RegionalResourceReferences title */ /** - * Constructs a new SliceSpec. - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice - * @classdesc Represents a SliceSpec. - * @implements ISliceSpec + * Constructs a new RegionalResourceReferences. + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @classdesc Represents a RegionalResourceReferences. + * @implements IRegionalResourceReferences * @constructor - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec=} [properties] Properties to set + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences=} [properties] Properties to set */ - function SliceSpec(properties) { - this.configs = {}; + function RegionalResourceReferences(properties) { + this.references = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -123303,79 +128246,89 @@ } /** - * SliceSpec configs. - * @member {Object.} configs - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * RegionalResourceReferences references. + * @member {Object.} references + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences * @instance */ - SliceSpec.prototype.configs = $util.emptyObject; + RegionalResourceReferences.prototype.references = $util.emptyObject; /** - * Creates a new SliceSpec instance using the specified properties. + * RegionalResourceReferences title. + * @member {string} title + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences + * @instance + */ + RegionalResourceReferences.prototype.title = ""; + + /** + * Creates a new RegionalResourceReferences instance using the specified properties. * @function create - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec instance + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences} RegionalResourceReferences instance */ - SliceSpec.create = function create(properties) { - return new SliceSpec(properties); + RegionalResourceReferences.create = function create(properties) { + return new RegionalResourceReferences(properties); }; /** - * Encodes the specified SliceSpec message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. + * Encodes the specified RegionalResourceReferences message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify|verify} messages. * @function encode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec} message SliceSpec message or plain object to encode + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences} message RegionalResourceReferences message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SliceSpec.encode = function encode(message, writer) { + RegionalResourceReferences.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.configs != null && Object.hasOwnProperty.call(message, "configs")) - for (var keys = Object.keys(message.configs), i = 0; i < keys.length; ++i) { + if (message.references != null && Object.hasOwnProperty.call(message, "references")) + for (var keys = Object.keys(message.references), 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.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.encode(message.configs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.cloud.aiplatform.v1.PublisherModel.ResourceReference.encode(message.references[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); return writer; }; /** - * Encodes the specified SliceSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. + * Encodes the specified RegionalResourceReferences message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec} message SliceSpec message or plain object to encode + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IRegionalResourceReferences} message RegionalResourceReferences message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SliceSpec.encodeDelimited = function encodeDelimited(message, writer) { + RegionalResourceReferences.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SliceSpec message from the specified reader or buffer. + * Decodes a RegionalResourceReferences message from the specified reader or buffer. * @function decode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences * @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.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences} RegionalResourceReferences * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SliceSpec.decode = function decode(reader, length) { + RegionalResourceReferences.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.ModelEvaluationSlice.Slice.SliceSpec(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.configs === $util.emptyObject) - message.configs = {}; + if (message.references === $util.emptyObject) + message.references = {}; var end2 = reader.uint32() + reader.pos; key = ""; value = null; @@ -123386,14 +128339,616 @@ key = reader.string(); break; case 2: - value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.decode(reader, reader.uint32()); + value = $root.google.cloud.aiplatform.v1.PublisherModel.ResourceReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag2 & 7); break; } } - message.configs[key] = value; + message.references[key] = value; + break; + } + case 2: { + message.title = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RegionalResourceReferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences} RegionalResourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegionalResourceReferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegionalResourceReferences message. + * @function verify + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegionalResourceReferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!$util.isObject(message.references)) + return "references: object expected"; + var key = Object.keys(message.references); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.ResourceReference.verify(message.references[key[i]]); + if (error) + return "references." + error; + } + } + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + return null; + }; + + /** + * Creates a RegionalResourceReferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences} RegionalResourceReferences + */ + RegionalResourceReferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences) + return object; + var message = new $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences(); + if (object.references) { + if (typeof object.references !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.references: object expected"); + message.references = {}; + for (var keys = Object.keys(object.references), i = 0; i < keys.length; ++i) { + if (typeof object.references[keys[i]] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences.references: object expected"); + message.references[keys[i]] = $root.google.cloud.aiplatform.v1.PublisherModel.ResourceReference.fromObject(object.references[keys[i]]); + } + } + if (object.title != null) + message.title = String(object.title); + return message; + }; + + /** + * Creates a plain object from a RegionalResourceReferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences} message RegionalResourceReferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegionalResourceReferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.references = {}; + if (options.defaults) + object.title = ""; + var keys2; + if (message.references && (keys2 = Object.keys(message.references)).length) { + object.references = {}; + for (var j = 0; j < keys2.length; ++j) + object.references[keys2[j]] = $root.google.cloud.aiplatform.v1.PublisherModel.ResourceReference.toObject(message.references[keys2[j]], options); + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + return object; + }; + + /** + * Converts this RegionalResourceReferences to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences + * @instance + * @returns {Object.} JSON object + */ + RegionalResourceReferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegionalResourceReferences + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegionalResourceReferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences"; + }; + + return RegionalResourceReferences; + })(); + + CallToAction.ViewRestApi = (function() { + + /** + * Properties of a ViewRestApi. + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @interface IViewRestApi + * @property {Array.|null} [documentations] ViewRestApi documentations + * @property {string|null} [title] ViewRestApi title + */ + + /** + * Constructs a new ViewRestApi. + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @classdesc Represents a ViewRestApi. + * @implements IViewRestApi + * @constructor + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi=} [properties] Properties to set + */ + function ViewRestApi(properties) { + this.documentations = []; + 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]]; + } + + /** + * ViewRestApi documentations. + * @member {Array.} documentations + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @instance + */ + ViewRestApi.prototype.documentations = $util.emptyArray; + + /** + * ViewRestApi title. + * @member {string} title + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @instance + */ + ViewRestApi.prototype.title = ""; + + /** + * Creates a new ViewRestApi instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi} ViewRestApi instance + */ + ViewRestApi.create = function create(properties) { + return new ViewRestApi(properties); + }; + + /** + * Encodes the specified ViewRestApi message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi} message ViewRestApi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewRestApi.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documentations != null && message.documentations.length) + for (var i = 0; i < message.documentations.length; ++i) + $root.google.cloud.aiplatform.v1.PublisherModel.Documentation.encode(message.documentations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + return writer; + }; + + /** + * Encodes the specified ViewRestApi message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IViewRestApi} message ViewRestApi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewRestApi.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ViewRestApi message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @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.PublisherModel.CallToAction.ViewRestApi} ViewRestApi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewRestApi.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.PublisherModel.CallToAction.ViewRestApi(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.documentations && message.documentations.length)) + message.documentations = []; + message.documentations.push($root.google.cloud.aiplatform.v1.PublisherModel.Documentation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.title = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ViewRestApi message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi} ViewRestApi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewRestApi.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ViewRestApi message. + * @function verify + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ViewRestApi.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documentations != null && message.hasOwnProperty("documentations")) { + if (!Array.isArray(message.documentations)) + return "documentations: array expected"; + for (var i = 0; i < message.documentations.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.Documentation.verify(message.documentations[i]); + if (error) + return "documentations." + error; + } + } + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + return null; + }; + + /** + * Creates a ViewRestApi message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi} ViewRestApi + */ + ViewRestApi.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi) + return object; + var message = new $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi(); + if (object.documentations) { + if (!Array.isArray(object.documentations)) + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.documentations: array expected"); + message.documentations = []; + for (var i = 0; i < object.documentations.length; ++i) { + if (typeof object.documentations[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi.documentations: object expected"); + message.documentations[i] = $root.google.cloud.aiplatform.v1.PublisherModel.Documentation.fromObject(object.documentations[i]); + } + } + if (object.title != null) + message.title = String(object.title); + return message; + }; + + /** + * Creates a plain object from a ViewRestApi message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi} message ViewRestApi + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ViewRestApi.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.documentations = []; + if (options.defaults) + object.title = ""; + if (message.documentations && message.documentations.length) { + object.documentations = []; + for (var j = 0; j < message.documentations.length; ++j) + object.documentations[j] = $root.google.cloud.aiplatform.v1.PublisherModel.Documentation.toObject(message.documentations[j], options); + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + return object; + }; + + /** + * Converts this ViewRestApi to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @instance + * @returns {Object.} JSON object + */ + ViewRestApi.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ViewRestApi + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ViewRestApi.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi"; + }; + + return ViewRestApi; + })(); + + CallToAction.Deploy = (function() { + + /** + * Properties of a Deploy. + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @interface IDeploy + * @property {google.cloud.aiplatform.v1.IDedicatedResources|null} [dedicatedResources] Deploy dedicatedResources + * @property {google.cloud.aiplatform.v1.IAutomaticResources|null} [automaticResources] Deploy automaticResources + * @property {string|null} [sharedResources] Deploy sharedResources + * @property {string|null} [modelDisplayName] Deploy modelDisplayName + * @property {google.cloud.aiplatform.v1.ILargeModelReference|null} [largeModelReference] Deploy largeModelReference + * @property {google.cloud.aiplatform.v1.IModelContainerSpec|null} [containerSpec] Deploy containerSpec + * @property {string|null} [artifactUri] Deploy artifactUri + * @property {string|null} [title] Deploy title + */ + + /** + * Constructs a new Deploy. + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction + * @classdesc Represents a Deploy. + * @implements IDeploy + * @constructor + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy=} [properties] Properties to set + */ + function Deploy(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]]; + } + + /** + * Deploy dedicatedResources. + * @member {google.cloud.aiplatform.v1.IDedicatedResources|null|undefined} dedicatedResources + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.dedicatedResources = null; + + /** + * Deploy automaticResources. + * @member {google.cloud.aiplatform.v1.IAutomaticResources|null|undefined} automaticResources + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.automaticResources = null; + + /** + * Deploy sharedResources. + * @member {string|null|undefined} sharedResources + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.sharedResources = null; + + /** + * Deploy modelDisplayName. + * @member {string} modelDisplayName + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.modelDisplayName = ""; + + /** + * Deploy largeModelReference. + * @member {google.cloud.aiplatform.v1.ILargeModelReference|null|undefined} largeModelReference + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.largeModelReference = null; + + /** + * Deploy containerSpec. + * @member {google.cloud.aiplatform.v1.IModelContainerSpec|null|undefined} containerSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.containerSpec = null; + + /** + * Deploy artifactUri. + * @member {string} artifactUri + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.artifactUri = ""; + + /** + * Deploy title. + * @member {string} title + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.title = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Deploy predictionResources. + * @member {"dedicatedResources"|"automaticResources"|"sharedResources"|undefined} predictionResources + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Object.defineProperty(Deploy.prototype, "predictionResources", { + get: $util.oneOfGetter($oneOfFields = ["dedicatedResources", "automaticResources", "sharedResources"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Deploy instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy} Deploy instance + */ + Deploy.create = function create(properties) { + return new Deploy(properties); + }; + + /** + * Encodes the specified Deploy message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy} message Deploy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deploy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.modelDisplayName != null && Object.hasOwnProperty.call(message, "modelDisplayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.modelDisplayName); + if (message.largeModelReference != null && Object.hasOwnProperty.call(message, "largeModelReference")) + $root.google.cloud.aiplatform.v1.LargeModelReference.encode(message.largeModelReference, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.containerSpec != null && Object.hasOwnProperty.call(message, "containerSpec")) + $root.google.cloud.aiplatform.v1.ModelContainerSpec.encode(message.containerSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactUri); + if (message.dedicatedResources != null && Object.hasOwnProperty.call(message, "dedicatedResources")) + $root.google.cloud.aiplatform.v1.DedicatedResources.encode(message.dedicatedResources, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.automaticResources != null && Object.hasOwnProperty.call(message, "automaticResources")) + $root.google.cloud.aiplatform.v1.AutomaticResources.encode(message.automaticResources, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.sharedResources != null && Object.hasOwnProperty.call(message, "sharedResources")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.sharedResources); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.title); + return writer; + }; + + /** + * Encodes the specified Deploy message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.IDeploy} message Deploy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deploy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deploy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @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.PublisherModel.CallToAction.Deploy} Deploy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deploy.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.PublisherModel.CallToAction.Deploy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.dedicatedResources = $root.google.cloud.aiplatform.v1.DedicatedResources.decode(reader, reader.uint32()); + break; + } + case 6: { + message.automaticResources = $root.google.cloud.aiplatform.v1.AutomaticResources.decode(reader, reader.uint32()); + break; + } + case 7: { + message.sharedResources = reader.string(); + break; + } + case 1: { + message.modelDisplayName = reader.string(); + break; + } + case 2: { + message.largeModelReference = $root.google.cloud.aiplatform.v1.LargeModelReference.decode(reader, reader.uint32()); + break; + } + case 3: { + message.containerSpec = $root.google.cloud.aiplatform.v1.ModelContainerSpec.decode(reader, reader.uint32()); + break; + } + case 4: { + message.artifactUri = reader.string(); + break; + } + case 8: { + message.title = reader.string(); break; } default: @@ -123405,901 +128960,246 @@ }; /** - * Decodes a SliceSpec message from the specified reader or buffer, length delimited. + * Decodes a Deploy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy} Deploy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SliceSpec.decodeDelimited = function decodeDelimited(reader) { + Deploy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SliceSpec message. + * Verifies a Deploy message. * @function verify - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SliceSpec.verify = function verify(message) { + Deploy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.configs != null && message.hasOwnProperty("configs")) { - if (!$util.isObject(message.configs)) - return "configs: object expected"; - var key = Object.keys(message.configs); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify(message.configs[key[i]]); + var properties = {}; + if (message.dedicatedResources != null && message.hasOwnProperty("dedicatedResources")) { + properties.predictionResources = 1; + { + var error = $root.google.cloud.aiplatform.v1.DedicatedResources.verify(message.dedicatedResources); if (error) - return "configs." + error; + return "dedicatedResources." + error; + } + } + if (message.automaticResources != null && message.hasOwnProperty("automaticResources")) { + if (properties.predictionResources === 1) + return "predictionResources: multiple values"; + properties.predictionResources = 1; + { + var error = $root.google.cloud.aiplatform.v1.AutomaticResources.verify(message.automaticResources); + if (error) + return "automaticResources." + error; } } + if (message.sharedResources != null && message.hasOwnProperty("sharedResources")) { + if (properties.predictionResources === 1) + return "predictionResources: multiple values"; + properties.predictionResources = 1; + if (!$util.isString(message.sharedResources)) + return "sharedResources: string expected"; + } + if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) + if (!$util.isString(message.modelDisplayName)) + return "modelDisplayName: string expected"; + if (message.largeModelReference != null && message.hasOwnProperty("largeModelReference")) { + var error = $root.google.cloud.aiplatform.v1.LargeModelReference.verify(message.largeModelReference); + if (error) + return "largeModelReference." + error; + } + if (message.containerSpec != null && message.hasOwnProperty("containerSpec")) { + var error = $root.google.cloud.aiplatform.v1.ModelContainerSpec.verify(message.containerSpec); + if (error) + return "containerSpec." + error; + } + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + if (!$util.isString(message.artifactUri)) + return "artifactUri: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; return null; }; /** - * Creates a SliceSpec message from a plain object. Also converts values to their respective internal types. + * Creates a Deploy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy * @static * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy} Deploy */ - SliceSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec) + Deploy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy) return object; - var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec(); - if (object.configs) { - if (typeof object.configs !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.configs: object expected"); - message.configs = {}; - for (var keys = Object.keys(object.configs), i = 0; i < keys.length; ++i) { - if (typeof object.configs[keys[i]] !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.configs: object expected"); - message.configs[keys[i]] = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.fromObject(object.configs[keys[i]]); - } + var message = new $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy(); + if (object.dedicatedResources != null) { + if (typeof object.dedicatedResources !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.dedicatedResources: object expected"); + message.dedicatedResources = $root.google.cloud.aiplatform.v1.DedicatedResources.fromObject(object.dedicatedResources); + } + if (object.automaticResources != null) { + if (typeof object.automaticResources !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.automaticResources: object expected"); + message.automaticResources = $root.google.cloud.aiplatform.v1.AutomaticResources.fromObject(object.automaticResources); + } + if (object.sharedResources != null) + message.sharedResources = String(object.sharedResources); + if (object.modelDisplayName != null) + message.modelDisplayName = String(object.modelDisplayName); + if (object.largeModelReference != null) { + if (typeof object.largeModelReference !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.largeModelReference: object expected"); + message.largeModelReference = $root.google.cloud.aiplatform.v1.LargeModelReference.fromObject(object.largeModelReference); + } + if (object.containerSpec != null) { + if (typeof object.containerSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.containerSpec: object expected"); + message.containerSpec = $root.google.cloud.aiplatform.v1.ModelContainerSpec.fromObject(object.containerSpec); } + if (object.artifactUri != null) + message.artifactUri = String(object.artifactUri); + if (object.title != null) + message.title = String(object.title); return message; }; /** - * Creates a plain object from a SliceSpec message. Also converts values to other types if specified. + * Creates a plain object from a Deploy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} message SliceSpec + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy} message Deploy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SliceSpec.toObject = function toObject(message, options) { + Deploy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.configs = {}; - var keys2; - if (message.configs && (keys2 = Object.keys(message.configs)).length) { - object.configs = {}; - for (var j = 0; j < keys2.length; ++j) - object.configs[keys2[j]] = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.toObject(message.configs[keys2[j]], options); + if (options.defaults) { + object.modelDisplayName = ""; + object.largeModelReference = null; + object.containerSpec = null; + object.artifactUri = ""; + object.title = ""; + } + if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) + object.modelDisplayName = message.modelDisplayName; + if (message.largeModelReference != null && message.hasOwnProperty("largeModelReference")) + object.largeModelReference = $root.google.cloud.aiplatform.v1.LargeModelReference.toObject(message.largeModelReference, options); + if (message.containerSpec != null && message.hasOwnProperty("containerSpec")) + object.containerSpec = $root.google.cloud.aiplatform.v1.ModelContainerSpec.toObject(message.containerSpec, options); + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + object.artifactUri = message.artifactUri; + if (message.dedicatedResources != null && message.hasOwnProperty("dedicatedResources")) { + object.dedicatedResources = $root.google.cloud.aiplatform.v1.DedicatedResources.toObject(message.dedicatedResources, options); + if (options.oneofs) + object.predictionResources = "dedicatedResources"; + } + if (message.automaticResources != null && message.hasOwnProperty("automaticResources")) { + object.automaticResources = $root.google.cloud.aiplatform.v1.AutomaticResources.toObject(message.automaticResources, options); + if (options.oneofs) + object.predictionResources = "automaticResources"; + } + if (message.sharedResources != null && message.hasOwnProperty("sharedResources")) { + object.sharedResources = message.sharedResources; + if (options.oneofs) + object.predictionResources = "sharedResources"; } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; return object; }; /** - * Converts this SliceSpec to JSON. + * Converts this Deploy to JSON. * @function toJSON - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy * @instance * @returns {Object.} JSON object */ - SliceSpec.prototype.toJSON = function toJSON() { + Deploy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SliceSpec + * Gets the default type url for Deploy * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SliceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Deploy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec"; + return typeUrlPrefix + "/google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy"; }; - SliceSpec.SliceConfig = (function() { - - /** - * Properties of a SliceConfig. - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec - * @interface ISliceConfig - * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null} [value] SliceConfig value - * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null} [range] SliceConfig range - * @property {google.protobuf.IBoolValue|null} [allValues] SliceConfig allValues - */ - - /** - * Constructs a new SliceConfig. - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec - * @classdesc Represents a SliceConfig. - * @implements ISliceConfig - * @constructor - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig=} [properties] Properties to set - */ - function SliceConfig(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]]; - } - - /** - * SliceConfig value. - * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null|undefined} value - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @instance - */ - SliceConfig.prototype.value = null; - - /** - * SliceConfig range. - * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null|undefined} range - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @instance - */ - SliceConfig.prototype.range = null; - - /** - * SliceConfig allValues. - * @member {google.protobuf.IBoolValue|null|undefined} allValues - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @instance - */ - SliceConfig.prototype.allValues = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SliceConfig kind. - * @member {"value"|"range"|"allValues"|undefined} kind - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @instance - */ - Object.defineProperty(SliceConfig.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["value", "range", "allValues"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SliceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig instance - */ - SliceConfig.create = function create(properties) { - return new SliceConfig(properties); - }; - - /** - * Encodes the specified SliceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig} message SliceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SliceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.encode(message.value, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.range != null && Object.hasOwnProperty.call(message, "range")) - $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.encode(message.range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.allValues != null && Object.hasOwnProperty.call(message, "allValues")) - $root.google.protobuf.BoolValue.encode(message.allValues, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SliceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig} message SliceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SliceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SliceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @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.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SliceConfig.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.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.decode(reader, reader.uint32()); - break; - } - case 2: { - message.range = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.decode(reader, reader.uint32()); - break; - } - case 3: { - message.allValues = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SliceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SliceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SliceConfig message. - * @function verify - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SliceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties.kind = 1; - { - var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify(message.value); - if (error) - return "value." + error; - } - } - if (message.range != null && message.hasOwnProperty("range")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify(message.range); - if (error) - return "range." + error; - } - } - if (message.allValues != null && message.hasOwnProperty("allValues")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.BoolValue.verify(message.allValues); - if (error) - return "allValues." + error; - } - } - return null; - }; - - /** - * Creates a SliceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig - */ - SliceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig) - return object; - var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig(); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.value: object expected"); - message.value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.fromObject(object.value); - } - if (object.range != null) { - if (typeof object.range !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.range: object expected"); - message.range = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.fromObject(object.range); - } - if (object.allValues != null) { - if (typeof object.allValues !== "object") - throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.allValues: object expected"); - message.allValues = $root.google.protobuf.BoolValue.fromObject(object.allValues); - } - return message; - }; - - /** - * Creates a plain object from a SliceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} message SliceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SliceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.toObject(message.value, options); - if (options.oneofs) - object.kind = "value"; - } - if (message.range != null && message.hasOwnProperty("range")) { - object.range = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.toObject(message.range, options); - if (options.oneofs) - object.kind = "range"; - } - if (message.allValues != null && message.hasOwnProperty("allValues")) { - object.allValues = $root.google.protobuf.BoolValue.toObject(message.allValues, options); - if (options.oneofs) - object.kind = "allValues"; - } - return object; - }; - - /** - * Converts this SliceConfig to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @instance - * @returns {Object.} JSON object - */ - SliceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SliceConfig - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SliceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig"; - }; - - return SliceConfig; - })(); - - SliceSpec.Range = (function() { - - /** - * Properties of a Range. - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec - * @interface IRange - * @property {number|null} [low] Range low - * @property {number|null} [high] Range high - */ - - /** - * Constructs a new Range. - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec - * @classdesc Represents a Range. - * @implements IRange - * @constructor - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange=} [properties] Properties to set - */ - function Range(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]]; - } - - /** - * Range low. - * @member {number} low - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @instance - */ - Range.prototype.low = 0; - - /** - * Range high. - * @member {number} high - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @instance - */ - Range.prototype.high = 0; - - /** - * Creates a new Range instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range instance - */ - Range.create = function create(properties) { - return new Range(properties); - }; - - /** - * Encodes the specified Range message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Range.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.low != null && Object.hasOwnProperty.call(message, "low")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.low); - if (message.high != null && Object.hasOwnProperty.call(message, "high")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.high); - return writer; - }; - - /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Range.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Range message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @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.ModelEvaluationSlice.Slice.SliceSpec.Range} Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Range.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.ModelEvaluationSlice.Slice.SliceSpec.Range(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.low = reader.float(); - break; - } - case 2: { - message.high = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Range message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Range.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Range message. - * @function verify - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Range.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.low != null && message.hasOwnProperty("low")) - if (typeof message.low !== "number") - return "low: number expected"; - if (message.high != null && message.hasOwnProperty("high")) - if (typeof message.high !== "number") - return "high: number expected"; - return null; - }; - - /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range - */ - Range.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range) - return object; - var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range(); - if (object.low != null) - message.low = Number(object.low); - if (object.high != null) - message.high = Number(object.high); - return message; - }; - - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} message Range - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Range.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.low = 0; - object.high = 0; - } - if (message.low != null && message.hasOwnProperty("low")) - object.low = options.json && !isFinite(message.low) ? String(message.low) : message.low; - if (message.high != null && message.hasOwnProperty("high")) - object.high = options.json && !isFinite(message.high) ? String(message.high) : message.high; - return object; - }; - - /** - * Converts this Range to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @instance - * @returns {Object.} JSON object - */ - Range.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Range - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Range.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range"; - }; - - return Range; - })(); - - SliceSpec.Value = (function() { - - /** - * Properties of a Value. - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec - * @interface IValue - * @property {string|null} [stringValue] Value stringValue - * @property {number|null} [floatValue] Value floatValue - */ - - /** - * Constructs a new Value. - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue=} [properties] Properties to set - */ - function Value(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]]; - } - - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @instance - */ - Value.prototype.stringValue = null; - - /** - * Value floatValue. - * @member {number|null|undefined} floatValue - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @instance - */ - Value.prototype.floatValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Value kind. - * @member {"stringValue"|"floatValue"|undefined} kind - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["stringValue", "floatValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue=} [properties] Properties to set - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify|verify} messages. - * @function encode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue); - if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.floatValue); - return writer; - }; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @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.ModelEvaluationSlice.Slice.SliceSpec.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.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.ModelEvaluationSlice.Slice.SliceSpec.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.stringValue = reader.string(); - break; - } - case 2: { - message.floatValue = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Value message. - * @function verify - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.floatValue != null && message.hasOwnProperty("floatValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.floatValue !== "number") - return "floatValue: number expected"; - } - return null; - }; - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value) - return object; - var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value(); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.floatValue != null) - message.floatValue = Number(object.floatValue); - return message; - }; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @static - * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.floatValue != null && message.hasOwnProperty("floatValue")) { - object.floatValue = options.json && !isFinite(message.floatValue) ? String(message.floatValue) : message.floatValue; - if (options.oneofs) - object.kind = "floatValue"; - } - return object; - }; - - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value"; - }; + return Deploy; + })(); - return Value; - })(); + return CallToAction; + })(); - return SliceSpec; - })(); + /** + * OpenSourceCategory enum. + * @name google.cloud.aiplatform.v1.PublisherModel.OpenSourceCategory + * @enum {number} + * @property {number} OPEN_SOURCE_CATEGORY_UNSPECIFIED=0 OPEN_SOURCE_CATEGORY_UNSPECIFIED value + * @property {number} PROPRIETARY=1 PROPRIETARY value + * @property {number} GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT=2 GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT value + * @property {number} THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT=3 THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT value + * @property {number} GOOGLE_OWNED_OSS=4 GOOGLE_OWNED_OSS value + * @property {number} THIRD_PARTY_OWNED_OSS=5 THIRD_PARTY_OWNED_OSS value + */ + PublisherModel.OpenSourceCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPEN_SOURCE_CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPRIETARY"] = 1; + values[valuesById[2] = "GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT"] = 2; + values[valuesById[3] = "THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT"] = 3; + values[valuesById[4] = "GOOGLE_OWNED_OSS"] = 4; + values[valuesById[5] = "THIRD_PARTY_OWNED_OSS"] = 5; + return values; + })(); - return Slice; + /** + * LaunchStage enum. + * @name google.cloud.aiplatform.v1.PublisherModel.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} EXPERIMENTAL=1 EXPERIMENTAL value + * @property {number} PRIVATE_PREVIEW=2 PRIVATE_PREVIEW value + * @property {number} PUBLIC_PREVIEW=3 PUBLIC_PREVIEW value + * @property {number} GA=4 GA value + */ + PublisherModel.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXPERIMENTAL"] = 1; + values[valuesById[2] = "PRIVATE_PREVIEW"] = 2; + values[valuesById[3] = "PUBLIC_PREVIEW"] = 3; + values[valuesById[4] = "GA"] = 4; + return values; })(); - return ModelEvaluationSlice; + return PublisherModel; })(); v1.ModelService = (function() { @@ -252815,6 +257715,7 @@ * @property {Array.|null} [sourceUris] ImportFeatureValuesOperationMetadata sourceUris * @property {number|Long|null} [invalidRowCount] ImportFeatureValuesOperationMetadata invalidRowCount * @property {number|Long|null} [timestampOutsideRetentionRowsCount] ImportFeatureValuesOperationMetadata timestampOutsideRetentionRowsCount + * @property {Array.|null} [blockingOperationIds] ImportFeatureValuesOperationMetadata blockingOperationIds */ /** @@ -252827,6 +257728,7 @@ */ function ImportFeatureValuesOperationMetadata(properties) { this.sourceUris = []; + this.blockingOperationIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -252881,6 +257783,14 @@ */ ImportFeatureValuesOperationMetadata.prototype.timestampOutsideRetentionRowsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * ImportFeatureValuesOperationMetadata blockingOperationIds. + * @member {Array.} blockingOperationIds + * @memberof google.cloud.aiplatform.v1beta1.ImportFeatureValuesOperationMetadata + * @instance + */ + ImportFeatureValuesOperationMetadata.prototype.blockingOperationIds = $util.emptyArray; + /** * Creates a new ImportFeatureValuesOperationMetadata instance using the specified properties. * @function create @@ -252918,6 +257828,12 @@ writer.uint32(/* id 6, wireType 0 =*/48).int64(message.invalidRowCount); if (message.timestampOutsideRetentionRowsCount != null && Object.hasOwnProperty.call(message, "timestampOutsideRetentionRowsCount")) writer.uint32(/* id 7, wireType 0 =*/56).int64(message.timestampOutsideRetentionRowsCount); + if (message.blockingOperationIds != null && message.blockingOperationIds.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.blockingOperationIds.length; ++i) + writer.int64(message.blockingOperationIds[i]); + writer.ldelim(); + } return writer; }; @@ -252978,6 +257894,17 @@ message.timestampOutsideRetentionRowsCount = reader.int64(); break; } + case 8: { + if (!(message.blockingOperationIds && message.blockingOperationIds.length)) + message.blockingOperationIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.blockingOperationIds.push(reader.int64()); + } else + message.blockingOperationIds.push(reader.int64()); + break; + } default: reader.skipType(tag & 7); break; @@ -253037,6 +257964,13 @@ if (message.timestampOutsideRetentionRowsCount != null && message.hasOwnProperty("timestampOutsideRetentionRowsCount")) if (!$util.isInteger(message.timestampOutsideRetentionRowsCount) && !(message.timestampOutsideRetentionRowsCount && $util.isInteger(message.timestampOutsideRetentionRowsCount.low) && $util.isInteger(message.timestampOutsideRetentionRowsCount.high))) return "timestampOutsideRetentionRowsCount: integer|Long expected"; + if (message.blockingOperationIds != null && message.hasOwnProperty("blockingOperationIds")) { + if (!Array.isArray(message.blockingOperationIds)) + return "blockingOperationIds: array expected"; + for (var i = 0; i < message.blockingOperationIds.length; ++i) + if (!$util.isInteger(message.blockingOperationIds[i]) && !(message.blockingOperationIds[i] && $util.isInteger(message.blockingOperationIds[i].low) && $util.isInteger(message.blockingOperationIds[i].high))) + return "blockingOperationIds: integer|Long[] expected"; + } return null; }; @@ -253100,6 +258034,20 @@ message.timestampOutsideRetentionRowsCount = object.timestampOutsideRetentionRowsCount; else if (typeof object.timestampOutsideRetentionRowsCount === "object") message.timestampOutsideRetentionRowsCount = new $util.LongBits(object.timestampOutsideRetentionRowsCount.low >>> 0, object.timestampOutsideRetentionRowsCount.high >>> 0).toNumber(); + if (object.blockingOperationIds) { + if (!Array.isArray(object.blockingOperationIds)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ImportFeatureValuesOperationMetadata.blockingOperationIds: array expected"); + message.blockingOperationIds = []; + for (var i = 0; i < object.blockingOperationIds.length; ++i) + if ($util.Long) + (message.blockingOperationIds[i] = $util.Long.fromValue(object.blockingOperationIds[i])).unsigned = false; + else if (typeof object.blockingOperationIds[i] === "string") + message.blockingOperationIds[i] = parseInt(object.blockingOperationIds[i], 10); + else if (typeof object.blockingOperationIds[i] === "number") + message.blockingOperationIds[i] = object.blockingOperationIds[i]; + else if (typeof object.blockingOperationIds[i] === "object") + message.blockingOperationIds[i] = new $util.LongBits(object.blockingOperationIds[i].low >>> 0, object.blockingOperationIds[i].high >>> 0).toNumber(); + } return message; }; @@ -253116,8 +258064,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.sourceUris = []; + object.blockingOperationIds = []; + } if (options.defaults) { object.genericMetadata = null; if ($util.Long) { @@ -253168,6 +258118,14 @@ object.timestampOutsideRetentionRowsCount = options.longs === String ? String(message.timestampOutsideRetentionRowsCount) : message.timestampOutsideRetentionRowsCount; else object.timestampOutsideRetentionRowsCount = options.longs === String ? $util.Long.prototype.toString.call(message.timestampOutsideRetentionRowsCount) : options.longs === Number ? new $util.LongBits(message.timestampOutsideRetentionRowsCount.low >>> 0, message.timestampOutsideRetentionRowsCount.high >>> 0).toNumber() : message.timestampOutsideRetentionRowsCount; + if (message.blockingOperationIds && message.blockingOperationIds.length) { + object.blockingOperationIds = []; + for (var j = 0; j < message.blockingOperationIds.length; ++j) + if (typeof message.blockingOperationIds[j] === "number") + object.blockingOperationIds[j] = options.longs === String ? String(message.blockingOperationIds[j]) : message.blockingOperationIds[j]; + else + object.blockingOperationIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.blockingOperationIds[j]) : options.longs === Number ? new $util.LongBits(message.blockingOperationIds[j].low >>> 0, message.blockingOperationIds[j].high >>> 0).toNumber() : message.blockingOperationIds[j]; + } return object; }; @@ -313814,6 +318772,7 @@ * @property {google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory|null} [openSourceCategory] PublisherModel openSourceCategory * @property {google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction|null} [supportedActions] PublisherModel supportedActions * @property {Array.|null} [frameworks] PublisherModel frameworks + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.LaunchStage|null} [launchStage] PublisherModel launchStage * @property {string|null} [publisherModelTemplate] PublisherModel publisherModelTemplate * @property {google.cloud.aiplatform.v1beta1.IPredictSchemata|null} [predictSchemata] PublisherModel predictSchemata */ @@ -313874,6 +318833,14 @@ */ PublisherModel.prototype.frameworks = $util.emptyArray; + /** + * PublisherModel launchStage. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.LaunchStage} launchStage + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @instance + */ + PublisherModel.prototype.launchStage = 0; + /** * PublisherModel publisherModelTemplate. * @member {string} publisherModelTemplate @@ -313925,6 +318892,8 @@ if (message.frameworks != null && message.frameworks.length) for (var i = 0; i < message.frameworks.length; ++i) writer.uint32(/* id 23, wireType 2 =*/186).string(message.frameworks[i]); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 29, wireType 0 =*/232).int32(message.launchStage); if (message.publisherModelTemplate != null && Object.hasOwnProperty.call(message, "publisherModelTemplate")) writer.uint32(/* id 30, wireType 2 =*/242).string(message.publisherModelTemplate); if (message.predictSchemata != null && Object.hasOwnProperty.call(message, "predictSchemata")) @@ -313985,6 +318954,10 @@ message.frameworks.push(reader.string()); break; } + case 29: { + message.launchStage = reader.int32(); + break; + } case 30: { message.publisherModelTemplate = reader.string(); break; @@ -314058,6 +319031,17 @@ if (!$util.isString(message.frameworks[i])) return "frameworks: string[] expected"; } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } if (message.publisherModelTemplate != null && message.hasOwnProperty("publisherModelTemplate")) if (!$util.isString(message.publisherModelTemplate)) return "publisherModelTemplate: string expected"; @@ -314129,6 +319113,34 @@ for (var i = 0; i < object.frameworks.length; ++i) message.frameworks[i] = String(object.frameworks[i]); } + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "EXPERIMENTAL": + case 1: + message.launchStage = 1; + break; + case "PRIVATE_PREVIEW": + case 2: + message.launchStage = 2; + break; + case "PUBLIC_PREVIEW": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + } if (object.publisherModelTemplate != null) message.publisherModelTemplate = String(object.publisherModelTemplate); if (object.predictSchemata != null) { @@ -314159,6 +319171,7 @@ object.versionId = ""; object.openSourceCategory = options.enums === String ? "OPEN_SOURCE_CATEGORY_UNSPECIFIED" : 0; object.supportedActions = null; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; object.publisherModelTemplate = ""; object.predictSchemata = null; } @@ -314175,6 +319188,8 @@ for (var j = 0; j < message.frameworks.length; ++j) object.frameworks[j] = message.frameworks[j]; } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.PublisherModel.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.cloud.aiplatform.v1beta1.PublisherModel.LaunchStage[message.launchStage] : message.launchStage; if (message.publisherModelTemplate != null && message.hasOwnProperty("publisherModelTemplate")) object.publisherModelTemplate = message.publisherModelTemplate; if (message.predictSchemata != null && message.hasOwnProperty("predictSchemata")) @@ -314699,6 +319714,7 @@ * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openGenie] CallToAction openGenie * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy|null} [deploy] CallToAction deploy * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openGenerationAiStudio] CallToAction openGenerationAiStudio + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [requestAccess] CallToAction requestAccess */ /** @@ -314780,6 +319796,14 @@ */ CallToAction.prototype.openGenerationAiStudio = null; + /** + * CallToAction requestAccess. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} requestAccess + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.requestAccess = null; + /** * Creates a new CallToAction instance using the specified properties. * @function create @@ -314820,6 +319844,8 @@ $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.encode(message.deploy, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.openGenerationAiStudio != null && Object.hasOwnProperty.call(message, "openGenerationAiStudio")) $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openGenerationAiStudio, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.requestAccess != null && Object.hasOwnProperty.call(message, "requestAccess")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.requestAccess, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -314886,6 +319912,10 @@ message.openGenerationAiStudio = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); break; } + case 9: { + message.requestAccess = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -314961,6 +319991,11 @@ if (error) return "openGenerationAiStudio." + error; } + if (message.requestAccess != null && message.hasOwnProperty("requestAccess")) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.requestAccess); + if (error) + return "requestAccess." + error; + } return null; }; @@ -315016,6 +320051,11 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.openGenerationAiStudio: object expected"); message.openGenerationAiStudio = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openGenerationAiStudio); } + if (object.requestAccess != null) { + if (typeof object.requestAccess !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.requestAccess: object expected"); + message.requestAccess = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.requestAccess); + } return message; }; @@ -315041,6 +320081,7 @@ object.openGenie = null; object.deploy = null; object.openGenerationAiStudio = null; + object.requestAccess = null; } if (message.viewRestApi != null && message.hasOwnProperty("viewRestApi")) object.viewRestApi = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.toObject(message.viewRestApi, options); @@ -315058,6 +320099,8 @@ object.deploy = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.toObject(message.deploy, options); if (message.openGenerationAiStudio != null && message.hasOwnProperty("openGenerationAiStudio")) object.openGenerationAiStudio = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openGenerationAiStudio, options); + if (message.requestAccess != null && message.hasOwnProperty("requestAccess")) + object.requestAccess = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.requestAccess, options); return object; }; @@ -316047,6 +321090,26 @@ return values; })(); + /** + * LaunchStage enum. + * @name google.cloud.aiplatform.v1beta1.PublisherModel.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} EXPERIMENTAL=1 EXPERIMENTAL value + * @property {number} PRIVATE_PREVIEW=2 PRIVATE_PREVIEW value + * @property {number} PUBLIC_PREVIEW=3 PUBLIC_PREVIEW value + * @property {number} GA=4 GA value + */ + PublisherModel.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXPERIMENTAL"] = 1; + values[valuesById[2] = "PRIVATE_PREVIEW"] = 2; + values[valuesById[3] = "PUBLIC_PREVIEW"] = 3; + values[valuesById[4] = "GA"] = 4; + return values; + })(); + return PublisherModel; })(); diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 779d1624196..01ba6cca4b4 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -28,6 +28,7 @@ "NVIDIA_TESLA_P4": 4, "NVIDIA_TESLA_T4": 5, "NVIDIA_TESLA_A100": 8, + "NVIDIA_A100_80GB": 9, "NVIDIA_L4": 11, "TPU_V2": 6, "TPU_V3": 7, @@ -1610,6 +1611,13 @@ "(google.api.resource_reference).type": "aiplatform.googleapis.com/TrainingPipeline" } }, + "pipelineJob": { + "type": "string", + "id": 47, + "options": { + "(google.api.resource_reference).type": "aiplatform.googleapis.com/PipelineJob" + } + }, "containerSpec": { "type": "ModelContainerSpec", "id": 9, @@ -1760,6 +1768,17 @@ } } }, + "LargeModelReference": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "PredictSchemata": { "fields": { "instanceSchemaUri": { @@ -6496,6 +6515,11 @@ "timestampOutsideRetentionRowsCount": { "type": "int64", "id": 7 + }, + "blockingOperationIds": { + "rule": "repeated", + "type": "int64", + "id": 8 } } }, @@ -11014,6 +11038,166 @@ } } }, + "MatchService": { + "options": { + "(google.api.default_host)": "aiplatform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "FindNeighbors": { + "requestType": "FindNeighborsRequest", + "responseType": "FindNeighborsResponse", + "options": { + "(google.api.http).post": "/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:findNeighbors", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:findNeighbors", + "body": "*" + } + } + ] + }, + "ReadIndexDatapoints": { + "requestType": "ReadIndexDatapointsRequest", + "responseType": "ReadIndexDatapointsResponse", + "options": { + "(google.api.http).post": "/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:readIndexDatapoints", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:readIndexDatapoints", + "body": "*" + } + } + ] + } + } + }, + "FindNeighborsRequest": { + "fields": { + "indexEndpoint": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/IndexEndpoint" + } + }, + "deployedIndexId": { + "type": "string", + "id": 2 + }, + "queries": { + "rule": "repeated", + "type": "Query", + "id": 3 + }, + "returnFullDatapoint": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "Query": { + "fields": { + "datapoint": { + "type": "IndexDatapoint", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "neighborCount": { + "type": "int32", + "id": 2 + }, + "perCrowdingAttributeNeighborCount": { + "type": "int32", + "id": 3 + }, + "approximateNeighborCount": { + "type": "int32", + "id": 4 + }, + "fractionLeafNodesToSearchOverride": { + "type": "double", + "id": 5 + } + } + } + } + }, + "FindNeighborsResponse": { + "fields": { + "nearestNeighbors": { + "rule": "repeated", + "type": "NearestNeighbors", + "id": 1 + } + }, + "nested": { + "Neighbor": { + "fields": { + "datapoint": { + "type": "IndexDatapoint", + "id": 1 + }, + "distance": { + "type": "double", + "id": 2 + } + } + }, + "NearestNeighbors": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "neighbors": { + "rule": "repeated", + "type": "Neighbor", + "id": 2 + } + } + } + } + }, + "ReadIndexDatapointsRequest": { + "fields": { + "indexEndpoint": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/IndexEndpoint" + } + }, + "deployedIndexId": { + "type": "string", + "id": 2 + }, + "ids": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "ReadIndexDatapointsResponse": { + "fields": { + "datapoints": { + "rule": "repeated", + "type": "IndexDatapoint", + "id": 1 + } + } + }, "MetadataSchema": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/MetadataSchema", @@ -13318,6 +13502,357 @@ } } }, + "ModelGardenService": { + "options": { + "(google.api.default_host)": "aiplatform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GetPublisherModel": { + "requestType": "GetPublisherModelRequest", + "responseType": "PublisherModel", + "options": { + "(google.api.http).get": "/v1/{name=publishers/*/models/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=publishers/*/models/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "PublisherModelView": { + "values": { + "PUBLISHER_MODEL_VIEW_UNSPECIFIED": 0, + "PUBLISHER_MODEL_VIEW_BASIC": 1, + "PUBLISHER_MODEL_VIEW_FULL": 2, + "PUBLISHER_MODEL_VERSION_VIEW_BASIC": 3 + } + }, + "GetPublisherModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/PublisherModel" + } + }, + "languageCode": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "PublisherModelView", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PublisherModel": { + "options": { + "(google.api.resource).type": "aiplatform.googleapis.com/PublisherModel", + "(google.api.resource).pattern": "publishers/{publisher}/models/{model}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "versionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "openSourceCategory": { + "type": "OpenSourceCategory", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "supportedActions": { + "type": "CallToAction", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "frameworks": { + "rule": "repeated", + "type": "string", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "launchStage": { + "type": "LaunchStage", + "id": 29, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "publisherModelTemplate": { + "type": "string", + "id": 30, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "predictSchemata": { + "type": "PredictSchemata", + "id": 31, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ResourceReference": { + "oneofs": { + "reference": { + "oneof": [ + "uri", + "resourceName" + ] + } + }, + "fields": { + "uri": { + "type": "string", + "id": 1 + }, + "resourceName": { + "type": "string", + "id": 2 + } + } + }, + "Documentation": { + "fields": { + "title": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "content": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CallToAction": { + "fields": { + "viewRestApi": { + "type": "ViewRestApi", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "openNotebook": { + "type": "RegionalResourceReferences", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createApplication": { + "type": "RegionalResourceReferences", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "openFineTuningPipeline": { + "type": "RegionalResourceReferences", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "openPromptTuningPipeline": { + "type": "RegionalResourceReferences", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "openGenie": { + "type": "RegionalResourceReferences", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deploy": { + "type": "Deploy", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "openGenerationAiStudio": { + "type": "RegionalResourceReferences", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requestAccess": { + "type": "RegionalResourceReferences", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RegionalResourceReferences": { + "fields": { + "references": { + "keyType": "string", + "type": "ResourceReference", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "title": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ViewRestApi": { + "fields": { + "documentations": { + "rule": "repeated", + "type": "Documentation", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "title": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Deploy": { + "oneofs": { + "predictionResources": { + "oneof": [ + "dedicatedResources", + "automaticResources", + "sharedResources" + ] + } + }, + "fields": { + "dedicatedResources": { + "type": "DedicatedResources", + "id": 5 + }, + "automaticResources": { + "type": "AutomaticResources", + "id": 6 + }, + "sharedResources": { + "type": "string", + "id": 7 + }, + "modelDisplayName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "largeModelReference": { + "type": "LargeModelReference", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "containerSpec": { + "type": "ModelContainerSpec", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "artifactUri": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "title": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "OpenSourceCategory": { + "values": { + "OPEN_SOURCE_CATEGORY_UNSPECIFIED": 0, + "PROPRIETARY": 1, + "GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT": 2, + "THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT": 3, + "GOOGLE_OWNED_OSS": 4, + "THIRD_PARTY_OWNED_OSS": 5 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "EXPERIMENTAL": 1, + "PRIVATE_PREVIEW": 2, + "PUBLIC_PREVIEW": 3, + "GA": 4 + } + } + } + }, "ModelService": { "options": { "(google.api.default_host)": "aiplatform.googleapis.com", @@ -26723,6 +27258,11 @@ "timestampOutsideRetentionRowsCount": { "type": "int64", "id": 7 + }, + "blockingOperationIds": { + "rule": "repeated", + "type": "int64", + "id": 8 } } }, @@ -33366,6 +33906,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "launchStage": { + "type": "LaunchStage", + "id": 29, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "publisherModelTemplate": { "type": "string", "id": 30, @@ -33477,6 +34024,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "requestAccess": { + "type": "RegionalResourceReferences", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -33589,6 +34143,15 @@ "GOOGLE_OWNED_OSS": 4, "THIRD_PARTY_OWNED_OSS": 5 } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "EXPERIMENTAL": 1, + "PRIVATE_PREVIEW": 2, + "PUBLIC_PREVIEW": 3, + "GA": 4 + } } } }, diff --git a/packages/google-cloud-aiplatform/samples/README.md b/packages/google-cloud-aiplatform/samples/README.md index 170299a4197..3820254c2b6 100644 --- a/packages/google-cloud-aiplatform/samples/README.md +++ b/packages/google-cloud-aiplatform/samples/README.md @@ -106,6 +106,8 @@ * [Job_service.resume_model_deployment_monitoring_job](#job_service.resume_model_deployment_monitoring_job) * [Job_service.search_model_deployment_monitoring_stats_anomalies](#job_service.search_model_deployment_monitoring_stats_anomalies) * [Job_service.update_model_deployment_monitoring_job](#job_service.update_model_deployment_monitoring_job) + * [Match_service.find_neighbors](#match_service.find_neighbors) + * [Match_service.read_index_datapoints](#match_service.read_index_datapoints) * [Metadata_service.add_context_artifacts_and_executions](#metadata_service.add_context_artifacts_and_executions) * [Metadata_service.add_context_children](#metadata_service.add_context_children) * [Metadata_service.add_execution_events](#metadata_service.add_execution_events) @@ -140,6 +142,7 @@ * [Metadata_service.update_execution](#metadata_service.update_execution) * [Migration_service.batch_migrate_resources](#migration_service.batch_migrate_resources) * [Migration_service.search_migratable_resources](#migration_service.search_migratable_resources) + * [Model_garden_service.get_publisher_model](#model_garden_service.get_publisher_model) * [Model_service.batch_import_evaluated_annotations](#model_service.batch_import_evaluated_annotations) * [Model_service.batch_import_model_evaluation_slices](#model_service.batch_import_model_evaluation_slices) * [Model_service.copy_model](#model_service.copy_model) @@ -2057,6 +2060,40 @@ __Usage:__ +### Match_service.find_neighbors + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/match_service.find_neighbors.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/match_service.find_neighbors.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1/match_service.find_neighbors.js` + + +----- + + + + +### Match_service.read_index_datapoints + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/match_service.read_index_datapoints.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/match_service.read_index_datapoints.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1/match_service.read_index_datapoints.js` + + +----- + + + + ### Metadata_service.add_context_artifacts_and_executions View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_artifacts_and_executions.js). @@ -2635,6 +2672,23 @@ __Usage:__ +### Model_garden_service.get_publisher_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_garden_service.get_publisher_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/v1/model_garden_service.get_publisher_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1/model_garden_service.get_publisher_model.js` + + +----- + + + + ### Model_service.batch_import_evaluated_annotations View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js). diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.import_feature_values.js b/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.import_feature_values.js index 516ec4982ce..be61c3c19d2 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.import_feature_values.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.import_feature_values.js @@ -55,7 +55,7 @@ function main(entityType, featureSpecs) { // const entityType = 'abc123' /** * Source column that holds entity IDs. If not provided, entity IDs are - * extracted from the column named `entity_id`. + * extracted from the column named entity_id. */ // const entityIdField = 'abc123' /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/match_service.find_neighbors.js b/packages/google-cloud-aiplatform/samples/generated/v1/match_service.find_neighbors.js new file mode 100644 index 00000000000..10e858026fb --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1/match_service.find_neighbors.js @@ -0,0 +1,83 @@ +// 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(indexEndpoint) { + // [START aiplatform_v1_generated_MatchService_FindNeighbors_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the index endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + */ + // const indexEndpoint = 'abc123' + /** + * The ID of the DeployedIndex that will serve the request. This request is + * sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That + * IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index + * has a DeployedIndex.id field. + * The value of the field below must equal one of the DeployedIndex.id + * fields of the IndexEndpoint that is being called for this request. + */ + // const deployedIndexId = 'abc123' + /** + * The list of queries. + */ + // const queries = 1234 + /** + * If set to true, the full datapoints (including all vector values and + * restricts) of the nearest neighbors are returned. + * Note that returning full datapoint will significantly increase the + * latency and cost of the query. + */ + // const returnFullDatapoint = true + + // Imports the Aiplatform library + const {MatchServiceClient} = require('@google-cloud/aiplatform').v1; + + // Instantiates a client + const aiplatformClient = new MatchServiceClient(); + + async function callFindNeighbors() { + // Construct request + const request = { + indexEndpoint, + }; + + // Run request + const response = await aiplatformClient.findNeighbors(request); + console.log(response); + } + + callFindNeighbors(); + // [END aiplatform_v1_generated_MatchService_FindNeighbors_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/match_service.read_index_datapoints.js b/packages/google-cloud-aiplatform/samples/generated/v1/match_service.read_index_datapoints.js new file mode 100644 index 00000000000..3cddeb89767 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1/match_service.read_index_datapoints.js @@ -0,0 +1,71 @@ +// 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(indexEndpoint) { + // [START aiplatform_v1_generated_MatchService_ReadIndexDatapoints_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the index endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + */ + // const indexEndpoint = 'abc123' + /** + * The ID of the DeployedIndex that will serve the request. + */ + // const deployedIndexId = 'abc123' + /** + * IDs of the datapoints to be searched for. + */ + // const ids = 'abc123' + + // Imports the Aiplatform library + const {MatchServiceClient} = require('@google-cloud/aiplatform').v1; + + // Instantiates a client + const aiplatformClient = new MatchServiceClient(); + + async function callReadIndexDatapoints() { + // Construct request + const request = { + indexEndpoint, + }; + + // Run request + const response = await aiplatformClient.readIndexDatapoints(request); + console.log(response); + } + + callReadIndexDatapoints(); + // [END aiplatform_v1_generated_MatchService_ReadIndexDatapoints_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/metadata_service.list_artifacts.js b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_artifacts.js index 9e6500337e7..d5af87889b5 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_artifacts.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_artifacts.js @@ -64,6 +64,9 @@ function main(parent) { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Artifacts based on the contexts to which they belong, use the * function operator with the full resource name diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_contexts.js b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_contexts.js index a6299816118..2cb4eceafed 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_contexts.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_contexts.js @@ -64,6 +64,9 @@ function main(parent) { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0`. + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Parent Child filtering**: * To filter Contexts based on parent-child relationship use the HAS * operator as follows: diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_executions.js b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_executions.js index e8f8140a154..4405bb6e12a 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_executions.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_executions.js @@ -64,6 +64,9 @@ function main(parent) { * To filter on metadata fields use traversal operation as follows: * `metadata..` * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Executions based on the contexts to which they belong use * the function operator with the full resource name: diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js index 89e38030251..88ae6250c54 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js @@ -61,6 +61,9 @@ function main(artifact) { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * Each of the above supported filter types can be combined together using * logical operators (`AND` & `OR`). Maximum nested expression depth allowed * is 5. diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_artifact.js b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_artifact.js index 4d282ef14c5..a282072113f 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_artifact.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_artifact.js @@ -37,7 +37,6 @@ function main(artifact) { // const artifact = {} /** * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. */ // const updateMask = {} /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_context.js b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_context.js index 6dfe2c6425b..078d1c448a7 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_context.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_context.js @@ -37,7 +37,6 @@ function main(context) { // const context = {} /** * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. */ // const updateMask = {} /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.js b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.js index 05325031ef8..2b1536b44a6 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.js @@ -37,7 +37,6 @@ function main(execution) { // const execution = {} /** * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. */ // const updateMask = {} /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/model_garden_service.get_publisher_model.js b/packages/google-cloud-aiplatform/samples/generated/v1/model_garden_service.get_publisher_model.js new file mode 100644 index 00000000000..77758ecc277 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1/model_garden_service.get_publisher_model.js @@ -0,0 +1,72 @@ +// 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_ModelGardenService_GetPublisherModel_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 PublisherModel resource. + * Format: + * `publishers/{publisher}/models/{publisher_model}` + */ + // const name = 'abc123' + /** + * Optional. The IETF BCP-47 language code representing the language in which + * the publisher model's text information should be written in (see go/bcp47). + */ + // const languageCode = 'abc123' + /** + * Optional. PublisherModel view specifying which fields to read. + */ + // const view = {} + + // Imports the Aiplatform library + const {ModelGardenServiceClient} = require('@google-cloud/aiplatform').v1; + + // Instantiates a client + const aiplatformClient = new ModelGardenServiceClient(); + + async function callGetPublisherModel() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await aiplatformClient.getPublisherModel(request); + console.log(response); + } + + callGetPublisherModel(); + // [END aiplatform_v1_generated_ModelGardenService_GetPublisherModel_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/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index 5cca960f083..f7976bea243 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 @@ -4447,6 +4447,106 @@ } } }, + { + "regionTag": "aiplatform_v1_generated_MatchService_FindNeighbors_async", + "title": "DatasetService findNeighbors Sample", + "origin": "API_DEFINITION", + "description": " Finds the nearest neighbors of each vector within the request.", + "canonical": true, + "file": "match_service.find_neighbors.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FindNeighbors", + "fullName": "google.cloud.aiplatform.v1.MatchService.FindNeighbors", + "async": true, + "parameters": [ + { + "name": "index_endpoint", + "type": "TYPE_STRING" + }, + { + "name": "deployed_index_id", + "type": "TYPE_STRING" + }, + { + "name": "queries", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "return_full_datapoint", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.aiplatform.v1.FindNeighborsResponse", + "client": { + "shortName": "MatchServiceClient", + "fullName": "google.cloud.aiplatform.v1.MatchServiceClient" + }, + "method": { + "shortName": "FindNeighbors", + "fullName": "google.cloud.aiplatform.v1.MatchService.FindNeighbors", + "service": { + "shortName": "MatchService", + "fullName": "google.cloud.aiplatform.v1.MatchService" + } + } + } + }, + { + "regionTag": "aiplatform_v1_generated_MatchService_ReadIndexDatapoints_async", + "title": "DatasetService readIndexDatapoints Sample", + "origin": "API_DEFINITION", + "description": " Reads the datapoints/vectors of the given IDs. A maximum of 1000 datapoints can be retrieved in a batch.", + "canonical": true, + "file": "match_service.read_index_datapoints.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadIndexDatapoints", + "fullName": "google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints", + "async": true, + "parameters": [ + { + "name": "index_endpoint", + "type": "TYPE_STRING" + }, + { + "name": "deployed_index_id", + "type": "TYPE_STRING" + }, + { + "name": "ids", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.aiplatform.v1.ReadIndexDatapointsResponse", + "client": { + "shortName": "MatchServiceClient", + "fullName": "google.cloud.aiplatform.v1.MatchServiceClient" + }, + "method": { + "shortName": "ReadIndexDatapoints", + "fullName": "google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints", + "service": { + "shortName": "MatchService", + "fullName": "google.cloud.aiplatform.v1.MatchService" + } + } + } + }, { "regionTag": "aiplatform_v1_generated_MetadataService_CreateMetadataStore_async", "title": "DatasetService createMetadataStore Sample", @@ -4726,7 +4826,7 @@ "segments": [ { "start": 25, - "end": 108, + "end": 111, "type": "FULL" } ], @@ -4782,7 +4882,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 66, "type": "FULL" } ], @@ -5010,7 +5110,7 @@ "segments": [ { "start": 25, - "end": 111, + "end": 114, "type": "FULL" } ], @@ -5066,7 +5166,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 65, "type": "FULL" } ], @@ -5474,7 +5574,7 @@ "segments": [ { "start": 25, - "end": 108, + "end": 111, "type": "FULL" } ], @@ -5530,7 +5630,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 66, "type": "FULL" } ], @@ -5894,7 +5994,7 @@ "segments": [ { "start": 25, - "end": 88, + "end": 91, "type": "FULL" } ], @@ -6027,6 +6127,54 @@ } } }, + { + "regionTag": "aiplatform_v1_generated_ModelGardenService_GetPublisherModel_async", + "title": "DatasetService getPublisherModel Sample", + "origin": "API_DEFINITION", + "description": " Gets a Model Garden publisher model.", + "canonical": true, + "file": "model_garden_service.get_publisher_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPublisherModel", + "fullName": "google.cloud.aiplatform.v1.ModelGardenService.GetPublisherModel", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.aiplatform.v1.PublisherModelView" + } + ], + "resultType": ".google.cloud.aiplatform.v1.PublisherModel", + "client": { + "shortName": "ModelGardenServiceClient", + "fullName": "google.cloud.aiplatform.v1.ModelGardenServiceClient" + }, + "method": { + "shortName": "GetPublisherModel", + "fullName": "google.cloud.aiplatform.v1.ModelGardenService.GetPublisherModel", + "service": { + "shortName": "ModelGardenService", + "fullName": "google.cloud.aiplatform.v1.ModelGardenService" + } + } + } + }, { "regionTag": "aiplatform_v1_generated_ModelService_UploadModel_async", "title": "DatasetService uploadModel Sample", @@ -7379,7 +7527,7 @@ "regionTag": "aiplatform_v1_generated_PredictionService_Explain_async", "title": "DatasetService explain Sample", "origin": "API_DEFINITION", - "description": " Perform an online explanation. If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. Only deployed AutoML tabular Models have explanation_spec.", + "description": " Perform an online explanation. If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated.", "canonical": true, "file": "prediction_service.explain.js", "language": "JAVASCRIPT", @@ -9207,7 +9355,7 @@ "regionTag": "aiplatform_v1_generated_VizierService_SuggestTrials_async", "title": "DatasetService suggestTrials Sample", "origin": "API_DEFINITION", - "description": " Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier. Returns a long-running operation associated with the generation of Trial suggestions. When this long-running operation succeeds, it will contain a [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].", + "description": " Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier. Returns a long-running operation associated with the generation of Trial suggestions. When this long-running operation succeeds, it will contain a [SuggestTrialsResponse][google.cloud.aiplatform.v1.SuggestTrialsResponse].", "canonical": true, "file": "vizier_service.suggest_trials.js", "language": "JAVASCRIPT", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.import_feature_values.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.import_feature_values.js index 28d16cb58fc..d237424c203 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.import_feature_values.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.import_feature_values.js @@ -55,7 +55,7 @@ function main(entityType, featureSpecs) { // const entityType = 'abc123' /** * Source column that holds entity IDs. If not provided, entity IDs are - * extracted from the column named `entity_id`. + * extracted from the column named entity_id. */ // const entityIdField = 'abc123' /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_artifacts.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_artifacts.js index b8990f64912..ef12c8c7204 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_artifacts.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_artifacts.js @@ -64,6 +64,9 @@ function main(parent) { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Artifacts based on the contexts to which they belong, use the * function operator with the full resource name diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_contexts.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_contexts.js index 44926134171..10662a86888 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_contexts.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_contexts.js @@ -64,6 +64,9 @@ function main(parent) { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0`. + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Parent Child filtering**: * To filter Contexts based on parent-child relationship use the HAS * operator as follows: diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_executions.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_executions.js index a49794b0dfb..fc0609364e2 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_executions.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_executions.js @@ -64,6 +64,9 @@ function main(parent) { * To filter on metadata fields use traversal operation as follows: * `metadata..` * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Executions based on the contexts to which they belong use * the function operator with the full resource name: diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js index da387bee1eb..3f0acb1a4a8 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js @@ -61,6 +61,9 @@ function main(artifact) { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * Each of the above supported filter types can be combined together using * logical operators (`AND` & `OR`). Maximum nested expression depth allowed * is 5. diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_artifact.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_artifact.js index 75b56aa92da..16f99b69a16 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_artifact.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_artifact.js @@ -38,7 +38,6 @@ function main(artifact) { // const artifact = {} /** * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. */ // const updateMask = {} /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_context.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_context.js index 0157db78168..f215020896c 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_context.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_context.js @@ -37,7 +37,6 @@ function main(context) { // const context = {} /** * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. */ // const updateMask = {} /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_execution.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_execution.js index d5b6004efd7..227a0a639a3 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_execution.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_execution.js @@ -38,7 +38,6 @@ function main(execution) { // const execution = {} /** * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. */ // const updateMask = {} /** 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 a8e6dbb67d4..95a235e0d51 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 @@ -5046,7 +5046,7 @@ "segments": [ { "start": 25, - "end": 108, + "end": 111, "type": "FULL" } ], @@ -5102,7 +5102,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 67, "type": "FULL" } ], @@ -5330,7 +5330,7 @@ "segments": [ { "start": 25, - "end": 111, + "end": 114, "type": "FULL" } ], @@ -5386,7 +5386,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 66, "type": "FULL" } ], @@ -5794,7 +5794,7 @@ "segments": [ { "start": 25, - "end": 108, + "end": 111, "type": "FULL" } ], @@ -5850,7 +5850,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 67, "type": "FULL" } ], @@ -6214,7 +6214,7 @@ "segments": [ { "start": 25, - "end": 88, + "end": 91, "type": "FULL" } ], @@ -7787,7 +7787,7 @@ "regionTag": "aiplatform_v1beta1_generated_PredictionService_Explain_async", "title": "DatasetService explain Sample", "origin": "API_DEFINITION", - "description": " Perform an online explanation. If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. Only deployed AutoML tabular Models have explanation_spec.", + "description": " Perform an online explanation. If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.", "canonical": true, "file": "prediction_service.explain.js", "language": "JAVASCRIPT", @@ -9923,7 +9923,7 @@ "regionTag": "aiplatform_v1beta1_generated_VizierService_SuggestTrials_async", "title": "DatasetService suggestTrials Sample", "origin": "API_DEFINITION", - "description": " Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier. Returns a long-running operation associated with the generation of Trial suggestions. When this long-running operation succeeds, it will contain a [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].", + "description": " Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier. Returns a long-running operation associated with the generation of Trial suggestions. When this long-running operation succeeds, it will contain a [SuggestTrialsResponse][google.cloud.aiplatform.v1beta1.SuggestTrialsResponse].", "canonical": true, "file": "vizier_service.suggest_trials.js", "language": "JAVASCRIPT", diff --git a/packages/google-cloud-aiplatform/src/index.ts b/packages/google-cloud-aiplatform/src/index.ts index 870c98491fe..f279e0ccb72 100644 --- a/packages/google-cloud-aiplatform/src/index.ts +++ b/packages/google-cloud-aiplatform/src/index.ts @@ -51,6 +51,10 @@ const MetadataServiceClient = v1.MetadataServiceClient; type MetadataServiceClient = v1.MetadataServiceClient; const TensorboardServiceClient = v1.TensorboardServiceClient; type TensorboardServiceClient = v1.TensorboardServiceClient; +const MatchServiceClient = v1.MatchServiceClient; +type MatchServiceClient = v1.MatchServiceClient; +const ModelGardenServiceClient = v1.ModelGardenServiceClient; +type ModelGardenServiceClient = v1.ModelGardenServiceClient; export { v1beta1, @@ -70,6 +74,8 @@ export { FeaturestoreOnlineServingServiceClient, MetadataServiceClient, TensorboardServiceClient, + MatchServiceClient, + ModelGardenServiceClient, }; export default { v1beta1, @@ -89,6 +95,8 @@ export default { FeaturestoreOnlineServingServiceClient, MetadataServiceClient, TensorboardServiceClient, + MatchServiceClient, + ModelGardenServiceClient, }; import * as protos from '../protos/protos'; export {protos}; 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 84d7977eaf1..37df669c89b 100644 --- a/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts @@ -277,6 +277,9 @@ export class DatasetServiceClient { 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}' ), @@ -5884,6 +5887,46 @@ export class DatasetServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", 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 3df5eb15641..7c31127c5de 100644 --- a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts @@ -276,6 +276,9 @@ export class EndpointServiceClient { 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}' ), @@ -4986,6 +4989,46 @@ export class EndpointServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts index 3e82ff84d76..478b7364256 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts @@ -269,6 +269,9 @@ export class FeaturestoreOnlineServingServiceClient { 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}' ), @@ -2696,6 +2699,46 @@ export class FeaturestoreOnlineServingServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", 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 84b8f60a560..6b7c9c9a2aa 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts @@ -279,6 +279,9 @@ export class FeaturestoreServiceClient { 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}' ), @@ -3375,7 +3378,7 @@ export class FeaturestoreServiceClient { * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` * @param {string} request.entityIdField * Source column that holds entity IDs. If not provided, entity IDs are - * extracted from the column named `entity_id`. + * extracted from the column named entity_id. * @param {number[]} request.featureSpecs * Required. Specifications defining which Feature values to import from the * entity. The request fails if no feature_specs are provided, and having @@ -7608,6 +7611,46 @@ export class FeaturestoreServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json index ead7be93841..10d41e70480 100644 --- a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json @@ -1118,6 +1118,40 @@ } } }, + "MatchService": { + "clients": { + "grpc": { + "libraryClient": "MatchServiceClient", + "rpcs": { + "FindNeighbors": { + "methods": [ + "findNeighbors" + ] + }, + "ReadIndexDatapoints": { + "methods": [ + "readIndexDatapoints" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MatchServiceClient", + "rpcs": { + "FindNeighbors": { + "methods": [ + "findNeighbors" + ] + }, + "ReadIndexDatapoints": { + "methods": [ + "readIndexDatapoints" + ] + } + } + } + } + }, "MetadataService": { "clients": { "grpc": { @@ -1510,6 +1544,30 @@ } } }, + "ModelGardenService": { + "clients": { + "grpc": { + "libraryClient": "ModelGardenServiceClient", + "rpcs": { + "GetPublisherModel": { + "methods": [ + "getPublisherModel" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ModelGardenServiceClient", + "rpcs": { + "GetPublisherModel": { + "methods": [ + "getPublisherModel" + ] + } + } + } + } + }, "ModelService": { "clients": { "grpc": { diff --git a/packages/google-cloud-aiplatform/src/v1/index.ts b/packages/google-cloud-aiplatform/src/v1/index.ts index 46e5062e243..71b7ed96c15 100644 --- a/packages/google-cloud-aiplatform/src/v1/index.ts +++ b/packages/google-cloud-aiplatform/src/v1/index.ts @@ -23,8 +23,10 @@ export {FeaturestoreServiceClient} from './featurestore_service_client'; export {IndexEndpointServiceClient} from './index_endpoint_service_client'; export {IndexServiceClient} from './index_service_client'; export {JobServiceClient} from './job_service_client'; +export {MatchServiceClient} from './match_service_client'; 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 {PipelineServiceClient} from './pipeline_service_client'; export {PredictionServiceClient} from './prediction_service_client'; 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 6465c6ef1d6..fa0fac90cb1 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 @@ -276,6 +276,9 @@ export class IndexEndpointServiceClient { 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}' ), @@ -4918,6 +4921,46 @@ export class IndexEndpointServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", 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 b198cbb12f0..fc884d007f2 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/index_service_client.ts @@ -276,6 +276,9 @@ export class IndexServiceClient { 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}' ), @@ -4639,6 +4642,46 @@ export class IndexServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", 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 a2d11f61a18..566dba60629 100644 --- a/packages/google-cloud-aiplatform/src/v1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/job_service_client.ts @@ -276,6 +276,9 @@ export class JobServiceClient { 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}' ), @@ -9019,6 +9022,46 @@ export class JobServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/match_service_client.ts b/packages/google-cloud-aiplatform/src/v1/match_service_client.ts new file mode 100644 index 00000000000..d2a88144dd7 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1/match_service_client.ts @@ -0,0 +1,3324 @@ +// 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, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/match_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './match_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * MatchService is a Google managed service for efficient vector similarity + * search at scale. + * @class + * @memberof v1 + */ +export class MatchServiceClient { + 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}; + matchServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MatchServiceClient. + * + * @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 MatchServiceClient({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 MatchServiceClient; + 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}' + ), + 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}' + ), + 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}' + ), + 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}' + ), + 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}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.aiplatform.v1.MatchService', + 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.matchServiceStub) { + return this.matchServiceStub; + } + + // Put together the "service stub" for + // google.cloud.aiplatform.v1.MatchService. + this.matchServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.aiplatform.v1.MatchService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.aiplatform.v1.MatchService, + 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 matchServiceStubMethods = ['findNeighbors', 'readIndexDatapoints']; + for (const methodName of matchServiceStubMethods) { + const callPromise = this.matchServiceStub.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 = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.matchServiceStub; + } + + /** + * 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 -- + // ------------------- + /** + * Finds the nearest neighbors of each vector within the request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.indexEndpoint + * Required. The name of the index endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * @param {string} request.deployedIndexId + * The ID of the DeployedIndex that will serve the request. This request is + * sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That + * IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index + * has a DeployedIndex.id field. + * The value of the field below must equal one of the DeployedIndex.id + * fields of the IndexEndpoint that is being called for this request. + * @param {number[]} request.queries + * The list of queries. + * @param {boolean} request.returnFullDatapoint + * If set to true, the full datapoints (including all vector values and + * restricts) of the nearest neighbors are returned. + * Note that returning full datapoint will significantly increase the + * latency and cost of the 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 {@link google.cloud.aiplatform.v1.FindNeighborsResponse | FindNeighborsResponse}. + * 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/v1/match_service.find_neighbors.js + * region_tag:aiplatform_v1_generated_MatchService_FindNeighbors_async + */ + findNeighbors( + request?: protos.google.cloud.aiplatform.v1.IFindNeighborsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1.IFindNeighborsResponse, + protos.google.cloud.aiplatform.v1.IFindNeighborsRequest | undefined, + {} | undefined + ] + >; + findNeighbors( + request: protos.google.cloud.aiplatform.v1.IFindNeighborsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1.IFindNeighborsResponse, + | protos.google.cloud.aiplatform.v1.IFindNeighborsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + findNeighbors( + request: protos.google.cloud.aiplatform.v1.IFindNeighborsRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1.IFindNeighborsResponse, + | protos.google.cloud.aiplatform.v1.IFindNeighborsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + findNeighbors( + request?: protos.google.cloud.aiplatform.v1.IFindNeighborsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1.IFindNeighborsResponse, + | protos.google.cloud.aiplatform.v1.IFindNeighborsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1.IFindNeighborsResponse, + | protos.google.cloud.aiplatform.v1.IFindNeighborsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1.IFindNeighborsResponse, + protos.google.cloud.aiplatform.v1.IFindNeighborsRequest | 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({ + index_endpoint: request.indexEndpoint ?? '', + }); + this.initialize(); + return this.innerApiCalls.findNeighbors(request, options, callback); + } + /** + * Reads the datapoints/vectors of the given IDs. + * A maximum of 1000 datapoints can be retrieved in a batch. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.indexEndpoint + * Required. The name of the index endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * @param {string} request.deployedIndexId + * The ID of the DeployedIndex that will serve the request. + * @param {string[]} request.ids + * IDs of the datapoints to be searched for. + * @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.v1.ReadIndexDatapointsResponse | ReadIndexDatapointsResponse}. + * 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/v1/match_service.read_index_datapoints.js + * region_tag:aiplatform_v1_generated_MatchService_ReadIndexDatapoints_async + */ + readIndexDatapoints( + request?: protos.google.cloud.aiplatform.v1.IReadIndexDatapointsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1.IReadIndexDatapointsResponse, + protos.google.cloud.aiplatform.v1.IReadIndexDatapointsRequest | undefined, + {} | undefined + ] + >; + readIndexDatapoints( + request: protos.google.cloud.aiplatform.v1.IReadIndexDatapointsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1.IReadIndexDatapointsResponse, + | protos.google.cloud.aiplatform.v1.IReadIndexDatapointsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + readIndexDatapoints( + request: protos.google.cloud.aiplatform.v1.IReadIndexDatapointsRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1.IReadIndexDatapointsResponse, + | protos.google.cloud.aiplatform.v1.IReadIndexDatapointsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + readIndexDatapoints( + request?: protos.google.cloud.aiplatform.v1.IReadIndexDatapointsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1.IReadIndexDatapointsResponse, + | protos.google.cloud.aiplatform.v1.IReadIndexDatapointsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1.IReadIndexDatapointsResponse, + | protos.google.cloud.aiplatform.v1.IReadIndexDatapointsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1.IReadIndexDatapointsResponse, + protos.google.cloud.aiplatform.v1.IReadIndexDatapointsRequest | 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({ + index_endpoint: request.indexEndpoint ?? '', + }); + this.initialize(); + return this.innerApiCalls.readIndexDatapoints(request, options, callback); + } + + /** + * 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); + } + + // -------------------- + // -- 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 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 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 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 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.matchServiceStub && !this._terminated) { + return this.matchServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-aiplatform/src/v1/match_service_client_config.json b/packages/google-cloud-aiplatform/src/v1/match_service_client_config.json new file mode 100644 index 00000000000..74c4fa0687c --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1/match_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1.MatchService": { + "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": { + "FindNeighbors": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadIndexDatapoints": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-aiplatform/src/v1/match_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/match_service_proto_list.json new file mode 100644 index 00000000000..f987b709de8 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1/match_service_proto_list.json @@ -0,0 +1,118 @@ +[ + "../../protos/google/cloud/aiplatform/v1/accelerator_type.proto", + "../../protos/google/cloud/aiplatform/v1/annotation.proto", + "../../protos/google/cloud/aiplatform/v1/annotation_spec.proto", + "../../protos/google/cloud/aiplatform/v1/artifact.proto", + "../../protos/google/cloud/aiplatform/v1/batch_prediction_job.proto", + "../../protos/google/cloud/aiplatform/v1/completion_stats.proto", + "../../protos/google/cloud/aiplatform/v1/context.proto", + "../../protos/google/cloud/aiplatform/v1/custom_job.proto", + "../../protos/google/cloud/aiplatform/v1/data_item.proto", + "../../protos/google/cloud/aiplatform/v1/data_labeling_job.proto", + "../../protos/google/cloud/aiplatform/v1/dataset.proto", + "../../protos/google/cloud/aiplatform/v1/dataset_service.proto", + "../../protos/google/cloud/aiplatform/v1/deployed_index_ref.proto", + "../../protos/google/cloud/aiplatform/v1/deployed_model_ref.proto", + "../../protos/google/cloud/aiplatform/v1/encryption_spec.proto", + "../../protos/google/cloud/aiplatform/v1/endpoint.proto", + "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1/entity_type.proto", + "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", + "../../protos/google/cloud/aiplatform/v1/event.proto", + "../../protos/google/cloud/aiplatform/v1/execution.proto", + "../../protos/google/cloud/aiplatform/v1/explanation.proto", + "../../protos/google/cloud/aiplatform/v1/explanation_metadata.proto", + "../../protos/google/cloud/aiplatform/v1/feature.proto", + "../../protos/google/cloud/aiplatform/v1/feature_monitoring_stats.proto", + "../../protos/google/cloud/aiplatform/v1/feature_selector.proto", + "../../protos/google/cloud/aiplatform/v1/featurestore.proto", + "../../protos/google/cloud/aiplatform/v1/featurestore_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1/featurestore_online_service.proto", + "../../protos/google/cloud/aiplatform/v1/featurestore_service.proto", + "../../protos/google/cloud/aiplatform/v1/hyperparameter_tuning_job.proto", + "../../protos/google/cloud/aiplatform/v1/index.proto", + "../../protos/google/cloud/aiplatform/v1/index_endpoint.proto", + "../../protos/google/cloud/aiplatform/v1/index_endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1/index_service.proto", + "../../protos/google/cloud/aiplatform/v1/io.proto", + "../../protos/google/cloud/aiplatform/v1/job_service.proto", + "../../protos/google/cloud/aiplatform/v1/job_state.proto", + "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", + "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", + "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", + "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", + "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", + "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", + "../../protos/google/cloud/aiplatform/v1/migratable_resource.proto", + "../../protos/google/cloud/aiplatform/v1/migration_service.proto", + "../../protos/google/cloud/aiplatform/v1/model.proto", + "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", + "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", + "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", + "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1/model_service.proto", + "../../protos/google/cloud/aiplatform/v1/nas_job.proto", + "../../protos/google/cloud/aiplatform/v1/operation.proto", + "../../protos/google/cloud/aiplatform/v1/pipeline_failure_policy.proto", + "../../protos/google/cloud/aiplatform/v1/pipeline_job.proto", + "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", + "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", + "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1/saved_query.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/text_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_regression.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_tables.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/export_evaluated_data_items_config.proto", + "../../protos/google/cloud/aiplatform/v1/service_networking.proto", + "../../protos/google/cloud/aiplatform/v1/specialist_pool.proto", + "../../protos/google/cloud/aiplatform/v1/specialist_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1/study.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard_data.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard_experiment.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard_run.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard_service.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard_time_series.proto", + "../../protos/google/cloud/aiplatform/v1/training_pipeline.proto", + "../../protos/google/cloud/aiplatform/v1/types.proto", + "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", + "../../protos/google/cloud/aiplatform/v1/value.proto", + "../../protos/google/cloud/aiplatform/v1/vizier_service.proto" +] 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 292ead32f7c..e4c343ce4b8 100644 --- a/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts @@ -279,6 +279,9 @@ export class MetadataServiceClient { 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}' ), @@ -1926,7 +1929,6 @@ export class MetadataServiceClient { * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * @param {google.protobuf.FieldMask} [request.updateMask] * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. * @param {boolean} request.allowMissing * If set to true, and the {@link google.cloud.aiplatform.v1.Artifact|Artifact} is * not found, a new {@link google.cloud.aiplatform.v1.Artifact|Artifact} is @@ -2217,7 +2219,6 @@ export class MetadataServiceClient { * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @param {google.protobuf.FieldMask} [request.updateMask] * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. * @param {boolean} request.allowMissing * If set to true, and the {@link google.cloud.aiplatform.v1.Context|Context} is * not found, a new {@link google.cloud.aiplatform.v1.Context|Context} is created. @@ -2938,7 +2939,6 @@ export class MetadataServiceClient { * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @param {google.protobuf.FieldMask} [request.updateMask] * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. * @param {boolean} request.allowMissing * If set to true, and the {@link google.cloud.aiplatform.v1.Execution|Execution} * is not found, a new {@link google.cloud.aiplatform.v1.Execution|Execution} is @@ -3471,6 +3471,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * Each of the above supported filter types can be combined together using * logical operators (`AND` & `OR`). Maximum nested expression depth allowed @@ -4998,6 +5001,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Artifacts based on the contexts to which they belong, use the * function operator with the full resource name @@ -5141,6 +5147,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Artifacts based on the contexts to which they belong, use the * function operator with the full resource name @@ -5232,6 +5241,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Artifacts based on the contexts to which they belong, use the * function operator with the full resource name @@ -5322,6 +5334,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0`. + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Parent Child filtering**: * To filter Contexts based on parent-child relationship use the HAS * operator as follows: @@ -5469,6 +5484,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0`. + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Parent Child filtering**: * To filter Contexts based on parent-child relationship use the HAS * operator as follows: @@ -5564,6 +5582,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0`. + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Parent Child filtering**: * To filter Contexts based on parent-child relationship use the HAS * operator as follows: @@ -5658,6 +5679,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..` * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Executions based on the contexts to which they belong use * the function operator with the full resource name: @@ -5801,6 +5825,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..` * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Executions based on the contexts to which they belong use * the function operator with the full resource name: @@ -5892,6 +5919,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..` * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Executions based on the contexts to which they belong use * the function operator with the full resource name: @@ -8390,6 +8420,46 @@ export class MetadataServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", 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 04751f12c38..06bd846ad9e 100644 --- a/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts @@ -277,6 +277,9 @@ export class MigrationServiceClient { 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}' ), @@ -4091,6 +4094,46 @@ export class MigrationServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/model_garden_service_client.ts b/packages/google-cloud-aiplatform/src/v1/model_garden_service_client.ts new file mode 100644 index 00000000000..6ef58b4af07 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1/model_garden_service_client.ts @@ -0,0 +1,3216 @@ +// 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, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/model_garden_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './model_garden_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The interface of Model Garden Service. + * @class + * @memberof v1 + */ +export class ModelGardenServiceClient { + 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}; + modelGardenServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ModelGardenServiceClient. + * + * @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 ModelGardenServiceClient({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 ModelGardenServiceClient; + 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}' + ), + 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}' + ), + 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}' + ), + 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}' + ), + 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}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.aiplatform.v1.ModelGardenService', + 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.modelGardenServiceStub) { + return this.modelGardenServiceStub; + } + + // Put together the "service stub" for + // google.cloud.aiplatform.v1.ModelGardenService. + this.modelGardenServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.aiplatform.v1.ModelGardenService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.aiplatform.v1.ModelGardenService, + 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 modelGardenServiceStubMethods = ['getPublisherModel']; + for (const methodName of modelGardenServiceStubMethods) { + const callPromise = this.modelGardenServiceStub.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 = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.modelGardenServiceStub; + } + + /** + * 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 Model Garden publisher model. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the PublisherModel resource. + * Format: + * `publishers/{publisher}/models/{publisher_model}` + * @param {string} [request.languageCode] + * Optional. The IETF BCP-47 language code representing the language in which + * the publisher model's text information should be written in (see go/bcp47). + * @param {google.cloud.aiplatform.v1.PublisherModelView} [request.view] + * Optional. PublisherModel view specifying which fields to read. + * @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.v1.PublisherModel | PublisherModel}. + * 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/v1/model_garden_service.get_publisher_model.js + * region_tag:aiplatform_v1_generated_ModelGardenService_GetPublisherModel_async + */ + getPublisherModel( + request?: protos.google.cloud.aiplatform.v1.IGetPublisherModelRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1.IPublisherModel, + protos.google.cloud.aiplatform.v1.IGetPublisherModelRequest | undefined, + {} | undefined + ] + >; + getPublisherModel( + request: protos.google.cloud.aiplatform.v1.IGetPublisherModelRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1.IPublisherModel, + | protos.google.cloud.aiplatform.v1.IGetPublisherModelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPublisherModel( + request: protos.google.cloud.aiplatform.v1.IGetPublisherModelRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1.IPublisherModel, + | protos.google.cloud.aiplatform.v1.IGetPublisherModelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPublisherModel( + request?: protos.google.cloud.aiplatform.v1.IGetPublisherModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1.IPublisherModel, + | protos.google.cloud.aiplatform.v1.IGetPublisherModelRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1.IPublisherModel, + | protos.google.cloud.aiplatform.v1.IGetPublisherModelRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1.IPublisherModel, + protos.google.cloud.aiplatform.v1.IGetPublisherModelRequest | 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.getPublisherModel(request, options, callback); + } + + /** + * 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); + } + + // -------------------- + // -- 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 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 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 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 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.modelGardenServiceStub && !this._terminated) { + return this.modelGardenServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-aiplatform/src/v1/model_garden_service_client_config.json b/packages/google-cloud-aiplatform/src/v1/model_garden_service_client_config.json new file mode 100644 index 00000000000..9a44acc8517 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1/model_garden_service_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1.ModelGardenService": { + "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": { + "GetPublisherModel": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-aiplatform/src/v1/model_garden_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/model_garden_service_proto_list.json new file mode 100644 index 00000000000..f987b709de8 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1/model_garden_service_proto_list.json @@ -0,0 +1,118 @@ +[ + "../../protos/google/cloud/aiplatform/v1/accelerator_type.proto", + "../../protos/google/cloud/aiplatform/v1/annotation.proto", + "../../protos/google/cloud/aiplatform/v1/annotation_spec.proto", + "../../protos/google/cloud/aiplatform/v1/artifact.proto", + "../../protos/google/cloud/aiplatform/v1/batch_prediction_job.proto", + "../../protos/google/cloud/aiplatform/v1/completion_stats.proto", + "../../protos/google/cloud/aiplatform/v1/context.proto", + "../../protos/google/cloud/aiplatform/v1/custom_job.proto", + "../../protos/google/cloud/aiplatform/v1/data_item.proto", + "../../protos/google/cloud/aiplatform/v1/data_labeling_job.proto", + "../../protos/google/cloud/aiplatform/v1/dataset.proto", + "../../protos/google/cloud/aiplatform/v1/dataset_service.proto", + "../../protos/google/cloud/aiplatform/v1/deployed_index_ref.proto", + "../../protos/google/cloud/aiplatform/v1/deployed_model_ref.proto", + "../../protos/google/cloud/aiplatform/v1/encryption_spec.proto", + "../../protos/google/cloud/aiplatform/v1/endpoint.proto", + "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1/entity_type.proto", + "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", + "../../protos/google/cloud/aiplatform/v1/event.proto", + "../../protos/google/cloud/aiplatform/v1/execution.proto", + "../../protos/google/cloud/aiplatform/v1/explanation.proto", + "../../protos/google/cloud/aiplatform/v1/explanation_metadata.proto", + "../../protos/google/cloud/aiplatform/v1/feature.proto", + "../../protos/google/cloud/aiplatform/v1/feature_monitoring_stats.proto", + "../../protos/google/cloud/aiplatform/v1/feature_selector.proto", + "../../protos/google/cloud/aiplatform/v1/featurestore.proto", + "../../protos/google/cloud/aiplatform/v1/featurestore_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1/featurestore_online_service.proto", + "../../protos/google/cloud/aiplatform/v1/featurestore_service.proto", + "../../protos/google/cloud/aiplatform/v1/hyperparameter_tuning_job.proto", + "../../protos/google/cloud/aiplatform/v1/index.proto", + "../../protos/google/cloud/aiplatform/v1/index_endpoint.proto", + "../../protos/google/cloud/aiplatform/v1/index_endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1/index_service.proto", + "../../protos/google/cloud/aiplatform/v1/io.proto", + "../../protos/google/cloud/aiplatform/v1/job_service.proto", + "../../protos/google/cloud/aiplatform/v1/job_state.proto", + "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", + "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", + "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", + "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", + "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", + "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", + "../../protos/google/cloud/aiplatform/v1/migratable_resource.proto", + "../../protos/google/cloud/aiplatform/v1/migration_service.proto", + "../../protos/google/cloud/aiplatform/v1/model.proto", + "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", + "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", + "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", + "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1/model_service.proto", + "../../protos/google/cloud/aiplatform/v1/nas_job.proto", + "../../protos/google/cloud/aiplatform/v1/operation.proto", + "../../protos/google/cloud/aiplatform/v1/pipeline_failure_policy.proto", + "../../protos/google/cloud/aiplatform/v1/pipeline_job.proto", + "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", + "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", + "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1/saved_query.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/text_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/params/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_regression.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/predict/prediction/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_tables.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_classification.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1/schema/trainingjob/definition/export_evaluated_data_items_config.proto", + "../../protos/google/cloud/aiplatform/v1/service_networking.proto", + "../../protos/google/cloud/aiplatform/v1/specialist_pool.proto", + "../../protos/google/cloud/aiplatform/v1/specialist_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1/study.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard_data.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard_experiment.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard_run.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard_service.proto", + "../../protos/google/cloud/aiplatform/v1/tensorboard_time_series.proto", + "../../protos/google/cloud/aiplatform/v1/training_pipeline.proto", + "../../protos/google/cloud/aiplatform/v1/types.proto", + "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", + "../../protos/google/cloud/aiplatform/v1/value.proto", + "../../protos/google/cloud/aiplatform/v1/vizier_service.proto" +] 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 ac76d3921a2..97de9b780c2 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/model_service_client.ts @@ -276,6 +276,9 @@ export class ModelServiceClient { 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}' ), @@ -6357,6 +6360,46 @@ export class ModelServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", 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 dc2e8201118..d94e3c91568 100644 --- a/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts @@ -278,6 +278,9 @@ export class PipelineServiceClient { 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}' ), @@ -5261,6 +5264,46 @@ export class PipelineServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts b/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts index 3acab4bb4a1..558dce4c79f 100644 --- a/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts @@ -268,6 +268,9 @@ export class PredictionServiceClient { 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}' ), @@ -654,8 +657,7 @@ export class PredictionServiceClient { * {@link google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id|deployed_model_id} * is not specified, all DeployedModels must have * {@link google.cloud.aiplatform.v1.DeployedModel.explanation_spec|explanation_spec} - * populated. Only deployed AutoML tabular Models have - * explanation_spec. + * populated. * * @param {Object} request * The request object that will be sent. @@ -2755,6 +2757,46 @@ export class PredictionServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", 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 64919e2a7ed..31a3be9a73c 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 @@ -282,6 +282,9 @@ export class SpecialistPoolServiceClient { 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}' ), @@ -4460,6 +4463,46 @@ export class SpecialistPoolServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", 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 979a93ac6ca..5dda290f3c5 100644 --- a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts @@ -279,6 +279,9 @@ export class TensorboardServiceClient { 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}' ), @@ -7778,6 +7781,46 @@ export class TensorboardServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", 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 1794a94a3c3..53f0d6f52f6 100644 --- a/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts @@ -280,6 +280,9 @@ export class VizierServiceClient { 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}' ), @@ -2531,7 +2534,8 @@ export class VizierServiceClient { * suggested by Vertex AI Vizier. Returns a long-running * operation associated with the generation of Trial suggestions. * When this long-running operation succeeds, it will contain - * a {@link google.cloud.ml.v1.SuggestTrialsResponse|SuggestTrialsResponse}. + * a + * {@link google.cloud.aiplatform.v1.SuggestTrialsResponse|SuggestTrialsResponse}. * * @param {Object} request * The request object that will be sent. @@ -5405,6 +5409,46 @@ export class VizierServiceClient { ).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. * diff --git a/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json index b7295bb569f..f987b709de8 100644 --- a/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json @@ -41,6 +41,7 @@ "../../protos/google/cloud/aiplatform/v1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1/match_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1/metadata_store.proto", @@ -50,6 +51,7 @@ "../../protos/google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1/model_service.proto", "../../protos/google/cloud/aiplatform/v1/nas_job.proto", @@ -59,6 +61,7 @@ "../../protos/google/cloud/aiplatform/v1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto", "../../protos/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto", 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 17096fe7d1f..d55acdce93e 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts @@ -892,6 +892,10 @@ export class DatasetServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1097,6 +1101,9 @@ export class DatasetServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1281,6 +1288,9 @@ export class DatasetServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 42813a73106..e7c097f2891 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 @@ -880,6 +880,10 @@ export class DeploymentResourcePoolServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1085,6 +1089,9 @@ export class DeploymentResourcePoolServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1269,6 +1276,9 @@ export class DeploymentResourcePoolServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 e1c2e0ee200..27c67867f88 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts @@ -871,6 +871,10 @@ export class EndpointServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1076,6 +1080,9 @@ export class EndpointServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1260,6 +1267,9 @@ export class EndpointServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 088db64f348..b31c9c09d8e 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts @@ -889,6 +889,10 @@ export class FeaturestoreServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1094,6 +1098,9 @@ export class FeaturestoreServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1278,6 +1285,9 @@ export class FeaturestoreServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, @@ -3552,7 +3562,7 @@ export class FeaturestoreServiceClient { * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` * @param {string} request.entityIdField * Source column that holds entity IDs. If not provided, entity IDs are - * extracted from the column named `entity_id`. + * extracted from the column named entity_id. * @param {number[]} request.featureSpecs * Required. Specifications defining which Feature values to import from the * entity. The request fails if no feature_specs are provided, and having 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 a45a40e4fa0..af5d9c55eaf 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 @@ -871,6 +871,10 @@ export class IndexEndpointServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1076,6 +1080,9 @@ export class IndexEndpointServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1260,6 +1267,9 @@ export class IndexEndpointServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 7167a438f99..fbb528c76d4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts @@ -871,6 +871,10 @@ export class IndexServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1076,6 +1080,9 @@ export class IndexServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1260,6 +1267,9 @@ export class IndexServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 4fe870534fc..489dedd4185 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts @@ -907,6 +907,10 @@ export class JobServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1112,6 +1116,9 @@ export class JobServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1296,6 +1303,9 @@ export class JobServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 05576fc0016..c18d0228468 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts @@ -894,6 +894,10 @@ export class MetadataServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1099,6 +1103,9 @@ export class MetadataServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1283,6 +1290,9 @@ export class MetadataServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, @@ -2097,7 +2107,6 @@ export class MetadataServiceClient { * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * @param {google.protobuf.FieldMask} [request.updateMask] * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. * @param {boolean} request.allowMissing * If set to true, and the * {@link google.cloud.aiplatform.v1beta1.Artifact|Artifact} is not found, a new @@ -2394,7 +2403,6 @@ export class MetadataServiceClient { * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @param {google.protobuf.FieldMask} [request.updateMask] * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. * @param {boolean} request.allowMissing * If set to true, and the {@link google.cloud.aiplatform.v1beta1.Context|Context} * is not found, a new {@link google.cloud.aiplatform.v1beta1.Context|Context} is @@ -3135,7 +3143,6 @@ export class MetadataServiceClient { * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @param {google.protobuf.FieldMask} [request.updateMask] * Optional. A FieldMask indicating which fields should be updated. - * Functionality of this field is not yet supported. * @param {boolean} request.allowMissing * If set to true, and the * {@link google.cloud.aiplatform.v1beta1.Execution|Execution} is not found, a new @@ -3686,6 +3693,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * Each of the above supported filter types can be combined together using * logical operators (`AND` & `OR`). Maximum nested expression depth allowed @@ -5213,6 +5223,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Artifacts based on the contexts to which they belong, use the * function operator with the full resource name @@ -5356,6 +5369,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Artifacts based on the contexts to which they belong, use the * function operator with the full resource name @@ -5447,6 +5463,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Artifacts based on the contexts to which they belong, use the * function operator with the full resource name @@ -5537,6 +5556,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0`. + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Parent Child filtering**: * To filter Contexts based on parent-child relationship use the HAS * operator as follows: @@ -5684,6 +5706,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0`. + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Parent Child filtering**: * To filter Contexts based on parent-child relationship use the HAS * operator as follows: @@ -5779,6 +5804,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..`. * For example: `metadata.field_1.number_value = 10.0`. + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Parent Child filtering**: * To filter Contexts based on parent-child relationship use the HAS * operator as follows: @@ -5873,6 +5901,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..` * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Executions based on the contexts to which they belong use * the function operator with the full resource name: @@ -6016,6 +6047,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..` * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Executions based on the contexts to which they belong use * the function operator with the full resource name: @@ -6107,6 +6141,9 @@ export class MetadataServiceClient { * To filter on metadata fields use traversal operation as follows: * `metadata..` * For example: `metadata.field_1.number_value = 10.0` + * In case the field name contains special characters (such as colon), one + * can embed it inside double quote. + * For example: `metadata."field:1".number_value = 10.0` * * **Context based filtering**: * To filter Executions based on the contexts to which they belong use * the function operator with the full resource name: 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 337ac1c796a..91cfcbec188 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts @@ -872,6 +872,10 @@ export class MigrationServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1077,6 +1081,9 @@ export class MigrationServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1261,6 +1268,9 @@ export class MigrationServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 110829a675c..eeed88a68aa 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts @@ -886,6 +886,10 @@ export class ModelServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1091,6 +1095,9 @@ export class ModelServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1275,6 +1282,9 @@ export class ModelServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 fd0069d4516..821d5c24661 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts @@ -878,6 +878,10 @@ export class PipelineServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1083,6 +1087,9 @@ export class PipelineServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1267,6 +1274,9 @@ export class PipelineServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 dce336071af..523aac1bd94 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts @@ -673,8 +673,7 @@ export class PredictionServiceClient { * {@link google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id|deployed_model_id} * is not specified, all DeployedModels must have * {@link google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec|explanation_spec} - * populated. Only deployed AutoML tabular Models have - * explanation_spec. + * populated. * * @param {Object} request * The request object that will be sent. 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 02a04fe264c..7472c2467c5 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts @@ -872,6 +872,10 @@ export class ScheduleServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1077,6 +1081,9 @@ export class ScheduleServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1261,6 +1268,9 @@ export class ScheduleServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 fce96fb397c..b884a55a614 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 @@ -877,6 +877,10 @@ export class SpecialistPoolServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1082,6 +1086,9 @@ export class SpecialistPoolServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1266,6 +1273,9 @@ export class SpecialistPoolServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 9c2c11ed13f..429c11a3f81 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts @@ -903,6 +903,10 @@ export class TensorboardServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1108,6 +1112,9 @@ export class TensorboardServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1292,6 +1299,9 @@ export class TensorboardServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, 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 1b1da09025e..a2c316fec16 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts @@ -880,6 +880,10 @@ export class VizierServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { delete: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1085,6 +1089,9 @@ export class VizierServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', }, @@ -1269,6 +1276,9 @@ export class VizierServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, { get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', }, @@ -2753,7 +2763,8 @@ export class VizierServiceClient { * suggested by Vertex AI Vizier. Returns a long-running * operation associated with the generation of Trial suggestions. * When this long-running operation succeeds, it will contain - * a {@link google.cloud.ml.v1.SuggestTrialsResponse|SuggestTrialsResponse}. + * a + * {@link google.cloud.aiplatform.v1beta1.SuggestTrialsResponse|SuggestTrialsResponse}. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-aiplatform/system-test/fixtures/sample/src/index.js b/packages/google-cloud-aiplatform/system-test/fixtures/sample/src/index.js index 6aced5b57ed..c260f42662a 100644 --- a/packages/google-cloud-aiplatform/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-aiplatform/system-test/fixtures/sample/src/index.js @@ -29,8 +29,10 @@ function main() { new aiplatform.IndexEndpointServiceClient(); const indexServiceClient = new aiplatform.IndexServiceClient(); const jobServiceClient = new aiplatform.JobServiceClient(); + const matchServiceClient = new aiplatform.MatchServiceClient(); const metadataServiceClient = new aiplatform.MetadataServiceClient(); const migrationServiceClient = new aiplatform.MigrationServiceClient(); + const modelGardenServiceClient = new aiplatform.ModelGardenServiceClient(); const modelServiceClient = new aiplatform.ModelServiceClient(); const pipelineServiceClient = new aiplatform.PipelineServiceClient(); const predictionServiceClient = new aiplatform.PredictionServiceClient(); diff --git a/packages/google-cloud-aiplatform/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-aiplatform/system-test/fixtures/sample/src/index.ts index 68aa7cc1424..e8fee7c77c2 100644 --- a/packages/google-cloud-aiplatform/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-aiplatform/system-test/fixtures/sample/src/index.ts @@ -24,8 +24,10 @@ import { IndexEndpointServiceClient, IndexServiceClient, JobServiceClient, + MatchServiceClient, MetadataServiceClient, MigrationServiceClient, + ModelGardenServiceClient, ModelServiceClient, PipelineServiceClient, PredictionServiceClient, @@ -62,12 +64,18 @@ function doStuffWithIndexServiceClient(client: IndexServiceClient) { function doStuffWithJobServiceClient(client: JobServiceClient) { client.close(); } +function doStuffWithMatchServiceClient(client: MatchServiceClient) { + client.close(); +} function doStuffWithMetadataServiceClient(client: MetadataServiceClient) { client.close(); } function doStuffWithMigrationServiceClient(client: MigrationServiceClient) { client.close(); } +function doStuffWithModelGardenServiceClient(client: ModelGardenServiceClient) { + client.close(); +} function doStuffWithModelServiceClient(client: ModelServiceClient) { client.close(); } @@ -115,12 +123,18 @@ function main() { const jobServiceClient = new JobServiceClient(); doStuffWithJobServiceClient(jobServiceClient); // check that the client instance can be created + const matchServiceClient = new MatchServiceClient(); + doStuffWithMatchServiceClient(matchServiceClient); + // check that the client instance can be created const metadataServiceClient = new MetadataServiceClient(); doStuffWithMetadataServiceClient(metadataServiceClient); // check that the client instance can be created const migrationServiceClient = new MigrationServiceClient(); doStuffWithMigrationServiceClient(migrationServiceClient); // check that the client instance can be created + const modelGardenServiceClient = new ModelGardenServiceClient(); + doStuffWithModelGardenServiceClient(modelGardenServiceClient); + // check that the client instance can be created const modelServiceClient = new ModelServiceClient(); doStuffWithModelServiceClient(modelServiceClient); // check that the client instance can be created 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 935abc36ee1..eda80a3e9b8 100644 --- a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1.ts @@ -5906,6 +5906,58 @@ describe('v1.DatasetServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new datasetserviceModule.v1.DatasetServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1.ts index b81e66a21ec..be5086d6be3 100644 --- a/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1.ts @@ -4696,6 +4696,58 @@ describe('v1.EndpointServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new endpointserviceModule.v1.EndpointServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1.ts index 053335f5e70..888b9187074 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1.ts @@ -3328,6 +3328,61 @@ describe('v1.FeaturestoreOnlineServingServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new featurestoreonlineservingserviceModule.v1.FeaturestoreOnlineServingServiceClient( + { + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts index c6b4b994014..48f48a0d21a 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts @@ -7811,6 +7811,60 @@ describe('v1.FeaturestoreServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( + { + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1.ts index 20f777b1f5f..aa724fe6eab 100644 --- a/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1.ts @@ -4829,6 +4829,59 @@ describe('v1.IndexEndpointServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new indexendpointserviceModule.v1.IndexEndpointServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_index_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_index_service_v1.ts index 85cb1ccb91f..cd5e8bb3a63 100644 --- a/packages/google-cloud-aiplatform/test/gapic_index_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_index_service_v1.ts @@ -4429,6 +4429,58 @@ describe('v1.IndexServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new indexserviceModule.v1.IndexServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_job_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_job_service_v1.ts index 973c1aaea86..8f4eb0049cc 100644 --- a/packages/google-cloud-aiplatform/test/gapic_job_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_job_service_v1.ts @@ -9976,6 +9976,58 @@ describe('v1.JobServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new jobserviceModule.v1.JobServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_match_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_match_service_v1.ts new file mode 100644 index 00000000000..2658d322796 --- /dev/null +++ b/packages/google-cloud-aiplatform/test/gapic_match_service_v1.ts @@ -0,0 +1,3769 @@ +// 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 matchserviceModule from '../src'; + +import {protobuf, 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 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('v1.MatchServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = matchserviceModule.v1.MatchServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = matchserviceModule.v1.MatchServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = matchserviceModule.v1.MatchServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new matchserviceModule.v1.MatchServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.matchServiceStub, undefined); + await client.initialize(); + assert(client.matchServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.matchServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.matchServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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('findNeighbors', () => { + it('invokes findNeighbors without error', async () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.FindNeighborsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.FindNeighborsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.FindNeighborsResponse() + ); + client.innerApiCalls.findNeighbors = stubSimpleCall(expectedResponse); + const [response] = await client.findNeighbors(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes findNeighbors without error using callback', async () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.FindNeighborsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.FindNeighborsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.FindNeighborsResponse() + ); + client.innerApiCalls.findNeighbors = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.findNeighbors( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1.IFindNeighborsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes findNeighbors with error', async () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.FindNeighborsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.FindNeighborsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.findNeighbors = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.findNeighbors(request), expectedError); + const actualRequest = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes findNeighbors with closed client', async () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.FindNeighborsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.FindNeighborsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.findNeighbors(request), expectedError); + }); + }); + + describe('readIndexDatapoints', () => { + it('invokes readIndexDatapoints without error', async () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.ReadIndexDatapointsResponse() + ); + client.innerApiCalls.readIndexDatapoints = + stubSimpleCall(expectedResponse); + const [response] = await client.readIndexDatapoints(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readIndexDatapoints without error using callback', async () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.ReadIndexDatapointsResponse() + ); + client.innerApiCalls.readIndexDatapoints = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.readIndexDatapoints( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1.IReadIndexDatapointsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readIndexDatapoints with error', async () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.readIndexDatapoints = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.readIndexDatapoints(request), expectedError); + const actualRequest = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readIndexDatapoints with closed client', async () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.ReadIndexDatapointsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.readIndexDatapoints(request), expectedError); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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('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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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('entityType', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + }; + const client = new matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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('metadataSchema', () => { + const fakePath = '/rendered/path/metadataSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + metadata_schema: 'metadataSchemaValue', + }; + const client = new matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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('pipelineJob', () => { + const fakePath = '/rendered/path/pipelineJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + pipeline_job: 'pipelineJobValue', + }; + const client = new matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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('specialistPool', () => { + const fakePath = '/rendered/path/specialistPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + specialist_pool: 'specialistPoolValue', + }; + const client = new matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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 matchserviceModule.v1.MatchServiceClient({ + 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_metadata_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1.ts index 44c43d7fa63..37d63d39af2 100644 --- a/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1.ts @@ -8860,6 +8860,58 @@ describe('v1.MetadataServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_migration_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_migration_service_v1.ts index 78484292155..8ebf2bed673 100644 --- a/packages/google-cloud-aiplatform/test/gapic_migration_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_migration_service_v1.ts @@ -3717,6 +3717,58 @@ describe('v1.MigrationServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new migrationserviceModule.v1.MigrationServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1.ts new file mode 100644 index 00000000000..12c59502a70 --- /dev/null +++ b/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1.ts @@ -0,0 +1,3640 @@ +// 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 modelgardenserviceModule from '../src'; + +import {protobuf, 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 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('v1.ModelGardenServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + modelgardenserviceModule.v1.ModelGardenServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + modelgardenserviceModule.v1.ModelGardenServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = modelgardenserviceModule.v1.ModelGardenServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.modelGardenServiceStub, undefined); + await client.initialize(); + assert(client.modelGardenServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.modelGardenServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.modelGardenServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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('getPublisherModel', () => { + it('invokes getPublisherModel without error', async () => { + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.GetPublisherModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.GetPublisherModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.PublisherModel() + ); + client.innerApiCalls.getPublisherModel = stubSimpleCall(expectedResponse); + const [response] = await client.getPublisherModel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPublisherModel without error using callback', async () => { + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.GetPublisherModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.GetPublisherModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.PublisherModel() + ); + client.innerApiCalls.getPublisherModel = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPublisherModel( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1.IPublisherModel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPublisherModel with error', async () => { + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.GetPublisherModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.GetPublisherModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPublisherModel = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getPublisherModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPublisherModel with closed client', async () => { + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.GetPublisherModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.GetPublisherModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPublisherModel(request), expectedError); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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('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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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('entityType', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + }; + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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('metadataSchema', () => { + const fakePath = '/rendered/path/metadataSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + metadata_schema: 'metadataSchemaValue', + }; + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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('pipelineJob', () => { + const fakePath = '/rendered/path/pipelineJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + pipeline_job: 'pipelineJobValue', + }; + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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('specialistPool', () => { + const fakePath = '/rendered/path/specialistPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + specialist_pool: 'specialistPoolValue', + }; + const client = new modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1.ModelGardenServiceClient({ + 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_model_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts index 9e5175b481f..f6b1f2c518c 100644 --- a/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts @@ -6483,6 +6483,58 @@ describe('v1.ModelServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new modelserviceModule.v1.ModelServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1.ts index 520fea06206..3a6cbf4fcef 100644 --- a/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1.ts @@ -5031,6 +5031,58 @@ describe('v1.PipelineServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new pipelineserviceModule.v1.PipelineServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts index af8a1d803cf..a2888a3ed87 100644 --- a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts @@ -3114,6 +3114,58 @@ describe('v1.PredictionServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new predictionserviceModule.v1.PredictionServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1.ts index 27904dca575..d2cc2b369dc 100644 --- a/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1.ts @@ -4300,6 +4300,59 @@ describe('v1.SpecialistPoolServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new specialistpoolserviceModule.v1.SpecialistPoolServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1.ts index 919a5710c6e..3c8d5305369 100644 --- a/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1.ts @@ -8570,6 +8570,58 @@ describe('v1.TensorboardServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new tensorboardserviceModule.v1.TensorboardServiceClient({ + 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 = { diff --git a/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1.ts index c88ccccb384..54ee79a9cde 100644 --- a/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1.ts @@ -5589,6 +5589,58 @@ describe('v1.VizierServiceClient', () => { }); }); + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new vizierserviceModule.v1.VizierServiceClient({ + 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 = {